File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Android Security Essentials Live Lessons this week in the Android 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Encoding problem
 
Similar Threads
javax.servlet.jsp. JspException: Cannot find message resources under key
Struts 1 -- Wrong data displaying in my JSP page
GET html contents from a web server
wrapping issue
NullPointerException: Module 'null' not found