> > ServletContext sContext = context.getContext("/context2");
> > RequestDispatcher rd = sContext.getRequestDispatcher(resource);
> > rd.forward(request, response);
> >
> > Thanks,
> > Prasanth
> >
> >   Exception: java.lang.RuntimeException: java.lang.RuntimeException:
> java.lang.ClassCastException:
> org.apache.struts2.dispatcher.mapper.ActionMapping cannot be cast to
> org.apache.struts2.dispatcher.mapper.ActionMapping
> 
> 
> I found [1]:
> > usually when you get ClassCastExceptions you cannot explain you have
> loaded the class with one classloader then try to cast it to the same class
> loaded by another classloader. This will not work - they are represented by
> two different Class objects inside the JVM and the cast will fail.
> 
> [1] https://stackoverflow.com/a/826345/1362623

This usually happens when struts jar is included in application server's lib 
directory.

Regards,
Christoph


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to