Implement with LookUpDispatchAction in Struts
I need to enhance my application which is developed in Struts 1.1.
In the jsp,there are 3 buttons and the request is getting submitted to an
action which extends LookUpDispatchAction.I need to add a link in this jsp
which will fetch some data from the backend. So,I tried using as:
<html:link action="/myAction.do?submitButton=submit.fetchData" >
<bean:message key="submit.fetchData" />
</html:link>
In the LookUpDispatchAction,I added an entry in the getKeyMethodMap as:
hMap.put("submit.fetchData","fetchDataFunction");
but I am getting an exception:
WARN RequestProcessor:509 - Unhandled Exception thrown: class
javax.servlet.ServletException
My struts-config mapping is as follows:
<action path="/myAction"
name="myActionForm"
type="com.action.MyAction"
scope="request"
parameter="submitButton">
....
</action>
Since I am enhancing the application,I need to call MyAction(which extends
LookUpDispatchAction) when the user clicks on the link and perform the
required operation.How do I do this?
Please help!!!!
No comments:
Post a Comment