Chris Hanne

Greenhorn
+ Follow
since Jun 20, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Chris Hanne

OK I figured it out.

There are attributes that can be set in the Host definition in server.xml to turn off the default behavior. I tried setting them and everything works fine. Nothing is deployed and the classpath is fine. My apache virtual host and tomcat virtual host can now be in public_html.

<Host name="localhost" appBase="webapps"
unpackWARs="false" autoDeploy="false" deployOnStartup="false" >
</Host>

More details are in:

http://tomcat.apache.org/tomcat-6.0-doc/config/host.html

I think I want these turned off in production anyway.

13 years ago
Yes, I belive you are correct it is treating each directory as a webapp. For some reason this did not happen on the older server. I coppied the <Host> sections from the old server's server.xml. There is a difference in tomcat versions. Old was tomcat 5 and new is tomcat 6.

I think if I move everything into a folder called ROOT things will be OK but I did not have to do that on the old server. The apache document root was /home/webadmin/public_html and the tomcat host appbase was the same. I think I need here to set up

Apache: /home/webadmin/public_html/ROOT
Tomcat: /home/webadmin/public_html/ROOT

I have about 12 virtual hosts so that is a lot of moving files. I wonder if there is a param somewhere to tell tomcat not to deply and treat /home/webadmin/public_html ad the ROOT.

Thanks
13 years ago
Hi,

I am not at all new to java, jsp, or struts. This was a test JSP and I put the code right into the JSP to test why it was not working when passed to the JSP in the request obj after forwarding from the struts action. Anyway, none of this has nothing to do with my question.

As I stated the clases are in the proper directory structure to match the package under WEB-INF/classes. After posting this last night I looked at the tomcat logs and it looks like tomcat is deploying every directory in my app as a seperate webapp. To test this I moved the JSP to the root and it works. Now the question is why is tomcat deploying every directory under my virtual host as a webapp.

Thanks.

13 years ago
I have a fresh CentOS VPS server. I installed JDK 1.6.20 and tomcat-6.0.26. I have about 7 virtual hosts that I moved over from another server. When I try to access a page that uses java classes I get a jsp compile error.

The RinkFactory class is in the proper directory for it's package inside WEB-INF/classes/com/rinks

I checked the classpath for the JSPs using:
<%=application.getAttribute("org.apache.catalina.jsp_classpath").toString()%>
and it does list the WEB-INF/classes as part of the classpath.

This code works on my local machine as well as my old server. I get a similar error for other classes on other jsp pages and cannot figure out why the classes are not found.

Thanks!
13 years ago