-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Patrick,
On 1/10/2010 1:45 PM, Patrick Flaherty wrote: > I do not dispute you at all, don't get me wrong. It's even been proven > in my testing that this is > what made filter mapping work for me. > > If you have a link that illustrates this I would appreciate you sharing > it. Then I can rest knowing > this is how we should have been doing it from day one. I think one of the things that is clouding the issue is Tomcat's "desire" to automatically deploy anything that looks like it might be a webapp. For instance, if you have a <Host> with appBase=c:\app1, where c:\app1 looks like this: WEB-INF/web.xml Proofs/ [whatever] ...then what Tomcat does is treat WEB-INF as a web application and deploys it under the /WEB-INF URL path (it's possible that Tomcat explicitly checks for this insane configuration and avoids exposing /META-INF, so this claim may not be entirely correct). Tomcat will definitely deploy the "Proofs" directory under /Proofs. Since c:\app1\Proofs does not have a WEB-INF/web.xml, it gets the default deployment descriptor, which is basically just *.jsp maps to the JSP Servlet and everything else will get served using the DefaultServlet, which just serves files directly just like a standard web server. In this situation, c:\app1 appears to work like a traditional web server's "document root" for the <Host>. Then, you added a filter mapping under C:\app1\WEB-INF\web.xml and it didn't work: that's because /Proofs was a different web application and the web.xml file you modified had nothing to do with the Proofs webapp that Tomcat deployed for you. Moving everything into c:\app1\ROOT mounts the whole shebang on /, which is what you had expected all along. As to your questions about multiple webapps and URL prefixes: If you want to deploy several webapps, they must each have a separate context and separate top-level URL mapping (like, app1 is on ROOT (or "/"), app2 is under /app2, app3 is under /app3, etc.). There is no way to deploy multiple webapps to a single context. One solution would be to merge the webapps into a single webapp and deploy it once, most likely as ROOT. Another possibility is to create a ROOT webapp that gives the visitor a menu of options that allows them to pick their webapp without having to remember the URL mapping (say "/app2"). Not only is this all explicitly defined in the Java Servlet Specification, it's the only thing that makes any sense at all. If you feel like you have a reasonable use case for deploying multiple webapps into a single URL space, I'd love to hear it. I suspect that any scenario you describe can be easily configured in a sane way... as long as you are thinking about webapps and deployments correctly. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAktM3NgACgkQ9CaO5/Lv0PBKOgCgnF60uonFMrSodcp1zCrto1x4 G0oAoJlmWTcplSyTn5Sm5xS6fd8WVwcD =wJde -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org