• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

JSP Model

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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

thx in advance
Regards
Arpana
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
reply
    Bookmark Topic Watch Topic
  • New Topic