Tomcat 1 « Development « Spring Q&A





1. Duplicate spring configurations being loaded?    stackoverflow.com

I'm looking at the output from spring being loaded up by tomcat and there's something very strange...Everything is duplicated. What would cause this? Whatever it is, it's causing my ...

2. Is anyone using SpringSource tc server as a Tomcat replacement?    stackoverflow.com

It looks like SpringSource has just released a GA version of their tc Server application server. It sounds from their description like it is a drop-in replacement for ...

3. Can I dynamically load additional Spring configuration files into an existing WebApplicationContext?    stackoverflow.com

Upon starting my webapp within Tomcat 6.0.18, I bootstrap Spring with only what is necessary to initialize the system -- namely, for now, database migrations. I do not want any ...

4. Is it better to keep libraries in the application lib or in common/lib?    stackoverflow.com

I'm doing some Spring development and I'm trying to decide if libraries should always be kept in the application lib, even if they end up being common to more than one ...

5. Deploying a Spring-based WAR with its JAR dependencies externalized    stackoverflow.com

I have a Spring app that has a lot of dependencies (18 megabytes of JAR files..) - Now, when I am testing on the remote Tomcat 6.0 server, I'd like to ...

6. Maven Tomcat Embedded    stackoverflow.com

I am trying to run a Spring webapp using maven with the

mvn tomcat:run
command, but whenever I navigate to http://localhost:8080/myApp, I get the error: "The requested resource () is not available". Nothing ...

7. Mapping both static and dynamic files in Tomcat/Spring?    stackoverflow.com

I was using the following in web.xml to configure a servlet to dynamically generate PDFs.

<servlet-mapping>
    <servlet-name>pdfServlet</servlet-name>
    <url-pattern>*.pdf</url-pattern>
</servlet-mapping>
Now, I also have to serve a few static ...

8. eclipse galileo is failling to publish to tomcat on mac!    stackoverflow.com

Hello good fellas i've posted a similar question here sometime ago and found the solution by downloading the new eclipse 3.5 (galileo).i believe this is a difference case since 1- ...

9. Elegant ways to separate configuration from WAR in Tomcat    stackoverflow.com

I am trying to find the best way to pass complex configurations in a Spring webapp running in Tomcat. Currently I use JNDI to pass data sources and strings from the ...





10. When is Spring + Tomcat not powerful enough?    stackoverflow.com

I've been reading/learning more about Spring lately, and how one would use Spring in combination with other open-source tools like Tomcat and Hibernate. I'm evaluating whether or not Spring MVC could ...

11. Setting up Spring and Tomcat in eclipse?    stackoverflow.com

I am having some trouble getting Spring and Tomcat up and running and recognized by eclipse. I have looked around on google with no luck. Specifically, I am having ...

12. Using eclipse with maven plugin, how should I setup my build so it deploys to tomcat?    stackoverflow.com

Using eclipse with maven plugin, how should I setup my build so it deploys to tomcat? I'm not sure if I have to do this in 1 or 2 steps, but I ...

13. How to avoid downloading schema file from internet during spring initialization    stackoverflow.com

I have a web app running on a production server which does not allow public internet access. The initialization fails with error like

2010-02-18 15:21:33,150 **WARN**  [SimpleSaxErrorHandler.java:47] Ignored XML validation ...

14. INFO: Additional JARs have been added : 'xalan-2.7.0.jar'    stackoverflow.com

After a successful start of Tomcat and a few REST calls I get this message in Tomcat console and then the application reload it self. And because reload takes a few ...

15. Spring App + Tomcat + XSLT = TransformerFactoryConfigurationError    stackoverflow.com

I am trying to deploy a Spring 3.0 Webapplicatoin to a tomcat5.5 server running on CentOS. Deployment works, but when I try to access the application I get a TransformerFactoryConfigurationError:

org.springframework.beans.factory.BeanCreationException: Error creating ...

16. Configuring servlet for using spring    stackoverflow.com

How to configure my web application in Eclipse (based on Servlets and deployed to Tomcat) to use Spring framework. I need only IoC container (Beans only and ApplicationContext), not Spring MVC. ...





