-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Seems,
On 3/20/14, 1:52 PM, Seema Patel wrote: > > >> 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 XML uses DTDs or Schemas for semantic validation. http://en.wikipedia.org/wiki/Document_type_definition http://en.wikipedia.org/wiki/XML_Schema_%28W3C%29 Your XML files should either have a <!DOCTYPE> at the top indicating which DTD to use for validation or an xmlns[:namespace] definition at the top to use for Schema validation. Example of DTD: <!DOCTYPE mbeans-descriptors PUBLIC "-//Apache Software Foundation//DTD Model MBeans Configuration File" "http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd"> (Note that the SYSTEM id above -- the URL -- actually does not point to a valid DTD, so it may not work. Tomcat's mbeans-descriptors.xml files do not actually declare any DTD, but this is the DTD to which those files are expected to adhere.) Example of Schema: <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5" metadata-complete="true"> Many XML editors will already know how to validate as long as the definitions are in the files. Eclipse already does this, but sometimes it's just stupid and tells you there is no DTD/Schema even though there clearly is one. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTKzSdAAoJEBzwKT+lPKRYjVEP/3/sP9tCM/pL+7H7Ani8GKdk bYGCMbO08+VBVHr8eoU8dc33ScQ7jwqw86fGmvTjzJEtsZQyHtL1jkouTxiSMd9U Qsv/sZcnR/JlY9rixo4wO05Oh/pqX6QQ3QSlaKTvKYELS0dN2RFTRcHYfWB99tll wdHE5mgytreUG8wpURGjCroftQLvrw+NxlD1GqAL6x+tt9kScEe1skWO2E95QKjG 5VtabDQJusfPzjCA0vj4bRILJdFPf5q9hEpBumvqXoMC2pJbYXdLWCtTB8JbVRtn FKex92ygdZhnIhzVgjAFNNbc/QacXgwdT33FmhpLBeMm9ZVOhQWehLtRBu/Ugdni 6af60lU6ScGJ7cDZZS1uVvGdXsnlg3up9Fy9GXokHlI91GoBE5sar7BzdsA+OMzb At+evpXwuhbyiyDbumoqdLZFb7xIXur4diw04UeSIaFNJVUdtkF2VoOrNW0+8W/V vEzj0b2V5CPJTPgg3AIuuF//2r0FLdRSZMUVaF0/idneyujtH4o3Uc5jBWcVZqCU 2eDNuDVUdTXwUlwOmL6jgF4C8dC9REJ5Lw5A9scwiaFaXt+c70UCKIXfI0LCdBsT k19KaBjbyRJyb5u9qE2bQQBQETvz4iCTJ/lUj3GDVtnsjeoeQxzJx0AtzAgSyVL5 U+Gxnbt3JejhsCmkGfib =tcq7 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org