thanks for your reply. the result types cannot do my jobs in struts2+rest environment. in this environment, the "success","error",... did not work, only "index","show" ,... are the default result types. I can manage this. my situation is, I need to forward request to action conditionally,ie,depend on "category" in action class.
在2009-04-29,"Nils-Helge Garli Hegvik" <nil...@gmail.com> 写道: >Why do you need to do it manually with the request dispatcher? Can't >you use any of the available result types? > >http://struts.apache.org/2.1.6/docs/result-types.html > >Nils-H > >2009/4/29 xnpeng <xnp...@163.com>: >> from: >> >> ServletActionContext.getServletContext().getRequestDispatcher("/post/message/"+id).forward(ServletActionContext.getRequest(),ServletActionContext.getResponse()); >> >> I want to forward request to http://localhost:8080/post/message/3166, >> >> but it always throws out exception says requested resource not exist. >> >> when replace the string with "/index.jsp",it can work correctly. >> >> so, anyone who can help? I just want to forward request to an ACTION other >> than jsp file. >> >> thanks. > >--------------------------------------------------------------------- >To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >For additional commands, e-mail: user-h...@struts.apache.org >