cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas M. White, MD, MS" <tw...@columbia.edu>
Subject Tomcat 3.2 + Cocoon 1.8 on Win98 reads .xml as plain text: solution & problem with /conf/web.xml
Date Tue, 12 Dec 2000 16:30:26 GMT
Hi-

I've been using Tomcat 3.1 + Cocoon 1.8 + Win98 in stand-alone mode for
two months now.  It has worked beautifully.

When I upgraded to Tomcat 3.2 to get the SSL support, Cocoon stopped
working.  Tomcat serves the .xml and .xsl files as though they are
mime-type text/plain.

Reading through the FAQ, I see that several other users have had the
same problem, but I haven't seen an answer yet.

One solution to the problem is to do the following:

(1) add /web-inf directory to /cocoon-1.8/samples
(2) put cocoon.properties in /cocoon-1.8/samples/web-inf/
(3) put the following web.xml into /cocoon-1.8/samples/web-inf/


     <?xml version="1.0" encoding="ISO-8859-1"?>

     <!DOCTYPE web-app
         PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
     2.2//EN"
         "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

     <web-app>
      <servlet>
       <servlet-name>Cocoon</servlet-name>
       <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
       <init-param>
        <param-name>properties</param-name>
        <param-value>web-inf/cocoon.properties</param-value>
       </init-param>
       <load-on-startup>-2147483646</load-on-startup>
      </servlet>
      <servlet-mapping>
       <servlet-name>Cocoon</servlet-name>
       <url-pattern>*.xml</url-pattern>
      </servlet-mapping>
     </web-app>

N.B.  Putting this <servlet> into the /tomcat/conf/web.xml DOES NOT
WORK.  Cocoon pages are not served unless the the Cocoon <servlet> is
declared as its own <web-app>.  Otherwise, the servlet loader never
starts Cocoon, even though it is declared with <load-on-startup>.

Is this a bug in Tomcat 3.2?  Declaring the Cocoon <servlet> within the
global /conf/web.xml worked perfectly under Tomcat 3.1.  Moreover, when
jasper.jar is removed from the classpath, Tomcat 3.2 still tries to load
jsp, even when the jsp <servlet> is removed from /conf/web.xml (I get
the message "cannot load servlet name: jsp" once per auto-loaded
directory under /webapps).  This shows that jsp is being loaded from
somewhere other than /conf/web.xml, and suggests that there might be
more wide-spread problems with /conf/web.xml.

Thanks.

/Tom

--
Thomas M. White, MD, MS
Fellow, Department of Medical Informatics
Columbia Presbyterian Medical Center &
New York State Psychiatric Institute
212.543.6724
http://www.cpmc.columbia.edu/homepages/thw7001/


Mime
View raw message