my dog learned polymorphism*
The moose likes Servlets and the fly likes any function which convert text in HTML encoded form..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "any function which convert text in HTML encoded form....." Watch "any function which convert text in HTML encoded form....." New topic
Author

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

Ghazanfar Qureshi
Greenhorn

Joined: Nov 15, 2000
Posts: 20
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

Joined: Oct 31, 2000
Posts: 527
Hai,
U can parse the HTML content using these API's,
javax.swing.text.html,
javax.swing.text.html.parser
using HTMLEditorKit.
Anil.


SCJP 1.5, SCEA, ICED (287,484,486)
Anil Vupputuri
Ranch Hand

Joined: Oct 31, 2000
Posts: 527
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

Joined: Jan 31, 2000
Posts: 1467
Ghazanfar Qureshi,
Is this what you are looking for?
regds
maha anna
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Oops, Maha Anna fell foul of gratuitous HTML processing. Maybe it should have really been:


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
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

Joined: Nov 15, 2000
Posts: 20
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: any function which convert text in HTML encoded form.....
 
Similar Threads
How to save state of a form.
Dynamically create TextBox array in Javascript.
combo and text box
How do I remove quotes from around string a user inputted in text box?
Form within form