Thanks Dave for the reply, If i put the name "etid" an exception is thrown
If i put a larger parameter "whateverparametername" or simply "_" as parameter name the redirect works fine, i know it's sounds weird I thought that it the bug could come if the params attribute was a hash but looking at the implementation i saw that is a String[] (i have not investigated deeply if behind there is a hashmap) Here is the action code @Result(name="success",value="/jsp/tables/findAllTablesRedirect.jsp", type= ServletDispatcherResult.class) // this is the fix /** * not working annotation * * @Result(name="success",value="findAllTables",params={"namespace","/tables","eid","${eid}","etid","${etid}"},type= ServletActionRedirectResult.class) // this not work * @Result(name="success",value="findAllTables",params={"namespace","/tables","eid","${eid}","etid777","${etid}"},type= ServletActionRedirectResult.class) // this works (i can't understand why) **/ public class CreateTableAction extends BaseAction { private Long eid; private Long etid; @Override public String execute() throws Exception { Model.createTable(eid,etid); return SUCCESS; } public Long getEid() { return eid; } public void setEid(Long eid) { this.eid = eid; } public Long getEtid() { return etid; } public void setEtid(Long etid) { this.etid = etid; } } On Jan 31, 2008 6:30 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > I'm not sure I understand; in your annotation example you deliberately > provide a wrongly-named parameter, right? Why? > > Dave > > --- Luis Gervaso <[EMAIL PROTECTED]> wrote: > > > My workaround > > > > @Result(name="success",value="/jsp/tables/findAllTablesRedirect.jsp", > type= > > ServletDispatcherResult.class) > > > > /jsp/tables/findAllTablesRedirect.jsp: > > > > <% > > > response.sendRedirect > ("/eventoos/tables/findAllTables.action?eid="+request.getParameter("eid")+"&etid="+request.getParameter("etid")); > > %> > > > > regards > > > > On Jan 31, 2008 5:49 PM, Luis Gervaso <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > > When I try to configure un ServletActionRedirectResult i obtain > > > > > > Caused by: > > > > > > java.lang.NullPointerException > > > at > > > > org.apache.struts2.dispatcher.mapper.DefaultActionMapper.getUriFromActionMapping > (DefaultActionMapper.java:466) > > > > > > at > > > org.apache.struts2.dispatcher.ServletActionRedirectResult.execute( > ServletActionRedirectResult.java:184) > > > at > > > com.opensymphony.xwork2.DefaultActionInvocation.executeResult( > DefaultActionInvocation.java:348) > > > > > > > > > > > > using > > > > > > > > > > > > > @Result(name="success",value="findAllTables",params={"namespace","/tables","eid","${eid}","etid","${etid}"},type= > > > ServletActionRedirectResult.class) > > > public class CreateTableAction extends BaseAction { > > > > > > private Long eid; > > > private Long etid; > > > > > > + getters / setters > > > > > > BUT using > > > > > > > > > > > > > @Result(name="success",value="findAllTables",params={"namespace","/tables","eid","${eid}","etid7777WHATEVER","${etid}"},type= > > > ServletActionRedirectResult.class) > > > > > > works fine > > > > > > maybe a problem or bug in the implementation > > > > > > Regards > > > > > > -- > > > ------------------------------------------- > > > Luis Alberto Gervaso Martin > > > Java EE Architect & Instructor > > > C/ Cuenca 4A, 2ºB > > > Getafe (Madrid) > > > SPAIN > > > mobile: (+34) 627983344 > > > [EMAIL PROTECTED] > > > > > > > > > > -- > > ------------------------------------------- > > Luis Alberto Gervaso Martin > > Java EE Architect & Instructor > > C/ Cuenca 4A, 2ºB > > Getafe (Madrid) > > SPAIN > > mobile: (+34) 627983344 > > [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- ------------------------------------------- Luis Alberto Gervaso Martin Java EE Architect & Instructor C/ Cuenca 4A, 2ºB Getafe (Madrid) SPAIN mobile: (+34) 627983344 [EMAIL PROTECTED]