You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Swart, James (Jim) ** CTR **" <sw...@agere.com> on 2001/11/19 21:27:09 UTC

RE: Mapping "/servlet/" URLs to Tomcat 4.0.1 from Apache via mod_ webapp

This brings up a question I have been dying to know an official answer to.
I, also, always put "reloadable=true" in my server.xml file for my webapps,
to prevent having to bounce tomcat after making changes.

But, imagine if you have to bounce apache AND tomcat when you make changes
(I believe this only holds true for tomcat 3.2.2 (I don't know if 4.0.1
fixed this yet) as if you are using the auto-generated conf files that
apache read's in on startup, you would need to bounce both in order for it
to work properly.

I created a webapp called /java and I proxy /java in my Virtual Host to the
tomcat 4.0.1 port the connector runs on.  Thus far, I haven't encountered
any issues, and I NEVER EVER have to bounce apache for a tomcat issue.

Is there a better way, and did 4.0.1 fix this?

¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢
¢ J a m e s   B   S w a r t
¢ Agere Systems - Colorado Design Center
¢ Site Systems Administrator & IT Focal Point
¢ VOICE: 720-494-2330 ¿ FAX: 720-494-2331
¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢


-----Original Message-----
From: David Smith [mailto:dns4@cornell.edu]
Sent: Monday, November 19, 2001 9:38 AM
To: Tomcat Users List
Subject: Re: Mapping "/servlet/" URLs to Tomcat 4.0.1 from Apache via
mod_webapp


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:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>