You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Struts Newsgroup (@Basebeans.com)" <st...@basebeans.com> on 2002/04/01 20:55:02 UTC

struts and tomcat - Welcome list

Subject: struts and tomcat - Welcome list
From: "Hermod Opstvedt" <he...@dnb.no>
 ===
Hi all

Why does putting for instance "index.do" into the welcome-file-list in the
web.xml for my application not work. Doing that just gives me a filelisting
of the contents under web-application. If I write the URL straight into my
browser it works ok. Also, is there a way to specify a "default" action in
struts.


regards
Hermod



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: struts and tomcat - Welcome list

Posted by Ted Husted <hu...@apache.org>.
For the welcome page, the containers look for a physical file rather
than going through the usual servlet mappings. The best solution is to
define a welcome ActionForward and use that for the welcome page. 

<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<logic:forward name="welcome"/>

You can then use a global forward to send them to index.do, or whatever.

     <forward 
        name="welcome"            
        path="/index.do"/> 


-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


"Struts Newsgroup (@Basebeans.com)" wrote:
> 
> Subject: struts and tomcat - Welcome list
> From: "Hermod Opstvedt" <he...@dnb.no>
>  ===
> Hi all
> 
> Why does putting for instance "index.do" into the welcome-file-list in the
> web.xml for my application not work. Doing that just gives me a filelisting
> of the contents under web-application. If I write the URL straight into my
> browser it works ok. Also, is there a way to specify a "default" action in
> struts.
> 
> regards
> Hermod
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>