This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
    Bookmark Topic Watch Topic
  • New Topic

class cast exception

 
Rafael Fagundes
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hello!

Well, in a jsp system I'm getting java.lang.ClassCastException: java.lang.String error when trying to access a page. It�s strange because when i visit this page for the first time nothing happens. But if i navigate for while and redirect to "the page", this error occurs.

A time this error appeared when i created a session variable two times, with different names....

PS:
Browser feedback:

java.lang.ClassCastException: java.lang.String
at org.apache.jsp.ConsultaSolicitacoes_jsp._jspService(ConsultaSolicitacoes_jsp.java:74)

Servlet:

ns = (YYY.NucleoSolucionador) _jspx_page_context.getAttribute("ns", PageContext.SESSION_SCOPE);

Thank�s for your attention,
Rafael.

Sorry for my bad english....
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Well, something, somewhere in your web app is calling

pageContext.setAttribute("ns", "a string.");

directly or indirectly. Figure out where.
 
    Bookmark Topic Watch Topic
  • New Topic