Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with Tomcat due to Debian?

Status
Not open for further replies.

abenstex

Programmer
Jan 9, 2005
47
DE
Hello everyone,

I am pretty new to the whole Tomcat thing, but nevertheless i have to install a webapp under Debian 3.1 with Tomcat 4.1 running. Unfortunately i am having some problems that I don't know how to solve.

1: unfortunately i keep getting the following error:

Servlet /tomcat-docs threw load() exception
javax.servlet.ServletException: Service not available (propertyFile not loadable:Can't find properties file /usr/share/tomcat4/webapps/tomcat-docs/../webapps/ROOT/conex/WEB-INF/properties/cp.xml


What annoys me about it is that the file cp.xml exists in the directory /webapps/ROOT/conex/WEB-INF/properties. From what i get from the above error output is that Tomcat is looking for the file under /tomcat4/webapps/webapps/ROOT/conex/properties. How does this happen and how can I change this? Does it depend on the source code, the tomcat configuration or the OS (Debian)?

2. Actually I know that webapps should not be installed under the ROOT directory but in the webapps directory instead. Therefore, as far as i know, I would have to add a virtual context to the server.xml file in the conf/ folder. So I tried to change this and added the following to the server.xml file:
Code:
         <Context path="/conex" docbase="/usr/share/tomcat4/webapps/conex" debug="0" reloadable="true" />
But after doing that the server did not want to start anymore. Another <Context> element, which is Debian dependent, is:
Code:
<Context path="/tomcat-docs" docBase="tomcat-docs" debug="0">
            <Resources className="org.apache.naming.resources.FileDirContext"
                       allowLinking="true" />
         </Context>
Could it be that this interferes with my changes? Or are my changes completely wrong in the first place?

I appreciate any help/advive...
 
Tomcat is written in Java - which is platform independant - there is no "Debian" only config for Tomcat.

I would change your "conex" webapp Context entry to this for starters :

<Context path="/conex" docbase="/usr/share/tomcat4/webapps" debug="0" reloadable="true" />

--------------------------------------------------
Free Database Connection Pooling Software
 
Well, i changed the context attribute as you said, but it didn't help at all. Tomcat still does not want to start after the change
 
And besides I still believe that there are some Debian specific issues otherwise there wouldn't be these lines by default in the server.xml:

<!-- Allow symlinks for the tomcat-docs webapp. This is required in the Debian packages to make the Servlet/JSP API docs work. -->
<Context path="/tomcat-docs" docBase="tomcat-docs" debug="0">
<Resources className="org.apache.naming.resources.FileDirContext"
allowLinking="true" />
</Context>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top