• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Mock exam question about Java EE components

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have answered the following mock exam question incorrectly the mock exam evaluation says:

You are designing a Java EE application presentation tier component that need to generate XML documents and unstructured text document
Select the best Java EE component for the above scenario:
...Java Servlet, JSP or JSF

I selected "JSF" - but they say the correct answer was "JSP"!

Do you agree?

 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wouldn't use JSP or JSF for generating XML, but I can understand why they chose JSP. They are trying to show that JSF is good for form fields and such that have meaning.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think JSP is the correct answer as the question specifically mentioned presentation layer.
 
Ranch Hand
Posts: 145
8
Mac MySQL Database Java Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My take is Servlet.

I can not imagine how one could use JSP for generating XML, without resorting to scriptlets or custom tags.
Using scriptlets is straight up bad practice, and using custom tags introduces unnecessary complexity,
since in addition to writing custom tag you'll have to create a descriptor and register it in web.xml

On the other hand, servlet can produce any output, be it XML or any other binary or text output you need.
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My take is servlet too. I can't see JSP for generating XML.

Man, my advice is: take care with free mock tests, because they brought me a lot of problems in my old SCJP exam. I've made more than 400 questions and most of them was incorrect. If you can, the best is to pay for Whizlabs or EPractize.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic