Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on LookupDispatchAction

 
Satish Kulkarni
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have two buttong Edit and Delete and I have implemented the LookupDispatchAction. It works fine when the user clicks the edit or delete button when the user directly enters the URL i get the following exception
Runtime Exception: class javax.servlet.ServletException: Request[/editOrdeleteTestCase] does not contain handler parameter named tcaction
org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:199)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:787)
javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
Below is the JSP code
<html:submit property="tcaction">
<bean:message key="tcaction.edit"/>
</html:submit>
<html:submit property="tcaction">
<bean:message key="tcaction.delete"/>
</html:submit>
struts-config.xml
<action path="editOrDeleteTestCase"
type="com.xxx.xxx.Action
 
Satish Kulkarni
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the struts-config.xml missed it earlier
<action path="editOrDelete"
type="com.xxx.xxx.Action
input="tile.input"
name="editOrDeleteform"
parameter="tcaction"
scope="request">
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic