Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

EL expression in html:form action

Lim Hock-Chai

2007-03-15

Replies:

I'm getting the "cannot retrieve mapping for action" error when using EL
expression in the action attribute of <html:form> tag. See below.


AcctContact.jsp ==>
<html:form action="AcctContact${contactType}Action">
. . .
</html:form>


struts-config.xml ==>
<action path="/AcctContactBILAction"
 type="com.factor8th.i5.AcctContactAction"
 name="AcctContactBILForm"
 scope="request"
 validate="true"
 input="/AcctContact.jsp">
. . .
</action>

Error ==>
========================================================================
==
ERROR - ServletException in '/AcctContact.jsp': Cannot retrieve mapping
for action /AcctContactAction
javax.servlet.ServletException: Cannot retrieve mapping for action
/AcctContactAction
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:495)
at org.apache.jsp.AcctContact_jsp._jspService(AcctContact_jsp.java:245)
at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:92)



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.