Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java Open Source > Struts
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Struts section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 17th, 2008, 12:32 AM
Authorized User
 
Join Date: Sep 2008
Location: , , Singapore.
Posts: 87
Thanks: 1
Thanked 0 Times in 0 Posts
Default charcter encoding

Hi,
i have a jsp in which i used
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

when i have spl chacters like (“two”) its displaying correctly in jsp but when i am setting the same in request and sending it
and using
String s = request.getParameters("...);

my s doesnt conatins the original string which was passed in the uel query string

i am developing webapplication using struts
where i need to do character encoding

Raj..




Reply With Quote
  #2 (permalink)  
Old October 19th, 2008, 12:24 AM
Registered User
 
Join Date: Oct 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try using a Character set filter:

http://wiki.apache.org/tomcat/Tomcat/UTF-8

I used the one on the referenced page in my projects, which I deployed using Tomcat with success.

Reply With Quote
  #3 (permalink)  
Old October 19th, 2008, 10:28 PM
Authorized User
 
Join Date: Sep 2008
Location: , , Singapore.
Posts: 87
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks ajmas for the article

i have followed the same steps mentioned for solving the problem but i am still facing the same issue

http://wiki.apache.org/tomcat/Tomcat/UTF-8

i have configured everything as mentioned in the article
can you suggest what might be the issue

1) configured web.xml
2) i have set the jsp header
3) written the filter class
4) cong/server.xml

i am able the print the the encoder which i have set in the web.xml from my action class before calling the request.getParameter(..

but still my value contains the â??

any suggestion how to go ahead...

Regards
Raj

regards
raj

Reply With Quote
  #4 (permalink)  
Old October 19th, 2008, 11:44 PM
Authorized User
 
Join Date: Sep 2008
Location: , , Singapore.
Posts: 87
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks Ajmas

my problem was solved thanks alot
i didnt use the filters jus configured the server.xml which worked out

Raj

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
encoding paarupalli J2EE 0 March 2nd, 2007 04:14 AM
file encoding arabuafef Classic ASP Basics 0 February 19th, 2007 09:46 AM
Encoding -webservices-why ? raghuraman_ace ASP.NET 1.0 and 1.1 Professional 0 August 28th, 2006 04:36 AM
how i set charcter set to a connection yoord BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 April 23rd, 2005 08:47 AM
encoding alihussein3 Javascript How-To 1 October 28th, 2003 05:23 AM



All times are GMT -4. The time now is 08:00 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.