using this code i goes to test.jsp page ,in that test.jsp file ,i place iframe tag like <iframe src="file:///D:/sample/result.xml" /> but it does not show the content what can i do please provide solution
You can use relative path instead.
My suggestion would be to get rid of that iframe if you are developing a modern web app and explore latest ways of dynamic content loading.
Balagopal Kannampallil wrote:If I were you, I would have used JQuery in my webapp to fulfill the remote loading
Here is a sample code
In place of '/remotesite/result.xml' , you can give the url of the xml hosted in the third party server.
Note: JQuery is one of the many options available.
Thanks for your code its work for me,but file not loading inside div tag,because my xml file is F:/workspace/mind.xml so how can i load this file in div tag,sorry for silly question but jquery function and all working file also load inside of webcontent file in eclipse but not F:/,D:/ files
Durga Roobini wrote:In my servlet page I call one xml response from third party server
When you are loading the xml response from a third party server, what is the need to load it from the local file?
You can write the response and store it in the local file for record purpose but can't you use the response object from the server as it is to display?
Note: I haven't tried that myself.
Ulf Dittmer wrote:What is the point of writing the XML to disk? Can't you keep the data in memory? It sounds like it would be used pretty much right away, yes?
Just need get xml from servlet to JSP,sorry i cant think broadly tell me any other way to send xml from servlet to JSP(HTML)?
(I am assuming, of course, that the request gets forwarded from the servlet to the JSP. You haven't said one way or the other, so let us know if it's not the case.)