[ 
https://issues.apache.org/jira/browse/WW-3379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3379:
------------------------------

    Fix Version/s: Future

Did you try to ask on the User ML ?
                
> Using apache urlrewrite to @ result redirectAction invalid after 
> addActionMessage and addActionError
> ----------------------------------------------------------------------------------------------------
>
>                 Key: WW-3379
>                 URL: https://issues.apache.org/jira/browse/WW-3379
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.8
>         Environment: Core Interceptors
>            Reporter: lyh
>             Fix For: Future
>
>
> My code:
> @Namespace("/app")
> @Results({
>     @Result(name="success", type="redirectAction", params = {"actionName" , 
> "orders"}),
> })
> public class OrdersController extends ActionSupport implements 
> ModelDriven<Object>{
>     // GET /orders
>     public HttpHeaders index() {
>         list = ordersService.getAll();
>         System.out.println(this.getActionMessages()); // use apache 
> urlrewrite After no value here
>         return new DefaultHttpHeaders("index").disableCaching();
>     }
> }
> //============================================================================
> @Namespace("/app")
> @Results({
>     @Result(name="success", type="redirectAction", params = { "actionName" , 
> "orders"})
> })
> public class OrdersBatchController extends ActionSupport {
>       private static final long serialVersionUID = 6072741035167921283L;
>       
>       //POST /orders-batch
>       public String create() {
>               addActionMessage("Order-batch removed successfully");
>               return SUCCESS;
>       }
> }
> If you did not use apache urlrewrite the code above is no problem.
> post -> http://www.demo.com/app/orders-batch    to    orders success
> In the orders of the index method to obtain actionMessage
> According to the actual situation into the domain name:
> http://app.demo.com/orders-batch (Actually equal to 
> http://www.demo.com/app/orders-batch)
> I have a corresponding change in s: from to ensure that requests to 
> orderBatchController the create method.
> However, @ result success can not find the corresponding controller, and 
> gives error: namespace: / app / app
> I re-configured as:
>     @ Result (name = "success", type = "redirectAction", params = ( 
> "namespace ",""," actionName", "orders"))
> Note: namespace = "" correctly when it is requested.
> But such problems, and my orders, or the index method actionMessages not 
> actionErrors for access, and I do not know why, I need help. Thanks

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to