• Post Reply Bookmark Topic Watch Topic
  • New Topic

Display HTML as XML in JSP

 
vivek dhiman
Ranch Hand
Posts: 153
Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I Have jsp page in which there is XML code as well. How can i display the whole Document as tags in jsp, like start from <html> also here the tags will display like XML tags.



Thanks
 
Mauro Trevigno
Ranch Hand
Posts: 99
Java Linux Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what you want to do seeing your HTML as tag but one thing you can do in you jsp,

before the <HTML> tag you can add this tag: <plaintext>
you should see everything in plaintext.

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mauro Trevigno wrote:before the <HTML> tag you can add this tag: <plaintext>


Not only would that create invalid HTML markup, but that element is obsolete and may not be supported in all browsers. It should not be used.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is there XML in the JSP in the first place?
 
vivek dhiman
Ranch Hand
Posts: 153
Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I want to display is as in attached screenshot.
html.png
[Thumbnail for html.png]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!