tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Boughton" <bought...@gmail.com>
Subject Re: full path of 404 file
Date Sun, 02 Sep 2007 15:47:30 GMT
That's a good idea. :)
I don't have a WEB-INF directory created yet - it does get auto-created,
right?

Anyway, here's /usr/local/jakarta/tomcat/conf/web.xml (with a few million
mime types snipped out):
============
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

    <!-- This document defines default values for *all* web applications
  -->



    <servlet>
        <servlet-name>default</servlet-name>
        <servlet-class>org.apache.catalina.servlets.DefaultServlet
</servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>listings</param-name>
            <param-value>true</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>


    <servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
            <param-name>fork</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>xpoweredBy</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
    </servlet>


    <servlet>
        <servlet-name>CFMLServlet</servlet-name>
        <servlet-class>railo.runtime.servlet.MultiWebCFMLServlet
</servlet-class>
        <init-param>
            <param-name>configuration</param-name>
            <param-value>/WEB-INF/railo/</param-value>
            <description>Configuration directory</description>
        </init-param>
        <load-on-startup>2</load-on-startup>
    </servlet>




    <servlet-mapping>
        <servlet-name>default</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>


    <servlet-mapping>
        <servlet-name>jsp</servlet-name>
        <url-pattern>*.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp</servlet-name>
        <url-pattern>*.jspx</url-pattern>
    </servlet-mapping>


    <servlet-mapping>
        <servlet-name>CFMLServlet</servlet-name>
        <url-pattern>*.cfm</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>CFMLServlet</servlet-name>
        <url-pattern>*.cfml</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>CFMLServlet</servlet-name>
        <url-pattern>*.cfc</url-pattern>
    </servlet-mapping>



    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>



    <mime-mapping>        <extension>abs</extension>
<mime-type>audio/x-mpeg</mime-type>                      </mime-mapping>
[snip]
    <mime-mapping>        <extension>zip</extension>
<mime-type>application/zip</mime-type>                   </mime-mapping>



    <welcome-file-list>
        <welcome-file>index.cfml</welcome-file>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.cfm</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>


</web-app>
============


And this is /usr/local/jakarta/tomcat/conf/server.xml:
============
<Server port="8005" shutdown="SHUTDOWN">

    <GlobalNamingResources>
        <!-- Used by Manager webapp -->
        <Resource
            name="UserDatabase"
            auth="Container"
            type="org.apache.catalina.UserDatabase"
            description="User database that can be updated and saved"
            factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
            pathname="conf/tomcat-users.xml"
        />
    </GlobalNamingResources>

    <Service name="Catalina">
        <Connector port="8080"
            enableLookups="false"
            redirectPort="8443"
        />
        <Connector port="8009"
            enableLookups="false"
            redirectPort="8443"
            protocol="AJP/1.3"
        />

        <Engine name="Catalina" defaultHost="localhost">
            <Realm
                className="org.apache.catalina.realm.UserDatabaseRealm"
                resourceName="UserDatabase"
            />


            <Host name="localhost" appBase="webapps"/>

            <Host name="domain.com" appBase="/home/hybrid/public_html">
                <Alias>www.domain.com</Alias>
                <Context path="" docBase="./" reloadable="true"/>
            </Host>
<!--
            <Host name="domain.com" appBase="/home/hybrid/webapps">
                <Alias>www.domain.com</Alias>
            </Host>
-->

        </Engine>

    </Service>
</Server>
============



And In the interests of making sure I'm giving enough information, I should
probably say that I'm doing this via mod_jk from Apache, so if it's useful
then here's my /usr/local/apache/conf/jk.conf file:
============
JkWorkersFile /usr/local/jakarta/tomcat/conf/workers.properties
JkLogFile /usr/local/apache/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
JkRequestLogFormat "%w %V %T"

JkAutoAlias /usr/local/jakarta/tomcat/webapps

JkMount /* ajp13
JkUnMount /*.html ajp13
JkUnMount /*.jpg ajp13
JkUnMount /*.gif ajp13
JkUnMount /*.png ajp13
JkUnMount /*.php ajp13
============


Thanks,

Peter

On 9/2/07, Caldarale, Charles R <Chuck.Caldarale@unisys.com> wrote:
>
> > From: Peter Boughton [mailto:boughtonp@gmail.com]
> > Subject: Re: full path of 404 file
> >
> > Does the fact that it is apparently reaching the right
> > directory now mean that this is more likely to be a new
> > problem with web.xml rather than server.xml?
>
> Sounds like you really need to post your server.xml and WEB-INF/web.xml
> files, rather than just hinting about them.  Also, is there anything in
> the WEB-INF/lib or WEB-INF/classes directories (e.g., precompiled JSPs)?
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
\ \
Peter Boughton
blog.bpsite.net
/ /

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message