-----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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to