First of all I don't understand what "access... from the JSP" means. Is the JSP code forwarding, or redirecting, to this servlet? Or does it contain Java code that does an HTTP connection to this servlet? Or does it generate HTML which, in the browser, uses AJAX to request this servlet?When I access this response from the JSP, it is adding the JSP code from the CreateShipment.jsp page to ehich i am forwarding the respose to in the response body along with the xml string.
If you want the servlet to return an XML string then I don't understand why you have it forward to a JSP, which is just going to add more data to that XML. It sounds like you don't want that. If so then don't do it.The HTTP response adds the xml string and then I forward back to the JSP.
So, assuming that you read what I wrote, this means that on the server you want to do something that takes the result of a servlet and does something with it. This is before the user gets to see anything, right? And this is nothing to do with the original question, right?Originally posted by harmeet bawa:
But in the JSP what I am doing is, I need to read the HTTP Response from the servllet and then I parse the XML and display all the relevant info on the JSP. How exactly do I do this?
You had your fun. Now it's time to go to jail. Thanks for your help tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|