Again, how lookup dispatch action "works" is explained at
http://www.michaelmcgrady.com/button/.  But the options there are simpler,
faster, superior.  LookupDispatchAction is a dynosaur.

On 12/21/05, Shiby Maria John <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I tried using the LookupDispatchAction for this...
> But I am gettng this error..
>
> Can anyone explain how this class works??
>
> java.lang.NullPointerException
>
> org.apache.struts.actions.LookupDispatchAction.execute(
> LookupDispatchAction.java:233)
>
>
> org.apache.struts.action.RequestProcessor.processActionPerform(
> RequestProcessor.java:480)
>
>
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java
> :274)
>
>
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
>
>
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> -----------------------------------Code
> follows-----------------------------------
> jsp code:-
> <%@ taglib  uri="/WEB-INF/tlds/struts-html.tld"  prefix="html"%>
> <%@ taglib  uri="/WEB-INF/tlds/struts-logic.tld"  prefix="logic"%>
> <%@ taglib  uri="/WEB-INF/tlds/struts-bean.tld"  prefix="bean"%>
>
> <%
> response.setDateHeader("Expires", 1);
> response.setHeader("Cache-control", "must-revalidate");
> %>
>
> <html:html>
>       <head>
>             <title>DispatchAction Test</title>
>             <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
>       </head>
>       <body>
>             <html:form action="/multipleSubmit.do" method="post">
>             <html:text property="myText1">Enter a value in the
> text1</html:text>
>             <html:submit value="Submit"
> property="method">Submit1</html:submit>
>             <html:text property="myText2">Enter a value in the
> text2</html:text>
>             <html:submit value="Submit"
> property="method">Submit2</html:submit>
>             </html:form>
>       </body>
> </html:html>
>
> struts-config :-
> <action path="/multipleSubmit" type="bean.MyDispatchAction"
> parameter="method"
>                         name="myDispForm">
>                   <forward name="submit"
> path="/jsp/dispatchActionResult.jsp" />
>             </action>
>
> MyDispatchAction:-
>
> public class MyDispatchAction extends LookupDispatchAction {
>
>       @Override
>       protected Map getKeyMethodMap() {
>             Map map = new HashMap();
>             map.put("Submit1", "submit1");
>             map.put("Submit2", "submit2");
>             return null;
>       }
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

Reply via email to