java.lang.ClassCastException: org.apache.struts2.dispatcher.mapper.ActionMapping

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.ClassCastException: org.apache.struts2.dispatcher.mapper.ActionMapping

Lukasz Lenart
2018-03-02 17:33 GMT+01:00 Prasanth <[hidden email]>:
> https://issues.apache.org/jira/projects/WW/issues/WW-4904
>
> Forwarded using request dispatcher.
>
> ServletContext sContext = context.getContext("/context2");
> RequestDispatcher rd = sContext.getRequestDispatcher(resource);
> rd.forward(request, response);

Did you add FORWARD as below when configuring the Struts filter?

<filter-mapping>
    <filter-name>struts</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: java.lang.ClassCastException: org.apache.struts2.dispatcher.mapper.ActionMapping

Prasanth Pasala
Yeah, my url pattern is *.action as I do have some struts1 actions.

  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>*.action</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
  </filter-mapping>

On 03/05/2018 12:27 AM, Lukasz Lenart wrote:

> 2018-03-02 17:33 GMT+01:00 Prasanth <[hidden email]>:
>> https://issues.apache.org/jira/projects/WW/issues/WW-4904
>>
>> Forwarded using request dispatcher.
>>
>> ServletContext sContext = context.getContext("/context2");
>> RequestDispatcher rd = sContext.getRequestDispatcher(resource);
>> rd.forward(request, response);
> Did you add FORWARD as below when configuring the Struts filter?
>
> <filter-mapping>
>     <filter-name>struts</filter-name>
>     <url-pattern>/*</url-pattern>
>     <dispatcher>REQUEST</dispatcher>
>     <dispatcher>FORWARD</dispatcher>
> </filter-mapping>
>
>
> Regards

Reply | Threaded
Open this post in threaded view
|

Re: java.lang.ClassCastException: org.apache.struts2.dispatcher.mapper.ActionMapping

Lukasz Lenart
2018-03-05 16:19 GMT+01:00 Prasanth Pasala <[hidden email]>:
> Yeah, my url pattern is *.action as I do have some struts1 actions.

Does it mean you use the same filter to handle Struts 1 and Strut 2?


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: java.lang.ClassCastException: org.apache.struts2.dispatcher.mapper.ActionMapping

Prasanth Pasala
The filter is just for struts2. Struts1 is handled by servlet mapping.

  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>

On 03/05/2018 11:52 PM, Lukasz Lenart wrote:
> 2018-03-05 16:19 GMT+01:00 Prasanth Pasala <[hidden email]>:
>> Yeah, my url pattern is *.action as I do have some struts1 actions.
> Does it mean you use the same filter to handle Struts 1 and Strut 2?
>
>
> Regards

12