tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: Mapping "/servlet/" URLs to Tomcat 4.0.1 from Apache via mod_webapp
Date Mon, 19 Nov 2001 16:38:03 GMT
It's important to note on mod_webapp that it's an application centered 
connector and handles requests with the application in mind.  In your case, 
if you use

WebAppDeploy ROOT warpConnection /servlet

in your Apache config, then the URL looks something like

http://localhost/servlet/servlet/myclass.class.

To avoid that and have the URL something like

http://localhost/servlet/myclass.class, 

you'll have to make use of servlet mappings in ROOT/WEB-INF/web.xml.  There 
are good docs online for this including the servlet spec itself.  I would 
think the jakarta site would point you in the right direction.

Hope this helps.

--David Smith

On Sunday 18 November 2001 07:22 pm, you wrote:
> Greetings everyone,
>
> While still using Tomcat 3.2.1 and Apache 1.3.12 on the web server I
> maintain, I have been asked to reproduce a similar environment on a
> notebook running under Windows 2000 for presentation purposes. I installed,
> among others, Apache 1.3.20, mod_webapp and Tomcat 4.0.1.
>
> In the Tomcat 3.2.1 environment (and mod_jk), I use the following lines in
> httpd.conf:
>
> JkMount /servlet/* ajp13
> JkMount /svl/servlet/* ajp13
>
> So URL requests including /servlet/ or /svl/servlet are handed over to
> Tomcat; this is working as intended.
>
> In the new environment, I have the following lines in httpd.conf:
>
> WebAppDeploy svl warpConnection /svl/ - this works - and
> WebAppDeploy servlet warpConnection /servlet/ - this produces "Resource not
> available" error pages, the ones with the light blue boxes, about myclass
> when accessed via 127.0.0.1/servlet/myclass.class.
>
> WebAppDeploy ROOT warpConnection /servlet/ doesn't work either, as
> expected.
>
> 127.0.0.1/svl/servlet/myclass.class, however, produces the right output,
> and so do 127.0.0.1:8080/svl/servlet/myclass.class and
> 127.0.0.1:8080/servlet/myclass.class, because the root and svl contexts
> both point to the same docbase - in the default host for the tomcat
> standalone service as well as in the default host for the mod_webapp
> connector. I have tried this pattern on several other URL/context
> combinations, and they worked as required, but "servlet" seems to be the
> keyword Tomcat doesn't accept as a servlet indicator - in V4.0.1, that is.
>
> WebAppDeploy ROOT warpConnection /
> also works, but this way, all web traffic gets relayed to Tomcat, which
> disables my Apache PHP module and Perl, so that is not an option.
> So, can anyone tell me how to reproduce the behaviour I have on the web
> server on the Win2000 notebook? It is important for several webapps to be
> able to access classes without the svl/ in the URL. Any help is  greatly
> appreciated.
>
> TIA
> Matthias Hupp
>
>
>
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message