tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thad Humphries <t...@mindwrap.com>
Subject RE: welcome file in web.xml with pre-compiled jsp's?
Date Fri, 24 Aug 2001 17:21:09 GMT
I think you'll have to add index.jsp to the DirectoryIndex of your Apache 
httpd.conf file, like so:

DirectoryIndex index.html index.jsp

At 12:47 8/24/2001 -0400, you wrote:


>Hi Saritha,
>
>Yep, I understand how to set up my web.xml - if you look at the bottom of the
>mail I sent, you'll see it there...
>
>Works fine if I call index.jsp directly, BUT if I place it as my welcome page
>using
>
>    <welcome-file-list>
>     <welcome-file>index.jsp</welcome-file>
>    </welcome-file-list>
>
>it doesn't work!
>
>Any suggestions?
>
>Dave
>
>
>
>
>
>
>"Saritha Pula" <spula%SonicWALL.com@interlock.lexmark.com> on 08/21/2001
>04:40:41 PM
>
>To:   tomcat-user%jakarta.apache.org@interlock.lexmark.com
>cc:   "David_Hay/Lex/Lexmark.LEXMARK"@sweeper.lex.lexmark.com (bcc: David
>       Hay/Lex/Lexmark)
>Subject:  RE: welcome file in web.xml with pre-compiled jsp's?
>
>
>
>
>Hi dhay
>    You have to give pre-compiled JSP (i.e servlet )in web.xml
><servlet>
>           <servlet-name>indexCheck</servlet-name>
>           <servlet-class>index</servlet-class>
></servlet>
><servlet-mapping>
>        <servlet-name>indexCheck</servlet-name>
>         <url-pattern>/index.jsp</url-pattern>
></servlet-mapping>
>When you refer to /index.jsp it calls pre-compiled JSP(i.e servlet)using
>mapping in web.xml
>--Saritha
>
>
>
>
>-----Original Message-----
>From: dhay@lexmark.com [mailto:dhay@lexmark.com]
>Sent: Tuesday, August 21, 2001 12:00 PM
>To: tomcat-user@jakarta.apache.org
>Subject: welcome file in web.xml with pre-compiled jsp's?
>
>
>
>
>Hi everyone,
>
>I am pre-compiling my jsp's in my struts web app, and everything works
>fine,
>except specifying the welcome file in the web.xml.
>
>If I do not pre-compile everything, having index.jsp as the first page
>works
>great.  However, when I pre-compile index.jsp it doesn't work.  Putting
>an
>uncompiled index.jsp back in the root directory makes it work again.  I
>guess it
>is because jsp is not in root directory, but figure I should still be
>able to do
>this...
>
>Does anyone know if there is something special I have to do, or if there
>is
>anywhere else I can specify the first page as a servlet?
>
>btw, please copy me into any reply!
>
>Thanks,
>
>Dave
>
>Web.xml:
>
><?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.xml for use with PRE-COMPILED JSP's -->
><web-app>
>
>
>    <!-- The Welcome File List -->
>    <welcome-file-list>
>     <!-- call index.jsp as first page -->
>     <welcome-file>index.jsp</welcome-file>
>    </welcome-file-list>
>
>    <!-- Action Servlet Configuration -->
>    <servlet>
>     <servlet-name>action</servlet-name>
>     <!-- central Action Servlet Controller to use -->
>     <servlet-class>beans.AppController</servlet-class>
>     <!-- Java class name of the application resources bundle base class
>-->
>     <init-param>
>       <param-name>application</param-name>
>       <param-value>ApplicationResources</param-value>
>     </init-param>
>     <!-- Context-relative path to the XML resource containing our
>configuration
>information -->
>     <init-param>
>       <param-name>config</param-name>
>       <param-value>/WEB-INF/struts-config.xml</param-value>
>     </init-param>
>     <!-- The debugging detail level for this servlet, which controls how
>much
>information is logged. [0] -->
>     <init-param>
>       <param-name>debug</param-name>
>       <param-value>2</param-value>
>     </init-param>
>     <!-- The debugging detail level for the Digester we utilize in
>initMapping(), which logs to System.out instead of the servlet log. [0]
>-->
>     <init-param>
>       <param-name>detail</param-name>
>       <param-value>2</param-value>
>     </init-param>
>     <load-on-startup>2</load-on-startup>
>    </servlet>
>
>    <!-- Catch any exceptions, and redirect to error page -->
>    <error-page>
>       <exception-type>java.lang.Exception</exception-type>
>       <location>/error.jsp</location>
>    </error-page>
>
>
>    <servlet>
>     <servlet-name>
>         changeLogFileName
>     </servlet-name>
>     <servlet-class>
>         JspServ.changeLogFileName
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         chooseDevice
>     </servlet-name>
>     <servlet-class>
>         JspServ.chooseDevice
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         dataDir
>     </servlet-name>
>     <servlet-class>
>         JspServ.dataDir
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         dataDirFrame
>     </servlet-name>
>     <servlet-class>
>         JspServ.dataDirFrame
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         error
>     </servlet-name>
>     <servlet-class>
>         JspServ.error
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         index
>     </servlet-name>
>     <servlet-class>
>         JspServ.index
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         indexBar
>     </servlet-name>
>     <servlet-class>
>         JspServ.indexBar
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         log
>     </servlet-name>
>     <servlet-class>
>         JspServ.log
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         logFilter
>     </servlet-name>
>     <servlet-class>
>         JspServ.logFilter
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         logFrame
>     </servlet-name>
>     <servlet-class>
>         JspServ.logFrame
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         logging
>     </servlet-name>
>     <servlet-class>
>         JspServ.logging
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         loggingFrame
>     </servlet-name>
>     <servlet-class>
>         JspServ.loggingFrame
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         loggingSaveCancel
>     </servlet-name>
>     <servlet-class>
>         JspServ.loggingSaveCancel
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         login
>     </servlet-name>
>     <servlet-class>
>         JspServ.login
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         messages
>     </servlet-name>
>     <servlet-class>
>         JspServ.messages
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         parameters
>     </servlet-name>
>     <servlet-class>
>         JspServ.parameters
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         parametersFrame
>     </servlet-name>
>     <servlet-class>
>         JspServ.parametersFrame
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         parametersSaveCancel
>     </servlet-name>
>     <servlet-class>
>         JspServ.parametersSaveCancel
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         serialNosFrame
>     </servlet-name>
>     <servlet-class>
>         JspServ.serialNosFrame
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         serialNos
>     </servlet-name>
>     <servlet-class>
>         JspServ.serialNos
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         snapshot
>     </servlet-name>
>     <servlet-class>
>         JspServ.snapshot
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         snapshotFilter
>     </servlet-name>
>     <servlet-class>
>         JspServ.snapshotFilter
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         snapshotFrame
>     </servlet-name>
>     <servlet-class>
>         JspServ.snapshotFrame
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         telnet
>     </servlet-name>
>     <servlet-class>
>         JspServ.telnet
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         telnetFrame
>     </servlet-name>
>     <servlet-class>
>         JspServ.telnetFrame
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         telnetInstr
>     </servlet-name>
>     <servlet-class>
>         JspServ.telnetInstr
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         trace
>     </servlet-name>
>     <servlet-class>
>         JspServ.trace
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         traceFrame
>     </servlet-name>
>     <servlet-class>
>         JspServ.traceFrame
>     </servlet-class>
>    </servlet>
>
>    <servlet>
>     <servlet-name>
>         traceSaveCancel
>     </servlet-name>
>     <servlet-class>
>         JspServ.traceSaveCancel
>     </servlet-class>
>    </servlet>
>
>
>    <!-- Action Servlet Mapping -->
>    <servlet-mapping>
>     <servlet-name>action</servlet-name>
>     <url-pattern>*.do</url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        changeLogFileName
>     </servlet-name>
>     <url-pattern>
>        /changeLogFileName.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        chooseDevice
>     </servlet-name>
>     <url-pattern>
>        /chooseDevice.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        dataDir
>     </servlet-name>
>     <url-pattern>
>        /dataDir.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        dataDirFrame
>     </servlet-name>
>     <url-pattern>
>        /dataDirFrame.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        error
>     </servlet-name>
>     <url-pattern>
>        /error.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        index
>     </servlet-name>
>     <url-pattern>
>        /index.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        indexBar
>     </servlet-name>
>     <url-pattern>
>        /indexBar.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        log
>     </servlet-name>
>     <url-pattern>
>        /log.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        logFilter
>     </servlet-name>
>     <url-pattern>
>        /logFilter.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        logFrame
>     </servlet-name>
>     <url-pattern>
>        /logFrame.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        logging
>     </servlet-name>
>     <url-pattern>
>        /logging.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        loggingFrame
>     </servlet-name>
>     <url-pattern>
>        /loggingFrame.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        loggingSaveCancel
>     </servlet-name>
>     <url-pattern>
>        /loggingSaveCancel.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        login
>     </servlet-name>
>     <url-pattern>
>        /login.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        messages
>     </servlet-name>
>     <url-pattern>
>        /messages.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        parameters
>     </servlet-name>
>     <url-pattern>
>        /parameters.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        parametersFrame
>     </servlet-name>
>     <url-pattern>
>        /parametersFrame.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        parametersSaveCancel
>     </servlet-name>
>     <url-pattern>
>        /parametersSaveCancel.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        serialNosFrame
>     </servlet-name>
>     <url-pattern>
>        /serialNosFrame.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        serialNos
>     </servlet-name>
>     <url-pattern>
>        /serialNos.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        snapshot
>     </servlet-name>
>     <url-pattern>
>        /snapshot.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        snapshotFilter
>     </servlet-name>
>     <url-pattern>
>        /snapshotFilter.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        snapshotFrame
>     </servlet-name>
>     <url-pattern>
>        /snapshotFrame.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        telnet
>     </servlet-name>
>     <url-pattern>
>        /telnet.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        telnetFrame
>     </servlet-name>
>     <url-pattern>
>        /telnetFrame.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        telnetInstr
>     </servlet-name>
>     <url-pattern>
>        /telnetInstr.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        trace
>     </servlet-name>
>     <url-pattern>
>        /trace.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        traceFrame
>     </servlet-name>
>     <url-pattern>
>        /traceFrame.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>     <servlet-name>
>        traceSaveCancel
>     </servlet-name>
>     <url-pattern>
>        /traceSaveCancel.jsp
>     </url-pattern>
>    </servlet-mapping>
>
>    <!-- Struts Tag Library Descriptor -->
>
>    <taglib>
>     <taglib-uri>
>            /WEB-INF/struts-bean.tld
>     </taglib-uri>
>     <taglib-location>
>            /WEB-INF/struts-bean.tld
>     </taglib-location>
>    </taglib>
>    <taglib>
>     <taglib-uri>
>            /WEB-INF/struts-html.tld
>     </taglib-uri>
>     <taglib-location>
>            /WEB-INF/struts-html.tld
>     </taglib-location>
>    </taglib>
>    <taglib>
>     <taglib-uri>
>            /WEB-INF/struts-logic.tld
>     </taglib-uri>
>     <taglib-location>
>            /WEB-INF/struts-logic.tld
>     </taglib-location>
>    </taglib>
>    <taglib>
>     <taglib-uri>
>            /WEB-INF/struts-template.tld
>     </taglib-uri>
>     <taglib-location>
>            /WEB-INF/struts-template.tld
>     </taglib-location>
>    </taglib>
>    <taglib>
>     <taglib-uri>
>            /WEB-INF/app.tld
>     </taglib-uri>
>     <taglib-location>
>            /WEB-INF/app.tld
>     </taglib-location>
>    </taglib>
></web-app>
>
>
>
>
>
>

-------------------------------------------------------------------------
Thad Humphries               "...no religious test shall ever be required
Web Development Manager       as a qualification to any office or public
Phone: 540/675-3015, x225     trust under the United States." -Article VI 


Mime
View raw message