You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Alexey V. Meledin" <av...@webclub.ru> on 2000/04/02 14:16:42 UTC

Several questions

Hi!

Apache 1.3.12 with mod_charset.so + FreeBSD 3.3. + Tomcat 3.1b +
mod_jserv.so 1.1b3
I have NameVirtualHosts

a. As I understand I can't has two equal Context due to JVM.
b. Due to servlet specification there is resolve procedure based on
RequestURI - ContextName => servlet-mapping.

So, if I have:
=============================
server.xml:
<Context path="/site1" docBase="/usr/local/httpd/htdocs/site1" debug="0" reloadable="true" >
</Context>
<Context path="/site2" docBase="/usr/local/httpd/htdocs/site2" debug="0" reloadable="true" >
</Context>

web.xml
servlet-mapping = /servlet/*

httpd.conf
VirtualHost1:
ApJServMount /site1/servlet /site1

VirtualHost1:
ApJServMount /site2/servlet /site2
=============================
Questions:
1. If I do:
ApJServMount /servlet /site1
it doesn't work and specification say to me that it is right.
But where is the way to made such mapping? Only using Apache
mod_rewrite, mod_action and so on, i think.
Right?

2. In other cases I frequently need to start servlets under / in each
virtual host. IS the decision  equal to question 1?

3. The most secure and right virtual host tree:
+virtual/
        +-/htdocs  - as apache files
        +-/tomcat  - all relating to tomat
          +-/WEB-INF
          ............

Then map servlets to http://virtual/servlet/ and via apache directives
manualy rewrite all needed servlets elsewhere I want. To
http://virtual/servletname, for example.
Right?

And I do that in all my virtual hosts, allowing users to use Apache
Config Files .htaccess

4. Can I change and commit web.xml file at virtual host without Tomcat
full restart?

Alexey V. Meledin <av...@webclub.ru>
> InterForge Developers Group,  St-Petersburg, Russia
New: http://www.crossroad.ru; http://www.garoway.com
> > > > > > "InterForge to Forge Ahead" > > > > > > >