Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Contexts in Tomcat 6, why does not work

Artur Rataj

2007-02-08


Hello. I upgrade some webapp to Tomcat 6. The app has three contexts,
one for dynamic pages, one for some disk directory.

I put them into the server.xml file on the new Tomcat, into the Host
part. Here are the first two contexts, that is, one for the servlets
and one for some disk directory.

    <Context path="" docBase="library" debug="0"
          reloadable="true">
      <Logger className="org.apache.catalina.logger.FileLogger"
             prefix="localhost_examples_log." suffix=".txt"
           timestamp="true"/>
      <Ejb  name="ejb/EmplRecord" type="Entity"
          home="com.wombat.empl.EmployeeRecordHome"
         remote="com.wombat.empl.EmployeeRecord"/>
      <Environment name="maxExemptions" type="java.lang.Integer"
              value="15"/>
      <Parameter name="context.param.name" value="context.param.value"
             override="false"/>
      <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
            type="javax.sql.DataSource"/>
    </Context>

    <Context path="/informacja_ekspresowa"
docBase="/home/library/islib/Informacja_Ekspresowa/"
          reloadable="true">
      <Logger className="org.apache.catalina.logger.FileLogger"
             prefix="localhost_examples_log." suffix=".txt"
           timestamp="true"/>
      <Ejb  name="ejb/EmplRecord" type="Entity"
          home="com.wombat.empl.EmployeeRecordHome"
         remote="com.wombat.empl.EmployeeRecord"/>
      <Environment name="maxExemptions" type="java.lang.Integer"
              value="15"/>
      <Parameter name="context.param.name" value="context.param.value"
             override="false"/>
      <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
            type="javax.sql.DataSource"/>
    </Context>

The first context seems to be working fine, the second one does not
work even that the given directory exists.

The error message is:

HTTP Status 404 - /informacja_ekspresowa/

type Status report

message /informacja_ekspresowa/

description The requested resource (/informacja_ekspresowa/) is not available.
Apache Tomcat/6.0.9


Why the second context does not work? The respective directory
/home/library/islib/Informacja_Ekspresowa exists, and the user that
runs tomcat can read from it.


Thanks,
Artur

---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.