tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Re: Tomcat Filter Mapping Issue
Date Sat, 09 Jan 2010 16:58:29 GMT
On 08/01/2010 23:17, Patrick Flaherty wrote:
> Christopher and Charles.
>
> Thanks a lot. I added a ROOT folder off my appBase and cut and pasted
> everything under that ROOT folder
> and now I am getting filter mapping hits with my ft.com ! We are not
> deploying correctly and this sheds all the
> light on that fact.
>
> Curiously I was not able to get to ft.com/WEB-INF/web.xml , I got a 404.
> But I am able to get to other files off the root as expected.
> Maybe Tomcat has it's own filter mapping for /WEB-INF/web.xml ? I could
> not get to any file in /META-INF/* either ?

It's not unexpected.  The contents of those two directories are 
protected from external view quite deliberately.


p


> Anyway, thanks again for your patience and help.
>
> -P
>
>
> On Jan 8, 2010, at 4:06 PM, Christopher Schultz wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Patrick,
>>
>> On 1/8/2010 3:49 PM, Patrick Flaherty wrote:
>>> If I use a host name of ft.com with a appBase of c:/FilterTest then
>>> doesn't c:/FilterTest become my web server root for ft.com?
>>
>> As Chuck points out, no: C:\FilterTest\ROOT is the "server root" for
>> ft.com. Remember, Tomcat isn't a web server: it's an app server.
>>
>>> Is seems to work that way for us although it may not be the correct way
>>> to deploy a web app.
>>
>> I suspect what's happening is that you have a layout like this:
>>
>> C:\FilterTest
>> C:\FilterTest\WEB-INF
>> C:\FilterTest\WEB-INF\web.xml
>> C:\FilterTest\Proofs
>> C:\FilterTest\Proofs\[content]
>>
>> Tomcat, seeing that a directory called \Proofs exists, is deploying it
>> as it's own web application, and the DefaultServlet is serving all your
>> content correctly. Since /Proofs doesn't have a WEB-INF/web.xml file,
>> your filter is not being created and it's not being called.
>>
>> I'll bet that you can also request this file:
>>
>> http://ft.com/WEB-INF/web.xml
>>
>> Here, Tomcat will serve this file that might be expected to be protected
>> because /WEB-INF looks like a (poorly-named) web application and not a
>> proper deployment descriptor directory in a proper web app.
>>
>>> If you deploy an app off of %CATALINAHOME% then doesn't the user have to
>>> type http://my.domainname.com/myapp ?
>>> I want it to hit my app when I type http://my.domainname.com. That is
>>> how it works with our product today.
>>
>> You need to fix your deployments, or nothing is going to make sense. If
>> you want your webapp to be deployed without a leading path (i.e. on /
>> instead of /foo), then you need to name your webapp ROOT.war (or put it
>> in the ROOT subdirectory under your appBase directory).
>>
>>> It starting to sound like the complete URL has to be part of
>>> %CATALINAHOME%'s path to get a filter hit ?
>>
>> No, this is not true. If your webapp is properly deployed, your relative
>> URIs will be properly mapped and your filter will get called.
>>
>> - -chris
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.10 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAktHnmUACgkQ9CaO5/Lv0PCjzQCgvPHG6/1ZwJ0iyZrHj/coqoLW
>> R20AoJJ0RXVvIdMHJ+mofNRo92EvUu0e
>> =8MkQ
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message