This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes JSP Model Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "JSP Model" Watch "JSP Model" New topic
Author

JSP Model

Arpana Rai
Ranch Hand

Joined: Nov 12, 2002
Posts: 93


Coreect answer given is A. Can some1 explain me why?

thx in advance
Regards
Arpana


SCJP1.4(91%)
Balamurugan Muthiah
Greenhorn

Joined: Mar 14, 2002
Posts: 17
Hi Arpana

I could see the following places where the compilation error could occur.

(1) The beginning of the first line is not proper

(2) No imports specified for Vector and Enumeration

(3)
'Public' should be 'public'

On correcting all the above the jsp compiles and gives the output
First Value Second Value

Hope I am clear.


Regards<br />Bala<br />SCJP 1.2, SCWCD 1.4
Narsimha Manekar
Ranch Hand

Joined: Mar 05, 2001
Posts: 35
Hi Arpana
I think Balamurugan is incorrect.
JSP file gets translated first and then compiled. During translation it checks for correct syntax of all JSP elements. Since the page directive syntax is incorrect, it should generate a translation error (unless it is a typo in your text). So the correct answer should be C. Translation Error

Correct me if I am wrong.

-Rao
[ May 18, 2004: Message edited by: NARSIMHA MANEKAR ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP Model