aspose file tools*
The moose likes JSP and the fly likes jsp - Ajax - xml problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp - Ajax - xml problem" Watch "jsp - Ajax - xml problem" New topic
Author

jsp - Ajax - xml problem

moshi cochem
Ranch Hand

Joined: Nov 10, 2009
Posts: 91
Hi,
Although my post is dealing with ajax, I believe it concern more jsp than ajax:
My first jsp page calls an ajax in another jsp page, that brings xml from the server (using a jar file etc...).
I do get the xml from the second jsp, but I get it covered with html tags:
html
head
body...
my xml....

I don't want these xml tags. I want only my pure xml...

my first xml calls: xmlhttp.open("GET",url,true);
to the second one that gets the xml and do back: out.print(str); , that contains all the html tags....

Thanks for any advice.
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3267
    
  52

Setting the content type to xml would work.
<%@ page contentType="text/xml"%>

Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
moshi cochem
Ranch Hand

Joined: Nov 10, 2009
Posts: 91
Thanks a lot my friend, you helped me a lot !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp - Ajax - xml problem