This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes Escape HTML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Escape HTML" Watch "Escape HTML" New topic
Author

Escape HTML

saumil baxi
Ranch Hand

Joined: Apr 18, 2008
Posts: 58
Hi,
Following is the jsp code




The problem that I am getting is. It does not convert & into Escape HTML form..

Is there any taglib or other method available to convert special character into HTML escape character.

Thanks,
Saumil
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

<cut>


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

And for doing it in a place where tags cannot be used:

${fn:escapeXml(value)}

Read the JSTL Spec for more information.
saumil baxi
Ranch Hand

Joined: Apr 18, 2008
Posts: 58
i tried <cut > it didnt work.. []
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

"it didn't work" is the most useless phrase you could post here.

What did happen? What did you expect to happen? What do you want to happen?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Escape HTML
 
Similar Threads
Doubt in c:set tag
Cookie problem
Getting id with javascript !
[JSTL] how can I convert values (string to int) in JSTL
problem with tag files