Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML based JSP Documents

 
Reema Patel
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I've a JSP 2.0 compliant engine, I'm trying to create a JSP view page with XML syntax. The page goes through translation and compilation stage fine. However, the browser output is not that I'm expecting. I get to see the following message:


This XML file does not appear to have any style information associated with it. The document tree is shown below.

.............Followed by XML tree..............

This is the browser output in Mizilla Firefox. In IE, i just get to see the XML tree.
Any help shall be highly appreciated.

Regards,
Reema,
SCJP
[ November 26, 2007: Message edited by: Reema Patel ]
 
Sandeep Krish
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The below code did not give me any error. Which container do you use?
<jsp irective.page import ="java.util.*" />
<html>
<body>

<jsp:scriptlet>
out.println("Hi there");
</jsp:scriptlet>
</body>
</html>
 
Reema Patel
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sandeep,
Thanks for the post.

I'm using Tomcat 5.

BTW, I didn't get any error. It's just that my web browser (both Mozilla and IE) can't display the actual output; I can see the XML tree.


Thanks,
Reema
 
Sandeep Krish
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by actual output? in the above code the output is just "Hi there" Do you mean the browsers does not show that message? Where did you see the XML tree? Are you expecting the output as in XML format?
 
Reema Patel
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sandeep.
Thanks again for posting!
Following is what I get to see in my web browser.

 
Sandeep Krish
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(If you can) zip the source code and send me to mksdeep@gmail.com. Let me try.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What content type is used when serving the page? Make sure it is "text/html".
 
Reema Patel
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,
Thanks for the post. I missed out such a trivial thing. Thanks for spotting the mistake.

It works fine now.

Thanks All,
Reema
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic