File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes will this throw exception/run perfectly??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "will this throw exception/run perfectly???" Watch "will this throw exception/run perfectly???" New topic

will this throw exception/run perfectly???

Shashidhar Yarabati
Ranch Hand

Joined: Jun 17, 2007
Posts: 175
<%@page isELIgnored='false'%>
<% request.setAttribute("pageContext", "pagecontext"); %>
pageContext = ${pageContext}

Since pageContext is Implicit Object to EL, the above code leads to throw an Exception

Am I right?
[ May 13, 2008: Message edited by: Shashidhar Rao ]

Shashidhar<br /> SCJP 1.5<br /> SCWCD 5.0
Prem Kashyap
Ranch Hand

Joined: Oct 10, 2006
Posts: 52
Just try running the program? I think it will work fine.. But I am not sure.

Prem Kashyap
Marcus Green
arch rival

Joined: Sep 14, 1999
Posts: 2813
What happened when you compiled and ran the program?

SCWCD: Online Course, 50,000+ words and 200+ questions
Shashidhar Yarabati
Ranch Hand

Joined: Jun 17, 2007
Posts: 175
It compiled perfectly and gave output as follows
pageContext = org.apache.jasper.runtime.PageContextImpl@13576a2

But I have seen one question with the answer it throws exception
swapnil dangore
Ranch Hand

Joined: Jun 05, 2006
Posts: 46
it dosen't throw any exception..It calls pageContext's toString() method

Cheers<br />-------------<br />Swapnil<br /> <br />SCJP5-81%<br /> <br />"Dictionary is the only place where Success come before Work"
I agree. Here's the link:
subject: will this throw exception/run perfectly???