title: technique to transfer xml from jsp to servlet
body: <p>I'm making a web app (standard JSP and servlet) that will consume a certain web service. the data that the user will feed to the web service is in the form of xml file (data.xml). Let's say the user, the web app server and web service server are all in different PC1, PC2 and PC3 respectively. The user has data.xml in PC3 accessing web page from PC2 (jsp). My question is what's the better way to transfer the XML?
  scenario 1:
  transfer in the form of filestream (file upload) from jsp -> servlet -> web service -> servlet -> jsp</p>
  
  <p>scenario 2:
  jsp accesses data.xml, read the contents, store it in string object and then pass the xml string to servlet -> web service -> servlet and finally return the response as object to jsp (not xml, not string, but object).</p>
  
  <p>which is better?</p>