You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Harippriya Sivapatham <hs...@pingtel.com> on 2001/06/13 21:29:40 UTC

Accessing files in one context from another

Hi,
    I would like to know how i could access the class files in one context
from JSP/
I have two war files: mypingtel.war and pingtel.war. When deployed, the
directory structure would be:

<tomcat home>/webapps/mypingtel/ and
<tomcat home>/webapps/pingtel/

I have two virtual hosts defined:
my.pingtel.com vhost --> <tomcat home>/webapps/mypingtel/
pingtel.com  vhost --> <tomcat home>/webapps/pingtel/

Consider a JSP file - index.jsp in http://www.pingtel.com/index.jsp
Consider a java program - test.java in <my.pingtel.com
context>/WEB-INF/classes/<package structure>/test.class

I want the index.jsp file to be able to access the test.class. How could i
do that?

Another question is:
I am planning to have two virtual hosts in Apache. So, should i also define
the virtual host in the server.xml file of tomcat?


thanks a lot,
Harippriya

Pingtel Corporation,
Woburn, MA - 01801

Email: hsivapatham@pingtel.com
Phone: 781-938-5306 x 143