> Date: Thu, 20 Mar 2014 21:12:09 +0400 > Subject: Re: HttpServletRequest Tomcat 5.5.29 to 7.0.52 > From: knst.koli...@gmail.com > To: users@tomcat.apache.org > > 2014-03-20 20:55 GMT+04:00 Seema Patel <seema...@hotmail.com>: > > I think I have fixed the error I had. I have downgraded to Java 6 update > > 45, to see if it worked on there, but it didn't. > > I stayed with Java 6 to try and resolve the issue. Basically in my > > WEB-INF/web.xml file I have the following: > > > > <filter-mapping> > > <filter-name>Auth Filter</filter-name> > > <url-pattern>*.jsp</url-pattern> > > <url-pattern>*.do</url-pattern> > > <dispatcher>REQUEST</dispatcher> > > </filter-mapping> > > > > All requests go to the doFilter() function. In Java 5.5.29 it wasn't > > sending .jsp requests to the the doFilter, even though the above is in the > > web.xml file. > > In Java 6 and above, it sends the .jsp file to be processed as well. So if > > I comment out or take out the <url-pattern>*.jsp</url-pattern> line, my > > code works. > > > > I don't know what's changed in the Java 6 code for this to not work. > > Does anyone know why this is so I have an understanding of it? > > > > Thanks again to all that have helped with this, I know I threw out multiple > > questions, just didn't want to leave anything out :) > > > > I guess s/Java/Tomcat/ in several places above. > > Support for multiple <url-pattern>s did not exist in old versions of > Servlet Specification, so only one of the patterns would work. > > Support for <dispatcher> also did not exist in old versions, but > "REQUEST" is the default value here, so there is no difference. >
If <dispatcher> didn't exist and support for multiple <url-pattern>s did not exist in older versions, then I don't know why the previous developers used it (I know this is nothing to do with you all). > You can validate your web.xml file against DTD or schema it uses in > any decent XML editor. > My knowledge of all this isn't very good, could you please tell me what you mean by DTD or schema and could you give me an example of some XML editors I could use? Thanks > (You can enable validation of web.xml in any version of Tomcat 7 and later. > E.g., by setting > org.apache.catalina.STRICT_SERVLET_COMPLIANCE=true > http://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html#Specification > > When validation is enabled, Tomcat will refuse to deploy an > application with broken web.xml > ) > Thanks for this, I'll set it and see what happens. > Best regards, > Konstantin Kolinko > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org >