Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Struts
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 16th, 2008, 11:32 PM
Authorized User
 
Join Date: Sep 2008
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..




 
Old October 18th, 2008, 11:24 PM
Registered User
 
Join Date: Oct 2008
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.

 
Old October 19th, 2008, 09:28 PM
Authorized User
 
Join Date: Sep 2008
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

 
Old October 19th, 2008, 10:44 PM
Authorized User
 
Join Date: Sep 2008
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






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 03: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 07:47 AM
encoding alihussein3 Javascript How-To 1 October 28th, 2003 05:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.