File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Android Security Essentials Live Lessons this week in the Android 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: 60822
    
  65

<cut>


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

Joined: Jan 10, 2002
Posts: 60822
    
  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: 60822
    
  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?
 
It is sorta covered in the JavaRanch Style Guide.
 
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