You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pham Anh Tuan <an...@ichi-corp.jp> on 2005/05/09 06:03:02 UTC

[HELP] action mapping for welcome page?

Hi all,

I need your help.

When I want to map my index page with a action, there's something makes me confuse.

Ex:
I have a website www.myweb.com
I want to use 1 action: /user/index.do to map to my page is home.jsp

in my web.xml
<servlet-mapping>

<servlet-name>action</servlet-name>

<url-pattern>*.do</url-pattern>

</servlet-mapping>

<session-config>

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

</session-config>

<welcome-file-list>

<welcome-file>/user/index.do</welcome-file>

</welcome-file-list>

in my struts-config.xml

<action

path="/user/index.do"

name=""

scope="request"

type="com.ibatis.struts.BeanAction">

<forward name="success" path="home.jsp" />

</action> 

but it just give me a list of file in my file structure of Web app.

thanks for ur reading.

Anh Tuan

Re: [HELP] action mapping for welcome page?

Posted by Pham Anh Tuan <an...@ichi-corp.jp>.
Oh, I have just thought that it could be ...

So, Jonathan, thank you for ur help :)

Anh Tuan
----- Original Message ----- 
From: "Jonathan Wright" <jo...@aboutit.co.nz>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, May 09, 2005 11:13 AM
Subject: Re: [HELP] action mapping for welcome page?


> You can't have a link to an action as your welcome file, It must be a
> physical file. You could always have a JSP with a forward to your action 
> as
> your welcome file.
>
>
> Jonathan Wright
> ----- Original Message ----- 
> From: "Pham Anh Tuan" <an...@ichi-corp.jp>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Monday, May 09, 2005 4:03 PM
> Subject: [HELP] action mapping for welcome page?
>
>
> Hi all,
>
> I need your help.
>
> When I want to map my index page with a action, there's something makes me
> confuse.
>
> Ex:
> I have a website www.myweb.com
> I want to use 1 action: /user/index.do to map to my page is home.jsp
>
> in my web.xml
> <servlet-mapping>
>
> <servlet-name>action</servlet-name>
>
> <url-pattern>*.do</url-pattern>
>
> </servlet-mapping>
>
> <session-config>
>
> <session-timeout>30</session-timeout>
>
> </session-config>
>
> <welcome-file-list>
>
> <welcome-file>/user/index.do</welcome-file>
>
> </welcome-file-list>
>
> in my struts-config.xml
>
> <action
>
> path="/user/index.do"
>
> name=""
>
> scope="request"
>
> type="com.ibatis.struts.BeanAction">
>
> <forward name="success" path="home.jsp" />
>
> </action>
>
> but it just give me a list of file in my file structure of Web app.
>
> thanks for ur reading.
>
> Anh Tuan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> 



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


Re: [HELP] action mapping for welcome page?

Posted by Jonathan Wright <jo...@aboutit.co.nz>.
You can't have a link to an action as your welcome file, It must be a
physical file. You could always have a JSP with a forward to your action as
your welcome file.


Jonathan Wright
----- Original Message ----- 
From: "Pham Anh Tuan" <an...@ichi-corp.jp>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, May 09, 2005 4:03 PM
Subject: [HELP] action mapping for welcome page?


Hi all,

I need your help.

When I want to map my index page with a action, there's something makes me
confuse.

Ex:
I have a website www.myweb.com
I want to use 1 action: /user/index.do to map to my page is home.jsp

in my web.xml
<servlet-mapping>

<servlet-name>action</servlet-name>

<url-pattern>*.do</url-pattern>

</servlet-mapping>

<session-config>

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

</session-config>

<welcome-file-list>

<welcome-file>/user/index.do</welcome-file>

</welcome-file-list>

in my struts-config.xml

<action

path="/user/index.do"

name=""

scope="request"

type="com.ibatis.struts.BeanAction">

<forward name="success" path="home.jsp" />

</action>

but it just give me a list of file in my file structure of Web app.

thanks for ur reading.

Anh Tuan


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