my dog learned polymorphism
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
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp - Ajax - xml problem" Watch "jsp - Ajax - xml problem" New topic

jsp - Ajax - xml problem

moshi cochem
Ranch Hand

Joined: Nov 10, 2009
Posts: 91
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:
my xml....

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

my first xml calls:"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

Joined: Jul 29, 2008
Posts: 3925

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:
subject: jsp - Ajax - xml problem
It's not a secret anymore!