*
The moose likes Struts and the fly likes Encoding problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Encoding problem" Watch "Encoding problem" New topic
Author

Encoding problem

Paras Jain
Ranch Hand

Joined: Feb 26, 2005
Posts: 137
Hi,
I am using Struts with Tomcat 5
I am using bean write property as


and setting the linkValue property of testForm to
<A href='test'> abc </A>

I expect the html to be generated as
<td class="text" bgColor="#dedede"><A href='test'> abc </A></td>

but I am getting the html as
& lt ;td class="text" bgColor="#dedede"& gt ; & lt ;A href=& #39 ;test& #39 ;> abc & lt ;/A& gt ;& lt ;/td& gt ;

Therefore on the browser I am getting the value as
<A href='test'> abc </A> instead of a link

What could be the reason for this problem? Should I correct encoding somewhere?I am using UTF-8 as of now
[ May 02, 2007: Message edited by: Paras Jain ]

Paras Jain
SCJP 5.0
H Ritwick
Greenhorn

Joined: Mar 15, 2006
Posts: 18
Try using filter=false in bean write.
http://struts.apache.org/1.2.7/userGuide/struts-bean.html#write
Paras Jain
Ranch Hand

Joined: Feb 26, 2005
Posts: 137
Yes it worked. Thanks
 
 
subject: Encoding problem