title: Servlet doPost() Method setup?
body: <p>I am interested in creating a web app that uses <code>JSP</code>, <code>Servlets</code> and <code>XML</code>.</p>
  
  <p>At the moment I have the following:</p>
  
  <p><code>JSP</code> - Form input.</p>
  
  <p><code>Servlet</code> - Retrieving Form data and sending that data to a <code>java object</code>.</p>
  
  <p><code>Java object</code> (1) - Converts data into <code>XML</code> file....instantiates <code>java object</code> (2).</p>
  
  <p><code>Java object</code> (2) - Sends that file to a <code>database</code>.</p>
  
  <p>On the returning side the <code>database</code> will send back another <code>XML file</code> that I will then process using <code>XSLT</code> to display back to the user.</p>
  
  <p>Can I place that <code>XSLT</code> code in the orignial <code>Servlets</code> <code>doPost()</code> method? So my doPost()` method would:</p>
  
  <ol>
  <li><p>Retrieve user inputted data from the form on my <code>JSP page</code>.</p></li>
  <li><p>Instantiate a <code>java object</code> to convert that data to <code>XML</code>, in-turn that <code>object</code> will instantiates another <code>object</code> to send the <code>XML file</code> to a <code>database</code>.</p></li>
  <li><p>Converts the resulting <code>XML file</code> sent from the <code>database</code> and displays it for the user.</p></li>
  </ol>
  
  <p>Can one <code>servlet</code> <code>doPost()</code> method handle all of this? If not, how would I set up my application and <code>classes</code> to handle this work flow?</p>
  
  <p>Thank you in advance</p>