You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rhugga <to...@echeeba.com> on 2003/10/14 02:08:17 UTC

Problem Using Tomcat as a JSP Engine

I am running Apache 2.0.47 and Tomcat 4.1.27 on Solaris 9 using 
j2sdk1.4.2_01. I only want to use tomcat for JSP and servlets using a 
local unix socket for communication. This much is working as far as I 
can tell. I am using the jk2 connector.

Apache: /usr/local/apache2
Tomcat: /usr/local/jakarta-tomcat-4.1.27

I have the following virtual host defined in httpd.conf:

<VirtualHost *>
   ServerName    se.mydomain.com
   ServerAdmin   webmaster@mydomain.com
   ErrorLog      /usr/local/apache2/logs/error.log
   TransferLog   /usr/local/apache2/logs/access.log
   DocumentRoot  /usr/local/apache2/htdocs/SE
   <Location "/*.jsp">
         JkUriSet worker ajp13:unixsocket
   </Location>
</VirtualHost>

I have the following defined in server.xml:

<Host name="se.mydomain.com" debug="5"
   appBase="/usr/local/apache2/htdocs/SE"
   unpackWARs="true" autoDeploy="true">

    <Context path="" docBase="/usr/local/apache2/htdocs/SE" debug="5"
       reloadable="true" />

    <Valve className="org.apache.catalina.valves.AccessLogValve"
            directory="logs"  prefix="se_access." suffix=".log"
            pattern="common" resolveHosts="false"/> 
                                            </Host>

I have the following JSP file: /usr/local/apache2/htdocs/SE/test.jsp:
<HTML>
<BODY>
<% out.println("Testing\n"); %>

When I request http://se.mydomain.com/test.jsp, I get an error 404 (from 
the Tomcat server, not apache)

I get this in /usr/local/apache2/logs/access.log:
65.120.33.195 - - [13/Oct/2003:16:46:17 -0700] "GET /test.jsp HTTP/1.1" 
404 692

I get this in /usr/local/tomcat-4.2.27/logs/localhost2003-10-13.log

2003-10-13 16:43:22 SingleSignOn[localhost]: Process request for '/test.jsp'
2003-10-13 16:43:22 SingleSignOn[localhost]:  Checking for SSO cookie
2003-10-13 16:43:22 SingleSignOn[localhost]:  SSO cookie is not present
2003-10-13 16:43:22 StandardHost[localhost]: Mapping request URI '/test.jsp'
2003-10-13 16:43:22 StandardHost[localhost]:   Trying the longest 
context path prefix
2003-10-13 16:43:22 StandardHost[localhost]:  Mapped to context ''

Here is the debug output from tomcat/logs/catalina2003-10-13.log:

2003-10-13 16:46:17 CoyoteAdapter  Requested cookie session id is 
B22237FB558A0FECFBAF093593BFFD07
2003-10-13 16:46:17 RequestDumperValve[Standalone]: REQUEST URI 
=/test.jsp
2003-10-13 16:46:17 RequestDumperValve[Standalone]:           authType=null
2003-10-13 16:46:17 RequestDumperValve[Standalone]:  characterEncoding=null
2003-10-13 16:46:17 RequestDumperValve[Standalone]:      contentLength=0
2003-10-13 16:46:17 RequestDumperValve[Standalone]:        contentType=null
2003-10-13 16:46:17 RequestDumperValve[Standalone]:        contextPath=
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
cookie=JSESSIONID=B22237FB558A0FECFBAF093593BFFD07
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
header=accept=*/*
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
header=accept-language=en-us
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
header=accept-encoding=gzip, deflate
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
header=user-agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 
.NET CLR 1.1.4322)
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
header=host=se.zulu420.com
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
header=connection=Keep-Alive
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
header=cookie=JSESSIONID=B22237FB558A0FECFBAF093593BFFD07
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
header=content-length=0
2003-10-13 16:46:17 RequestDumperValve[Standalone]:             locale=en_US
2003-10-13 16:46:17 RequestDumperValve[Standalone]:             method=GET
2003-10-13 16:46:17 RequestDumperValve[Standalone]:           pathInfo=null
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
protocol=HTTP/1.1
2003-10-13 16:46:17 RequestDumperValve[Standalone]:        queryString=null
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
remoteAddr=65.120.33.195
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
remoteHost=65.120.33.195
2003-10-13 16:46:17 RequestDumperValve[Standalone]:         remoteUser=null
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
requestedSessionId=B22237FB558A0FECFBAF093593BFFD07
2003-10-13 16:46:17 RequestDumperValve[Standalone]:             scheme=http
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
serverName=se.zulu420.com
2003-10-13 16:46:17 RequestDumperValve[Standalone]:         serverPort=80
2003-10-13 16:46:17 RequestDumperValve[Standalone]:        servletPath=null
2003-10-13 16:46:17 RequestDumperValve[Standalone]:           isSecure=false
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
---------------------------------------------------------------
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
---------------------------------------------------------------
2003-10-13 16:46:17 RequestDumperValve[Standalone]:           authType=null
2003-10-13 16:46:17 RequestDumperValve[Standalone]:      contentLength=-1
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
contentType=text/html;charset=ISO-8859-1
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
header=Content-Type=text/html;charset=ISO-8859-1
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
header=Content-Language=en
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
message=/test.jsp
2003-10-13 16:46:17 RequestDumperValve[Standalone]:         remoteUser=null
2003-10-13 16:46:17 RequestDumperValve[Standalone]:             status=404
2003-10-13 16:46:17 RequestDumperValve[Standalone]: 
===============================================================

Anyone have any ideas what I am missing?

Thx,
Chuck



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org