Servlet doPost() Method setup?
Posted
by Mark R
on Stack Overflow
See other posts from Stack Overflow
or by Mark R
Published on 2010-03-28T17:40:51Z
Indexed on
2010/03/28
17:43 UTC
Read the original article
Hit count: 250
I am interested in creating a web app that uses JSP
, Servlets
and XML
.
At the moment I have the following:
JSP
- Form input.
Servlet
- Retrieving Form data and sending that data to a java object
.
Java object
(1) - Converts data into XML
file....instantiates java object
(2).
Java object
(2) - Sends that file to a database
.
On the returning side the database
will send back another XML file
that I will then process using XSLT
to display back to the user.
Can I place that XSLT
code in the orignial Servlets
doPost()
method? So my doPost()` method would:
Retrieve user inputted data from the form on my
JSP page
.Instantiate a
java object
to convert that data toXML
, in-turn thatobject
will instantiates anotherobject
to send theXML file
to adatabase
.Converts the resulting
XML file
sent from thedatabase
and displays it for the user.
Can one servlet
doPost()
method handle all of this? If not, how would I set up my application and classes
to handle this work flow?
Thank you in advance
© Stack Overflow or respective owner