• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How this works >>>> PageContext pageContext = (PageContext) getJspContext();

 
Tuna Töre
Ranch Hand
Posts: 220
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How this works ?

PageContext pageContext = (PageContext) getJspContext();

PageContext is the sublass of JspContext... Isn't this give ClassCastException...
I am confused ?

java.lang.Object
javax.servlet.jsp.JspContext
javax.servlet.jsp.PageContext


 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow, you really need to go back to SCJP. Seriously.
 
Tuna Töre
Ranch Hand
Posts: 220
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry I thougt at amoment an equation like that which gives me class cast exception but you are right. Thanks...



Exception in thread "main" java.lang.ClassCastException: A
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic