You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mladen Adamovic <ad...@blic.net> on 2006/05/18 22:53:59 UTC

Virtual Host and classpath related problem on deployment

My application runs fine on my local server (Tomcat bundled with 
NetBeans 5.0).

But, I have problem with the virtual host on deployment computer.
Lets say I have ./webapps/mysite
and beneath it I have more directories with JSP's  like
./webapps/mysite/widgetA

In my server.xml I have something like :
      <Host name="www.mysite.com" debug="0" appBase="webapps/mysite"
      unpackWARs="false" autoDeploy="true">
              <Context path="" docBase="."/>
      </Host>

Everything works fine when trying to access http://www.mysite.com, but 
when I try to access
http://www.mysite.com/widgetsA/index.jsp

I've got classpath related problem :

*exception*

org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 14 in the jsp file: /index.jsp
Generated servlet error: MyCommonClass cannot be resolved

So the problem is that JSPs in  mysite.com/widgetA/* don't look at the 
shared classes in the same directory as mysite.com.

How I can solve this problem? I tried to add some more <Context> under 
my host, but it don't work.



-- 
Mladen Adamovic
http://home.blic.net/adamm
http://www.shortopedia.com 
http://www.froola.com