• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts2 cross context JSP access using c:import throws ClassCastException

 
Ranch Hand
Posts: 41
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a couple of web apps deployed on the same server. There's a jsp in app1 that I want to access from app2. I enabled cross context access in the tomcat and tried this jstl tag:



The myJSP.jsp uses some struts2 tags itself.

I also made sure the required libraries are on both the app1 and app2's lib directory. During the runtime though, the app2's page won't render and I see this error:

Caused by: java.lang.ClassCastException:
com.opensymphony.xwork2.ognl.OgnlValueStack cannot be cast to
com.opensymphony.xwork2.util.ValueStack at
org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:53) at
org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)
at
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)


Any idea why? If I copied the jsp to the app2 and referenced it using the same c:import tag, it works just fine!
reply
    Bookmark Topic Watch Topic
  • New Topic