I'm trying to put a link like this: " <html:link page="user.do?action=user.new">New User</html:link> "
So, in my getKeyMethodMap, I did:
protected Map getKeyMethodMap() { Map map = new HashMap(); map.put("user.new", "newUser"); return map } And, my Struts-config.xml is like this:
<action path="/user" type="com.sednet.sedclin.server.actions.UserAction" name="userForm" scope="session" parameter="action" input="/server/userp1.jsp" validate="false"> <forward name="success" path="/server/success.jsp"/> </action>
I have a method, in my LookupDispatchAction class, called:
public ActionForward newUser(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response){ //new user return mapping.findForward('success'); } What can I wait for? I wait that when I click in the Link, the 'action' variable receives 'user.new' value and it is mapped into the getKeyMethodMap to run the newUser method. But, when I click in the Link, I have this error message: ================================================= java.lang.NullPointerException java.lang.Class.searchMethods(Class.java:1877) java.lang.Class.getMethod0(Class.java:1901) java.lang.Class.getMethod(Class.java:984) org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:332) org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:264) org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:234) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:465) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:505) javax.servlet.http.HttpServlet.service(HttpServlet.java:743) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) ================================================= What can I do? What I'm doing wrong? Thanks for help!
Regards
Flávio Vilasboas Maldonado
Diretor de Desenvolvimento
SedNet Soluções em TI
(35)3471-9381
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]