struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Selim Hendrickson <>
Subject Re: struts turkish character problem
Date Mon, 05 Jul 2004 09:38:55 GMT
Merhaba Eyup Bey,

We experienced a similar problem about a year ago. Below is the code we 
used for solving the issue. Hope it works for you too.
I belive there is a problem with the ActionForms with different 
encodings, therefore we wrote this small request preprocessor.
You could also use a ServletFilter if you want.



IZTEK Consulting Services
Software Engineer
selimhendrickson [at]
0232 750 6557

package iyte.oi.struts.control;

import iyte.oi.util.tracer.Debug;
import iyte.oi.web.util.SessionParameters;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.RequestProcessor;

public class RequestProcessorOI extends RequestProcessor {

     * Constructor for RequestProcessorOI
    public RequestProcessorOI() {
    protected boolean processPreprocess(HttpServletRequest request, 
HttpServletResponse response) {           
        boolean returnVal = super.processPreprocess(request, response);
        try {
        } catch(UnsupportedEncodingException uee) {
            Debug.println("Unsupported Encoding: ISO-8859-9");
        if(!returnVal) return returnVal;       
        return true;


Eyup TEKIN wrote:

>there is a webapp including oracledatabase(datas are hold with turkish
>character) ejbs on borlandapplicationserver ,tomcat,struts and jsps.
>i can write turkish character in jsp page side.but dynaaction form creates a
>selection list.and that list cant show turkish tomcat's
> file there is a "-Dfile encoding=1254" parameter.and i wrote in
>the struts part below convertion
>byte[] s0_byte = satirArray[0].getBytes("Cp1254");
>satirArray [1]= new String(s1_byte, "Cp1252");
>i solved problem but how can i solve this problem in another way? maybe
>general solution will be beter.
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message