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
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
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
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
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
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
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:
7 matches
Mail list logo