Re:Re: How to forward request in struts 2.1.6?

2009-04-30 Thread xnpeng
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

Re: Re: How to forward request in struts 2.1.6?

2009-04-30 Thread Nils-Helge Garli Hegvik
I'm not sure I understand your problem. Maybe you can give an example? I would be surprised if you couldn't handle this with regular Struts 2 results. http://struts.apache.org/2.1.6/docs/result-types.html http://struts.apache.org/2.1.6/docs/result-configuration.html

Re:Re: Re: How to forward request in struts 2.1.6?

2009-04-30 Thread xnpeng
so many thanks. forgive my poor english. there are some words in this document: http://struts.apache.org/2.1.6/docs/rest-plugin.html Also, notice we aren't returning the usual success result code in either method. This allows us to use the special features of the Codebehind Plugin to

Re: How to forward request in struts 2.1.6?

2009-04-30 Thread Dave Newton
xnpeng wrote: public class PublishController extends PublishAction implements Preparable { private static String message_url = /post/message/; private static String affair_url = /post/affair/; private static String business_url = /post/business/; private static String

Re:Re: How to forward request in struts 2.1.6?

2009-04-30 Thread xnpeng
by the idea of Convention-plugin(CodeBehind-plugin)--Zero Config,it provides: Action location by package naming conventions Result (JSP, FreeMarker, etc) location by naming conventions Class name to URL naming convention Package name to namespace convention SEO compliant URLs (i.e. my-action

How to forward request in struts 2.1.6?

2009-04-29 Thread xnpeng
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

Re: How to forward request in struts 2.1.6?

2009-04-29 Thread Nils-Helge Garli Hegvik
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: