aspose file tools*
The moose likes JSP and the fly likes Display Code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Display Code" Watch "Display Code" New topic
Author

Display Code

Thana Bujakorn
Greenhorn

Joined: Jan 04, 2004
Posts: 11
Hi
This is probably a silly question but how do I display JSP code in HTML. Tomcat compiles the code everytime.
Thanks
[ September 01, 2006: Message edited by: Thana Bujakorn ]

(scjp 1.4)
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You don't.
JSP code never gets sent to the browser.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Philipp Volkemer
Greenhorn

Joined: Nov 02, 2005
Posts: 1
But it should be possible.
Check out the jsp-examples that come with Tomcat. You can actually display the source code there.

Well, thinking about you probably can't do it with dynamic content.
The jsp-examples source files are all static.
[ September 01, 2006: Message edited by: Philipp Volkemer ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

There is no mechanism within JSP for showing JSP source code.
In the example app that ships with Tomcat the a copy of the code was presented as plain text.
Thana Bujakorn
Greenhorn

Joined: Jan 04, 2004
Posts: 11
Thanks!!!
everyone
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display Code
 
Similar Threads
JasperException
Two's complement question
Expand and Collapse button: how to find the status of the button
how to embed pdf in html
Creating List/Array of Managed Beans