17. Spring + Hessian on Tomcat    stackoverflow.com

I have a task to write a web service with use of Hessian and Spring. Unfortunately there is not enough information so i can't make it work myself... Please can anyone write a ...

18. Extracting startup errors from Spring contexts    stackoverflow.com

Consider the following output from a Tomcat server under Eclipse:

INFO: Initializing Coyote HTTP/1.1 on http-8080
INFO: Initialization processed in 634 ms
INFO: Starting service Catalina
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
SEVERE: Error listenerStart
SEVERE: Context ...

19. Servlet Mapping Help - Possible to Avoid Referencing Context Name?    stackoverflow.com

I am working on a Spring application using Tomcat 6 and Spring 2.5. I'm trying to get my URL mapping correct. What I would like to have work is ...

20. Controlling new features in Spring/Apache tomcat    stackoverflow.com

Is there a good way to manage roll out of new software in Spring/Tomcat configuration. The problem I am trying to address is being able to rollback newly deployed software provided ...

21. Spring @Autowired and WebApplicationContext in Tomcat    stackoverflow.com

@Autowired works only once. What to do to make it wire the bean every time the Servlet is recreated? My web-app (Tomcat6 container) consists of 2 Servlets. Every servlet has private fields. Their ...

22. How enable GZIP compression for Spring HttpInvoker requests using Tomcat?    stackoverflow.com

Wondering if anyone has set up GZIP compression for Spring HttpInvoker requests using Tomcat, and what steps are necessary? Also, any advice on whether it's actually worth it; is there much to ...

23. Character-encoding problem spring    stackoverflow.com

I am stuck in a big problem with encoding in my website! I use spring 3, tomcat 6, and mysql db. I want to support German and Czech along with English in ...

24. Tomcat Spring WebApplicationContext    stackoverflow.com

In the Spring framework reference I found this:

The ApplicationContext interface has a few other methods for retrieving beans, but ideally your application code should never use them. Indeed, ...

25. Tomcat unable to find jsp in war file    stackoverflow.com

I recently switched one of my static html files to a Spring controller that uses a JSP to render its view. I use jetty to test locally and local testing shows ...

26. Spring's application context prevents other applications from starting in same servlet container    stackoverflow.com

I have two web applications running in same Servlet container (Tomcat), A and B. These two connect to each other using Spring Remoting. On startup, B needs to call A to ...

27. Issue of running spring samples    stackoverflow.com

This is the second time I ask question about this issue,last time when I tried to run mvc-ajax project,I got error :can't find c.tld file. Then I remove jsp-api.jar,it works. But now ...

28. How to correctly deploy Spring based application on Tomcat?    stackoverflow.com

What are the best practices for Spring based application deployment? I have at least two apps based on Spring. I'm deploying them on Tomcat - two instances of the same server with ...

29. Disable Spring from Starting up after BeanInstantiationException (Tomcat)    stackoverflow.com

for the project I'm currently working at there is the requirement to disable the webapp context to be started when spring fails to initialize some beans (that call webservices during initialization ...

30. Application run well from eclipse, but fails to start, when it is deployed manually    stackoverflow.com

I have web application using SpringFramework3.0.3.RELEASE, developed in Eclipse with m2eclipse plugin and deployed into Tomcat6.0.26. I can run it from Eclipse, but when copy target WAR int same tomcat instance ...

31. Tomcat 6.x web.xml default and custom servlet routing    stackoverflow.com

I have two servlets defined in the web.xml file, namely the default2 and myservlet. The default2 servlet is used to map the static files like the javascript and css. The myservlet ...

32. Tomcat errors, reasons JAR not included in build    stackoverflow.com

When I try to deploy my Spring application to Tomcat, it gives me errors (localhost-{date}.log) saying I'm missing commons-pool-{version}.jar. However, the source code is part of a STABLE release. I'm ...

33. Tomcat serving static content    stackoverflow.com

I have a Spring app and I'm wondering the best way to serve static content. I have tried the following:

<servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>/static/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
    ...

34. Spring 3 - Petclinic - ${owner.new} invalid expression in Tomcat 7    stackoverflow.com

