tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From QM <qm...@brandxdev.net>
Subject Re: How do I make my servlet the welcome page
Date Wed, 01 Sep 2004 19:26:57 GMT
On Wed, Sep 01, 2004 at 02:16:49PM -0500, Brad Taylor wrote:
: I am running tomcat 5.0.9.  I currently enter a url like
: http://localhost:8080/myapp.  This causes a "redirect" page to be
: briefly displayed followed by my servlet getting invoked and serving the
: "real" page.  I would like to bypass this redirect, but can not seem to
: get it to work.  I have tried changing my welcome-file-list to mypage.do
: and I have tried creating a servlet-mapping specifying index.html.

Change your web.xml to specify the new 2.4 schema , aka:

<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"
>

Then add your servlet's mapping to <welcome-file-list>.


[for the archives: using servlets as welcome files is supported as of
servlet spec 2.4, which Tomcat 5.x implements]

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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


Mime
View raw message