Problem migrating Spring Web App from tomcat 5.5 to tomcat 6.0


Problem migrating Spring Web App from tomcat 5.5 to tomcat 6.0



I have a spring web application which has been working fine on tomcat 5.5. I've attempted to deploy the same web app to a tomcat 6 container and come up against some issues.

The main two problems I've had are relating to configuring the container for jstl and getting the spring security login to work properly.

I believe I've solved the jstl configuration issue by including the jstl-1.2.jar lib from here in the $CATALINA_HOME/lib directory (although it really does appear to be strange that it is so difficult to find out how to get this working).

The main problem now is that when I attempt to log in using form based authentication, I get an HTTP 404 error when the login form is submitted to "j_spring_security_check".

I have set up the filter in the web.xml file as per the spring security documentation but it appears that tomcat isn't invoking this as expected.

I hope someone can share their experience here as I'm certainly missing something fundamental in my configuration.

Thanks.

Update: While trouble-shooting based on responses here, one of the things I ended up doing was downloading a fresh copy of tomcat 6.0.18 and ensured that I had the jstl-1.2.jar file in the WEB-INF/lib dir. Funnily enough, now the app seems to be working fine.

I'm a little stumped but I'll now try to track down the difference in the two tomcat installs that was causing the error and post a further update here.

Thanks for the responses to this guys.




jersey integration with spring

1:



How can I use Spring XML configuration to set a bean property with list of all beans of a certain type?
if you use maven, you need for jstl :.
Need Spring version# - only have spring.jar file
    <dependency>         <groupId>javax.servlet</groupId>         <artifactId>jstl</artifactId>         <version>1.2</version>         <scope>runtime</scope>     </dependency> 


Spring JMS Message Listener Container


How to have a class use applicationContext beans?

2:



Spring, JDBC & MultiThreading
It's too hard to tell what's wrong, based on the information you provided..
“Recycling” names within a spring application context
Common shared libraries used to go in common/lib in Tomcat 5.x and earlier; now they belong in the /lib directory..
Java: How do you declare nested map in spring framework?
Personally, I prefer putting as much as I can in the WEB-INF/lib of my deployments, because I don't want to have to depend on having a server set up in a particular way.

If the classloader can find all the JARs it needs in my WAR file, I'm happy.. Both Tomcat 5.x and 6.x use the JSTL version 1.2 JAR, so that's common.

It's the location that's changed.

I'd recommend building your WAR file with the JARs you need in WEB-INF/lib.. If you're using Spring Security, the module formerly known as ACEGI, make sure you have those JARs available, too.. An HTTP 404 - sure it's not just a deployment or URL issue?. Try turning Spring security off by commenting it out of the configuration file and restarting.

Your app should just come right up if everything else is well.

Then you'll know that you have to concentrate on.

If not, you can continue to search for what else is awry..


3:


I agree w/ duffymo, not enough info.

Try turning on verbose logging in your application and see if there's anything obvious in the logs..



76 out of 100 based on 66 user ratings 766 reviews

*