I have deployed the petclinic code from the SPring 3 svn samples repository in Tomcat7 and I get the following exception: Internal error

Root cause is: /WEB-INF/jsp/owners/form.jsp(4,1) "${owner.new}" contains invalid expression(s): ...

35. Tomcat with Spring    stackoverflow.com

I have a 3-tier appln hosted in Tomcat; web, service and DAO layers. How do you integrate Tomcat and Spring? I need to make use of Spring's dependency injection, transaction management, ...

36. Spring web.xml cant load because of     stackoverflow.com

When I put these lines:

  <listener>
    <listener-class>
      org.springframework.web.context.ContextLoaderListener
    </listener-class>
  </listener>
my appln can't load at all. When I go ...

37. Spring and IoC for my Singleton class (web-app, Tomcat)    stackoverflow.com

I have such singleton class:

package ua.org.bytes.ewt;

import org.apache.struts2.ServletActionContext;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
import ua.org.bytes.ewt.dao.CategoriesManager;
import ua.org.bytes.ewt.dao.ShortcutsManager;

/**
 *
 * @author Vitaliy Ganzha
 */
public class ApplicationSupervisor {
    private static final ApplicationSupervisor INSTANCE = new ApplicationSupervisor();
 ...

38. Startup a Servlet before loading app context    stackoverflow.com

I have a servlet which is bundled as part of my application. I want to be able to configure Tomcat or Spring to load this servlet at boostrap before the application ...

39. Problems with classpath between Eclipse, Tomcat and JUnit in Spring 3 app    stackoverflow.com

I have web app, based on Spring 3.0.3, that I've been developing using Eclipse 3.4. While doing so I've been running the web app in Tomcat 6.0.18 from Eclipse. ...

40. external config based on context path    stackoverflow.com

I would like to deploy multiple independent copies of a particular web-app on the same tomcat server under different context paths. Each web-app will need different configuration settings (database name, password, ...

41. Unable to import a jsp project into eclipse as a dynamic web project    stackoverflow.com

Dear fellow Java developers: I am trying to import into eclipse a web project that uses Spring, Hibernate, and JSP's. This web application was developed also in eclipse, and for some ...

42. Having problems deploying a jsp application in eclipse    stackoverflow.com

Dear fellow Java developers: I am having problems deploying a dynamic web application in eclipse. My application is made up of JSP's, uses Spring/Hibernate frameworks, and has a MySQL database backend. ...

43. What will tomcat do after I type the root link of a spring application?    stackoverflow.com

Let's say I have an application written with spring framework, and I want to know, when I typed in :
http://localhost:8080/test
link, what tomcat will do to generate response for this ...

44. multiple Spring root WebApplicationContexts    stackoverflow.com

I have a tomcat server with two webapps (foo and bar) that have an identical deployment war. The deployment uses the standard Spring/Hibernate setup. I assumed that these two webapps would ...

45. FAIL - Application at context path could not be started    stackoverflow.com


in my spring application, application is successfully deployed in tomcat6 server but it is giving error-
FAIL - Application at context path could not be started
how can i solve this problem.

Thanks
Yugals ...

46. Spring HttpInvokerProxyFactoryBean StreamCorruptedException    stackoverflow.com

I am using springhttpinvokerproxyfactorybean to access remote service interface . the remote service interface is exposed by a webapp which is container form authenticated by tomcat. as j_security_check with j_username and ...

47. 0:25:01,819 WARN [HtmlImageRendererBase] ALT attribute is missing for : j_id113    stackoverflow.com

I am trying to deploy a web application from my Eclipse to Jboss 6.x on a localhost. And i keep getting this error.

10:25:01,819 WARN  [HtmlImageRendererBase] ALT attribute is missing for ...

48. Is there a way to avoid undeployment memory leaks in Tomcat?    stackoverflow.com

This question is for anyone who's ever tested the "Find leaks" button in the Tomcat manager and got some results like this:

The following web applications were stopped (reloaded, undeployed), ...

49. Strange character encoding problem with Eclipse / Spring / Tomcat 6    stackoverflow.com

I have been trying things all da but can't get a proper solution. My problem is: I am developing a Spring MVC based app in my local Tomcat. My MYSQl database ...

50. Spring3, JAXB2, Java6, NamespacePrefixMapper questions    stackoverflow.com

I built a simple Spring3, Hibernate3/(JPA2), RESTful service, hosted on Tomcat6, that uses JAXB2 to marshal the results. (It uses annotated pojos.) I needed to use specific namespace prefixes, so ...

51. Error while running this project in tomcat6    stackoverflow.com

When i am runig my project in myeclipse using tomcat6 then it will throw an error like so what should i do this error regarding spring class but i will ...

52. Spring - Injecting a dependency into a ServletContextListener    stackoverflow.com

I would like to inject a dependency into a ServletContextListener. However, my approach is not working. I can see that Spring is calling my setter method, but later on when contextInitialized ...

53. Tomcat after Startup Event with spring    stackoverflow.com

I have a function I want to execute straight after tomcat has started and loaded all its attributes successfully. I don't want to use ServletContextListener as this will require the function ...

54. How do I Spring enable a Tomcat valve    stackoverflow.com

I wrote a Tomcat valve and configured it in server.xml. So far so good. However, I want one of the valve's data members to be a Spring managed bean. So, how can I ...

55. Maven webResources filtering on-the-fly    stackoverflow.com

I'm using the maven-war-plugin to filter some resources in WEB-INF. Mostly stuff static stuff like:

var url = ${contextRoot}/save.json;
or
<link href="static/css/layout-${buildNumber}.css"/>
Everything works fantastically. My issue is that it has created a development nightmare. ...

56. Why is my Java/Spring/Tomcat stack translating non English characters into two separate characters?    stackoverflow.com

When I visit the URL http://localhost:8080/myapp/search?q=jalape%C3%B1os&p=1 and use request.getParamter("q") the string becomes jalapeños instead of jalapeños. Obviously this is a problem. I'm running Spring 3 with tomcat, everything "says" it's ...

57. problems creating war file    stackoverflow.com

i am having issues deploying my spring app to tomcat 7 with the following error:

C:\Users\xxxxxx\Work\Online Racing League\build.xml:61: Problem creating war: C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\Online ...

58. can i run two copies of the same war in different context paths on tomcat?    stackoverflow.com

I have my war running on tomcat in a context path - say /path1. I've made some more changes to my codebase, added more classes, jars etc, and now without disturbing the ...

59. tomcat spring - creating dir on deploy with a bootstrap    stackoverflow.com

I need to create a dir when i deploy my web-application. This dir will contain the profilepics of all users. code:

public class ImageBootstrapper {

    public static void initialise(ServletContextEvent ...

60. Tomcat server not running in eclipse with project    stackoverflow.com

I have one basic web project using spring in eclispe. I have installed tomcat v7 . Now when i start server alone , without adding any application then it runs ok but when i ...

61. Getting errors from deleted class    stackoverflow.com

I deleted a class from my Netbeans Spring application, which holds a method to throw an exception. I also removed all jars attached to this class. When I run my application, ...

62. Simple web aplication (Tomcat) performance dashboard    stackoverflow.com

I was wondering if anyone could point me to right solution for simple performance dashboard for my web application. Technology stack: Tomcat + Springframework. I was looking int OpenCore, but seams that ...

63. Java, Spring, Tomcat, hangs at "INFO: Initializing Spring root WebApplicationContext", I think I changed the allowed memory heap for my entire system    stackoverflow.com

I was playing around with the Java memory heap allocation and I think I did something that set it not just for any specific tomcat folder but for the entire system ...

64. Spring DisposableBean does not work    stackoverflow.com

I am implementing the DisposableBean in one of my beans to get notified when my server is shutting down. However, the destroy method is never called. I am running Tomcat with Spring ...

65. this is very likely to create a memory leak tomcat    stackoverflow.com

I configured tomcat to work with a different external open source. However, after the tomcat is running for a few minutes I get: SEVERE: The web application [/MyProject] created a ThreadLocal with key ...

66. Starting Servlet automatically when tomcat starts...?    stackoverflow.com

I have a requirement where , I have one table in that columns are phno , name , id. When ever I update the table one servlet need to read that ...

67. Spring, Tomcat trying to set Context URL path in server.xml and it's not working    stackoverflow.com

I've been trying to figure out how to do this and as far as I can tell I am doing what the various resources I have found say to do. I ...

68. Tomcat filters: Valid for an entire app minus some URLs    stackoverflow.com

In my Spring application I use org.springframework.web.filter.ShallowEtagHeaderFilter to add ETags. That works great, except when I output REALLY large data. Then my application runs out of memory and terminates the JVM! ...

69. Sharing an application context between two WARs?    stackoverflow.com

Is there a way to share an app-context between two deployed wars? One war needs to wire-in the services of another, and I don't know where to start with this.

70. Recommendations around cleaning-up/deleting files present in Tomcat temp Dir    stackoverflow.com

What are some of the best practices around deleting/cleaning up files present inside temp dir on Tomcat-6. The files are images created by charting packages, numerous files created by various applications ...

71. Why can't I run my Spring project from eclipse?    stackoverflow.com

I've been working on a java spring project for a few months now. I can compile it using maven. I can drop the war file into tomcat/webapps and it ...

72. Tomcat Severe listenerStart error    stackoverflow.com

I am in the process of migrating my webapp to IntelliJ/Maven/Windows from Netbeans/Linux. The project didn't want to import so I've had to do it manually one file at a ...

73. Subclassing ContextLoaderListener    stackoverflow.com

Previously in our application we had not subclassed ContextLoaderListener so in our Web.xml we simply had the ContextLoaderListener being set as a listener (along with log4j and properties). Now, I ...

74. Redirect from index page in Spring and Tomcat    stackoverflow.com

I have a Spring application, which is running on Tomcat say at: http://example.com/foo/ DisplatcherServlet is mapped to app/*, for example, index page is:

http://example.com/foo/app/index.html
This is so because I have other servlets ...

75. Tomcat 6 fails on context reload    stackoverflow.com

Since some days I am facing problems when my tomcat reloads the context. In most cases it works, in some cases it fails. I get the following error:

30.04.2011 22:52:16 org.apache.catalina.loader.WebappClassLoader modified
SCHWERWIEGEND: ...

76. How to work with a shared Tomcat?    stackoverflow.com

Sorry, but I tried searching for this subject, but I didn't find related to my problem. Recently, I bought a domain and web hosting for it. I bought it especially for ...

77. Getting Error in dependencyCheck ZipException: invalid stored block lengths    stackoverflow.com

I am Getting 'Error in dependencyCheck ZipException: invalid stored block lengths' while uploading context in Tomcat-6 for a maven based spring application. Tomcat gets started , but the coould not load ...

78. Jars are not copied to Tomcat's lib folder    stackoverflow.com

I am doing some basic spring stuff and stuck at some point.
I am getting Class not found exception whenever I deploy my application on Tomcat. I observed that the jars ...

79. Why am I getting a 404 requested resource not available error from Tomcat 7    stackoverflow.com

I have recreated this project in Eclipse as many ways as I can think of and continue to get this same error-

HTTP Status 404 - /SpringTest/hello 

    ...

80. How to set servlet classpath in eclipse/tomcat/maven/spring?    stackoverflow.com

I have written a servlet and I want it to instantiate a spring context like this:

ApplicationContext context = new ClassPathXmlApplicationContext("spring/applicationContext.xml","spring/dao.xml");
However, when I run the servlet in the tomcat server I set ...

81. tomcat7, spring 3.0.5, errors, contexts    stackoverflow.com

org.springframework.web.context.ContextLoader, in the event of an exception, does:

servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, ex);
which looks quite useful, except the servlet context object it is making ...

82. how to monitor memory in a spring + tomcat application?    stackoverflow.com

i have a spring application that i want to optimize , its using much memory, it was fine when few people used it, but numbers scaled a little and i have ...

83. Problem with org.tuckey.web.filters.urlrewrite and tomcat 5.5    stackoverflow.com

I'am developing an application with spring roo, and i must deploy it in a tomcat 5.5. At developing time I use jetty and have no problem, but when I test it ...

84. Unable to locate Spring NamespaceHandler for XML schema namespace    stackoverflow.com

I am running some servlet code in tomcat in eclipse. It's been working fine but today I get the error Unable to locate Spring NamespaceHandler for XML schema namespace. The full ...

85. How do I set the default schema when configuring AS400JDBCXADataSource in Spring or as Tomcat Resource?    stackoverflow.com

Moving from the following Tomcate Resource Definition:

<Resource name="jdbc/test"
          auth="Container"
          type="javax.sql.DataSource"
    ...

86. Spring in Tomcat - what's lacking?    stackoverflow.com

As far as I'm concerned Spring is integrated in Apache Tomcat. Although, when trying to implement session beans, I've encountered an error

The matching wildcard is strict, but no declaration can ...

87. Memory leak error on shutting down tcServer    stackoverflow.com

I am seeing the error below in my tcServer logs on shutting down my instance: org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads A web application appears to have started a thread named [fsa.scheduler_Worker-1] but has failed to stop ...

88. Project structure organization: how to make it better?    stackoverflow.com

All - we have several web applications, all based on some version of Spring developed over time by different team across organizations. They each produce their own WAR, have a different context ...

89. GRAVE: Error listenerStart    stackoverflow.com

i'm having this error when i try to run my application i don't know why...

GRAVE: Error listenerStart 11 sept. 2011 23:37:04 org.apache.catalina.core.StandardContext startInternal GRAVE:Error Starting context [/ gest_project] following ...

90. Can´t load spring.jar from tomcat5.5/share/lib?    stackoverflow.com

I have a set up with 2 VPS's on the same linode (vps provider) data center. The are visible throught internal static ip's. VPS.1.- Apache proxy, that is connected with VPS.2's tomcat ...

91. SPRING AND ECLIPSE SITUATION    stackoverflow.com

I am new to Spring and J2EE, and I'm trying to use Eclipse IDE for my development (which I am also new to). I'm researching how to install Spring server, Tomcat, etc. ...

92. Maven + Tomcat hot deploy    stackoverflow.com

I've searched on the internet for this question and found no single solution. We have a maven project that uses profiles to build artifact that suits dev/qa/prod environtments, does minification of ...

93. Tomcat + Spring and environment variables    stackoverflow.com

In a Spring file I have:

   <bean id="propertyConfigurer" class="org.myapp.MyConfigurator">
        <property name="locations">
        <list>
    ...

94. Icefaces components: Error [status: malformedXML code: 200]: XML Parsing Error    stackoverflow.com

I have a strange problem that happened when I install my application in CentOS. I use tomcat 7, jdk 1.7, spring 3.0.5, springsecurity3.1, Facelets and icefaces 2.1. I developed my application on ...

95. HTML tags not being processed in a velocity file    stackoverflow.com

I have a spring app which uses velocity. There is a quartz scheduler that runs every few minutes and sends out emails. The email's content is generated from a velocity template. ...

96. Spring project in Eclipse - 404    stackoverflow.com

I try to run the app on Tomcat but keep getting this error "The requested resource (/testapp/) is not available." - what might be wrong? I guess my XML setup is ...

97. Ice-face with Tomcat 7 run time error    stackoverflow.com

I have developed an application using iceface 1.8 .My server environment is tomcat 7. When I deploy the application and access the welcome page I,m getting following error.

java.lang.UnsupportedOperationException
    ...

98. Is spring application context reloading via ConfigurableApplicationContext refresh() considered bad-practice    stackoverflow.com

We have a Spring application that is hosted on a shared tomcat instance. Sometimes we have to reload the spring application context but don't want to restart the Tomcat server, because other ...

99. tomcat can not find maven dependencies    stackoverflow.com

A few hours ago I was working on my web application and it was working alright. But somehow a rather strange problem has started occurring and I am getting the following ...

100. Spring app not properly accessible on third party tomcat server    stackoverflow.com

I have a Spring app on localhost running on: Tomcat version: 6.0 JDK version: 1.6 I just moved it to a shared third party server running on: Tomcat version 5.5 JDK version 1.6 Because of this, I ...