Forums Register Login

How to display source code in browser?

+Pie Number of slices to send: Send
Well this question is repeated here in forum a lot of times but I have never got satisfactory reply. may be because I did not frame it properly. Lets try one more time. So here goes my question:

I want to show java, xml or whatever; source code in my jsp pages to user, means in the browser. I have seen in many blogs, jForum and now in coderanch that whenever we make use of code tags the code taking a very good formatting and style. Is there any open source libraries available to achieve this?

Waiting for a positive response.
+Pie Number of slices to send: Send
There's no secret to it - JForum (and numerous other sites) use the http://code.google.com/p/syntaxhighlighter/ library, which uses a combination of JavaScript and CSS to achieve its magic. If you examine the source code of a page that has a CODE tag you'll see it in action.
+Pie Number of slices to send: Send
Thanks Ulf. Let me try this also. Really happy to get a prompt reply as expected here.
Do Re Mi Fa So La Tiny Ad
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1359 times.
Similar Threads
Applet not loading due to IOException
How To Hide "Some" HTML Code From Displaying In Browser
How To Hide "Some" HTML Code From Displaying In Browser
How To Hide "Some" HTML Code From Displaying In Browser
package.html in src - should it be removed?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 15:00:06.