Struts- two actions with same path in struts config

hai

I am having html:select tag with two options (View And Download) in a form.My form signature is like <html:form action="select">.I mapped two options(View,Download) with same action path.When i click view it doesn't forwards(remains idle) and no error is shown.But i click download it forwards to the appropriate page.If iam having two tags with same action path the second is only working.This problem doesn't comes when iam having one tag alone.

My code is here:

--Select.jsp-

<html:form action="Select">

<html:select property="id">

<html:option value="view">View</html:option>

<html:option value="download">Download</html:option>

</html:select>

</html:form>

--

-Struts-config.xml

<form-beans>

<form-bean name="viewForm" type="ViewForm"/>

<form-bean name="download" type="DownloadForm"/>

</form-beans>

<action-mappings>

<action path="/Select"

name="viewForm"

type="ViewAction"

input="/Select.jsp">

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

</action>

<action path="/Select"

name="downloadForm"

type="DownloadAction"

input="/Select.jsp">

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

</action>

</action-mappings>

-

Can i have action tag with same paths like this.If not please provide me a solution

[1529 byte] By [Thilagavathia] at [2007-11-27 5:23:53]
# 1
haiI got answer for this problem....thanks..........
Thilagavathia at 2007-7-12 11:50:00 > top of Java-index,Java Essentials,Java Programming...
# 2
What about asking Struts-related questions at a Struts forum?
CeciNEstPasUnProgrammeura at 2007-7-12 11:50:01 > top of Java-index,Java Essentials,Java Programming...
# 3
> hai> I got answer for this problem....> thanks..........The ....... answer...... for ...... this ..... problem..... is.........
aniseeda at 2007-7-12 11:50:01 > top of Java-index,Java Essentials,Java Programming...
# 4

>I have created two success pages.

>I have created two findForward in my ActionClass

public ActionForward execute(ActionMapping mapping,...............)

{

................

.............

................

if(a==view)

{

return mapping.findForward("success");

}

else

return mapping.findForward("success1");

}

-Struts-config.xml

<form-beans>

<form-bean name="viewdownloadForm" type="ViewdownloadForm"/>

</form-beans>

<action-mappings>

<action path="/Select"

name="viewdownloadForm"

type="ViewdownloadAction"

input="/Select.jsp">

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

<forward name="success1" path="/Success1.jsp"/>

</action>

Thilagavathia at 2007-7-12 11:50:01 > top of Java-index,Java Essentials,Java Programming...