Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

any function which convert text in HTML encoded form.....

 
Ghazanfar Qureshi
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i need a function request.HTMLEncode() like in ASP which converts text in html e.g. if a bulletin board site and someone post a message <form name=""> <input type="submit" value="dd"></form> it wont create a form instead it should be written as a text
thanks for someone who solve my problem
 
Anil Vupputuri
Ranch Hand
Posts: 527
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
U can parse the HTML content using these API's,
javax.swing.text.html,
javax.swing.text.html.parser
using HTMLEditorKit.
Anil.
 
Anil Vupputuri
Ranch Hand
Posts: 527
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
By default in Java,request object's parameter gives u a string which is nothing but text.
Let me know ur question clearly.
Anil.
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ghazanfar Qureshi,
Is this what you are looking for?
regds
maha anna
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops, Maha Anna fell foul of gratuitous HTML processing. Maybe it should have really been:
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exactly Frank! I cut and pasted another method from one of my programs, thinking that I am doing the correct one. I didn't even realize until I read your post.
regds
maha anna
[This message has been edited by maha anna (edited November 29, 2000).]
 
Ghazanfar Qureshi
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for all who contribute i didnt expect such a response, i understand now how to do it i.e. i have to made my own fuction which will replace the tag starting and ending into HTML literals
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic