About Question enthuware.jwpv6.2.1233 :
Moderator: admin
About Question enthuware.jwpv6.2.1233 :
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.
-
- Site Admin
- Posts: 10066
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.1233 :
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.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.1233 :
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.
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.
-
- Site Admin
- Posts: 10066
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.1233 :
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.
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.
Who is online
Users browsing this forum: No registered users and 107 guests