About Question enthuware.jwpv6.2.1233 :

Moderator: admin

Post Reply
ETS User

About Question enthuware.jwpv6.2.1233 :

Post by ETS User »

This is wrong. Generating XML in a Servlet is perfectly valid. For example I could create some XML using the object mapping generated with a schema by JAXB -- everything in a neat objective fashion.

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.1233 :

Post by admin »

In that case, you are actually using JAXB to generate xml. You are not really writing code such as out.println("<sometag>"+value+"</sometag>"); in your servlet, which is what the question refers to.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

himaiMinh
Posts: 358
Joined: Fri Nov 29, 2013 8:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.1233 :

Post by himaiMinh »

For option 2, "writing code that interacts with the database to fetch data"
I think servlet is not the right place to interact with the database.
The servlet interacts with the business layer which interacts with the DB.

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.1233 :

Post by admin »

From that perspective, interaction with the database should not be done even by the business layer, it is done by the DAO layer.
But that is not the point here. From the exam perspective, you are dealing with JSPs and Servlets. Between these two, servlets are more appropriate for interacting with the database.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests