You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Brill Pappin <br...@jmonkey.com> on 2000/02/02 11:38:19 UTC

Re: recommend virtual hosts?

With Contexts, there is no need to use separate ports. Each context has its
own application settings and classes/servlets directory and can be
completely separate.

i.e. on my machine, some users have a special context for themselves.
The following is the context for my own home directory:

<Context path="/~bpappin" docBase="/export/home/bpappin/public_html"
            defaultSessionTimeOut="30" isWARExpanded="true"
            isWARValidated="false" isInvokerEnabled="true"
            isWorkDirPersistent="false"/>

My public_html directory have a dir called WEB-INF and that has a web.xml
file and a classes directory.
To call a servlet in this context, I have to use
/~bpappin/servlet/com.mypackage.MyServlet

What you would have to check, (because I don't know for sure) is that the
classes in this directory are not visible to all the contexts...

However, at the moment Tomcat does *not* do servlet reloading, so you might
not want to use it as a development platform yet. Servlet reloading is in
the works now... and will be available at a later date.


- Brill Pappin
  www.jmonkey.com


----- Original Message -----
From: Peter Heinrich <pe...@pobox.com>
To: <ge...@jakarta.apache.org>
Sent: Monday, January 31, 2000 9:57 PM
Subject: recommend virtual hosts?


> I just switched from JServ/GNUJSP to Tomcat, did I make a mistake?
>
> We have 5 developers creating a product on one Linux server.  With
> JServ/GNUJSP, each developer has his own work area--corresponding to a
> servlet zone--accessible on a different port.  With Tomcat, this appears
to
> be impossible because contexts must be named uniquely irrespective of
> virtual hosts.
>
> Could this be true?
>
> For example, say each developer modifies Servlet1 (in the "mktg"
> context/servlet zone).  With JServ/GNUJSP, we can specify a different
> document base depending on the virtual host:
>
> http://www.domain.com:7100/mktg/Servlet1  -->  developer 1's version
> http://www.domain.com:8100/mktg/Servlet1  -->  developer 2's version
> http://www.domain.com:9100/mktg/Servlet1  -->  developer 3's version
>
> With Tomcat, the URL changes:
>
> http://www.domain.com:7100/mktg_dev1/servlets/Servlet1  -->  developer 1's
> version
> http://www.domain.com:8100/mktg_dev2/servlets/Servlet1  -->  developer 2's
> version
> http://www.domain.com:9100/mktg_dev3/servlets/Servlet1  -->  developer 3's
> version
>
> You can imagine the nightmare...  I'd love to hear how others have set up
> their development environments.  Any suggestions would be greatly
> appreciated, especially since I've seen this question go unanswered
several
> times--it was even deleted from the Faq-o-matic.
>
> peter
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org
>