• Post Reply Bookmark Topic Watch Topic
  • New Topic

Displaying HTML tags Retrieved From MySQL Database

 
Mark Gowdy
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I want to be able to enter HTML tags into text in a textarea, and store this on a db. Then I need to be able to display this text on a JSP, but actually implementing the HTML tags (ie, actually create a new paragraph instead of displaying <p> . However, the HTML tags are just written to the page.
Can anyone help on this topic? Is it how the text is stored on MySQL? Is it how the text is retrieved in the SELECT statement? Is it how the text is displayed on the JSP?
Any assistance would be most gratefully received.
Regards
Mark Gowdy
 
Mark Gowdy
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorted my problem.
Turns out that it was to do with the Struts tag <bean:write> in that there is an attribute that can be set to false called filter. This tag automatically by default filters out any HTML code in the text. Just had to set it to be false and it worked.
Rgds
Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!