learn java
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 Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Encoding problem" Watch "Encoding problem" New topic

Encoding problem

Paras Jain
Ranch Hand

Joined: Feb 26, 2005
Posts: 137
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

Joined: Mar 15, 2006
Posts: 18
Try using filter=false in bean write.
Paras Jain
Ranch Hand

Joined: Feb 26, 2005
Posts: 137
Yes it worked. Thanks
Have you tried LearnNowOnline? http://www.learnnowonline.com/
subject: Encoding problem