You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mu Mike <mi...@hotmail.com> on 2004/03/10 04:18:51 UTC
help ,action path
I got this jsp page:
sample.jsp:
<html:form method="post" action="/openReport.do">
<tr>
<td>
<html:text property="fileName" value="this is the filename"/>
</td>
</tr>
<input type="submit"/>
</html:form>
it is saved in
/contextPath/rv/sample.jsp
this is part of my web.xml
web.xml:
<init-param>
<param-name>config/rv</param-name>
<param-value>/WEB-INF/struts-rv-config.xml</param-value>
</init-param>
this is part of my struts-rv-config.xml
struts-rv-config.xml:
<action path="/openReport"
type="com.viador.rv.action.RunReportAction"
name="OpenReportForm"
scope="session">
</action>
when I try to access the jsp page directly by this url
http://localhost/myapp/rv/sample.jsp
there is an error says
Cannot retrieve mapping for action /openReport
why?
even when I modified the jsp page as the below
action="/rv/openReport.do"> or
action="myapp/rv/openReport.do
it still doesnt work
but if I use the form element of HTML instead of that of struts, smaple.jsp
works!
why is this?
_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: help ,action path
Posted by Daniel Henrique Alves Lima <em...@yahoo.com.br>.
Please, try
<html:form method="post" action="/openReport">
or
<html:form method="post" action="/myapp/openReport">
You can also do a "view source" and look the html generated by tag
<html:form>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org