tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BugRat Mail System <tomcat-b...@cortexity.com>
Subject BugRat Report #58 has been filed.
Date Fri, 01 Sep 2000 07:57:34 GMT
Bug report #58 has just been filed.

You can view the report at the following URL:

   <http://znutar.cortexity.com:8888/BugRatViewer/ShowReport/58>

REPORT #58 Details.

Project: Tomcat
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: high
Severity: non-critical
Confidence: public
Environment: 
   Release: 3.1
   JVM Release: IBM JDK 1.3
   Operating System: Linux (Mandrake)
   OS Release: 7.1 (kernel 2.2.15)
   Platform: x86 (Athlon)

Synopsis: 
multiple instances of tomcat running on different ports erroniously over write each others
JSP metafiles by both using the work/localhost_8080/ forlder rather than naming the folder
of the port they are actually using

Description:
I am running two instances of tomcat so that I can 
can have two people on the same machine develop a java
project.  Here are my server.xml files.
----------------------------------------------------------
adam.xml
----------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>

<Server>
    <!-- Debug low-level events in XmlMapper startup -->
    <xmlmapper:debug level="0" />

    <Logger name="tc_log" 
            path="logs/tomcat.log"
            customOutput="yes" />

    <Logger name="servlet_log" 
            path="logs/servlet.log"
            customOutput="yes" />

    <Logger name="JASPER_LOG" 
        path="logs/jasper.log"
            verbosityLevel = "INFORMATION" />

    <ContextManager debug="0" workDir="work" >
        <!-- ContextInterceptor className="org.apache.tomcat.context.LogEvents" / -->
        <ContextInterceptor className="org.apache.tomcat.context.AutoSetup" />
        <ContextInterceptor className="org.apache.tomcat.context.DefaultCMSetter" />
        <ContextInterceptor className="org.apache.tomcat.context.WorkDirInterceptor" />
        <ContextInterceptor className="org.apache.tomcat.context.WebXmlReader" />
        <ContextInterceptor className="org.apache.tomcat.context.LoadOnStartupInterceptor"
/>
        <!-- Request processing -->
        <RequestInterceptor className="org.apache.tomcat.request.SimpleMapper" debug="0"
/>
        <RequestInterceptor className="org.apache.tomcat.request.SessionInterceptor" />
        <RequestInterceptor className="org.apache.tomcat.request.SecurityCheck" />
        <RequestInterceptor className="org.apache.tomcat.request.FixHeaders" />

        <Connector className="org.apache.tomcat.service.SimpleTcpConnector">
            <Parameter name="handler" value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
            <Parameter name="port" value="8082"/>
        </Connector>

        <Connector className="org.apache.tomcat.service.SimpleTcpConnector">
            <Parameter name="handler" value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
            <Parameter name="port" value="8009"/>
        </Connector>

        <Context path="" docBase="/home/adam/tc/server/html" debug="0" reloadable="true"
>
        </Context>

    </ContextManager>
</Server>
------------------------------------------------------------
work.xml
------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>

<Server>
    <!-- Debug low-level events in XmlMapper startup -->
    <xmlmapper:debug level="0" />

    <Logger name="tc_log" 
            path="logs/tomcat.log"
            customOutput="yes" />

    <Logger name="servlet_log" 
            path="logs/servlet.log"
            customOutput="yes" />

    <Logger name="JASPER_LOG" 
        path="logs/jasper.log"
            verbosityLevel = "INFORMATION" />

    <ContextManager debug="0" workDir="work" >
        <!-- ContextInterceptor className="org.apache.tomcat.context.LogEvents" / -->
        <ContextInterceptor className="org.apache.tomcat.context.AutoSetup" />
        <ContextInterceptor className="org.apache.tomcat.context.DefaultCMSetter" />
        <ContextInterceptor className="org.apache.tomcat.context.WorkDirInterceptor" />
        <ContextInterceptor className="org.apache.tomcat.context.WebXmlReader" />
        <ContextInterceptor className="org.apache.tomcat.context.LoadOnStartupInterceptor"
/>
        <!-- Request processing -->
        <RequestInterceptor className="org.apache.tomcat.request.SimpleMapper" debug="0"
/>
        <RequestInterceptor className="org.apache.tomcat.request.SessionInterceptor" />
        <RequestInterceptor className="org.apache.tomcat.request.SecurityCheck" />
        <RequestInterceptor className="org.apache.tomcat.request.FixHeaders" />

        <Connector className="org.apache.tomcat.service.SimpleTcpConnector">
            <Parameter name="handler" value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
            <Parameter name="port" value="8081"/>
        </Connector>

        <Connector className="org.apache.tomcat.service.SimpleTcpConnector">
            <Parameter name="handler" value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
            <Parameter name="port" value="8008"/>
        </Connector>

        <!-- example - how to override AutoSetup actions -->
        <Context path="" docBase="/home/work/tc/server/html" debug="0" reloadable="true"
>
        </Context>

    </ContextManager>
</Server>
------------------------------------------------------------
as you can see the only difference is the docBase
and the port they listen on.  Now I then browse to
http://localhost:8081/index.jsp and http://localhost:8082/index.jsp
and get the same page even tho the .jsp's are different.
If it do a `find .` in the work directory this is what I 
see.

[root@angband work]# find .
.
./localhost_8080%2Fexamples
./localhost_8080%2Ftest
./localhost_8080%2Fadmin
./localhost_8080
./localhost_8080/_0002findex_0002ejspindex_jsp_0.java
./localhost_8080/_0002findex_0002ejspindex.class

As you can see, only one java file has been
produced not two, it happens to be the one 
corosponding to the first page I checked.  Also note
that the port is 8080, the default.  Had the real
ports been used "8081" and "8082" there would
not be a collision and this would have worked.
I am no tomcat kung fu master but this looks really
fishy to me. 

Lastly I deletee the work directory and got this
message on both browsers.


Error: 404

Location: /index.jsp

JSP file "/usr/local/jakarta/build/tomcat/work/localhost_8080/_0002findex_0002ejspindex_jsp_0.java
(No such file or directory)" not found 

Confirming that they are both indeed looking for the same file.

Grepping the code for 8080s was to no avail,
I need to leave this to someone who knows the code base.

Thanks a lot.


Mime
View raw message