Websphere decoding requests on its own

In our application, the browser encodes all request parameters with UTF-8 encoding and at web container level we decode them using the same UTF-8 encoding. On one of our Websphere instances, it is not working correctly. For some reason WAS is trying to decode those parameters using some other encoding. So all the parameters even before reaching our Java code get garbled. Because of this we could not process Japanese characters. Is there a setting on WAS that might be causing this?  
WAS version:  5
OS version:   Windows 2003
Web Server:  IBM Http Server

I tried looking at options provided by http://www-306.ibm.com/software/globalization/j2ee/encoding.jsp, but that didnt help.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Please help me understand this here:
"On one of our Websphere instances, it is not working correctly"

Do you mean that the same application works okay on One server and not on other ? Are they in a cluster ? Is the application on both servers from the same build ?
mrgordonzAuthor Commented:
Yes the same applicaiton of same build works okay on other websphere installations. The WAS installation having this problem has clustering enabled.

Surprisingly JP strings coming out of Web App are getting displayed correctly. Only JP characters getting into Web App are getting corrupted. By debugging the application, we found that strings coming out of request.getParameter() are corrupt. We are using request.setCharacterEncoding("UTF-8") to handle encoding of incoming characters.

By comparing two instances of WAS (one that is working and one that is not working) we verified that file.encoding is correct for both instances.

One more thing that we realized was, browser converts JP string ようこそ as %E3%82%88%E3%81%86%E3%81%93%E3%81%9D (UTF-8 encoded 12 bytes), but somehow it reaches to web container code as %C3%A3%C2%82%C2%88%C3%A3%C2%81%C2%86%C3%A3%C2%81%C2%93%C3%A3%C2%81%C2%9D (24 bytes).
I would inquire the Request's encoding style , convert the data in to bytestream and encode with utf-8.


String myparam=request.getParameter("FILEDNAME");
String encoding=request.getCharacterEncoding();
String paramValue=new String(myparam.getBytes(encoding),"utf-8");

See how this turns out.

Since you seem to think the configuration on the WebSPhere instances (both where working and not working) is same  ,  I wouls look at the web server configurations.

What web server is used ? Is same web server used in both successfull and failed cases ?

Sorry to ask more questions.

Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

mrgordonzAuthor Commented:
The IBM Http Server is used. But we tried accessing the App server directly (by using :9080 port) and still seem to be having the same problem.
mrgordonzAuthor Commented:
One more strange thing that I observed was whenever we connect to their system, the response gets some "LtpaToken" added to cookies. WAS adds this token as part of SSO or Clustering?
mrgordonzAuthor Commented:
Looks like its a bug within WAS5.1.1.4. http://www-1.ibm.com/support/docview.wss?rs=0&uid=swg21210548 :)
PAQed with points (500) refunded

Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.