This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Struts and the fly likes struts 2 property tag issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts 2 property tag issue" Watch "struts 2 property tag issue" New topic

struts 2 property tag issue

vishal kola

Joined: Jan 26, 2011
Posts: 2
I am struggling with the property tag of Strust2 .

I am using it as follows
<s:property value="#question.questionText"/>

and the result is as TEXT as follows

asdas<img alt="sdasdasdaasdasda" src="http://localhost:8080/examjockey/images/manage-exams.png" align="none">

How do I make sure that I get something like this

asdas <image>

I mean I want it to show up as the HTML tags intended and not as plain TEXT.

Please help
Shashank Ag
Ranch Hand

Joined: Dec 22, 2009
Posts: 88

write it as: <s:property value="#question.questionText" escape="false" />, it will do the job.

SCJP 91%, SCWCD 97%
vishal kola

Joined: Jan 26, 2011
Posts: 2
Thanks... it did work
I agree. Here's the link:
subject: struts 2 property tag issue
jQuery in Action, 3rd edition