tags:

views:

55

answers:

2

My project is under eclipse, Tomcat, Spring, Hibernate. In my web app when I try go to enother webPage :

public void onSubmit()
        {                                   
            String value="Д";
            PageParameters pars=new PageParameters();
            pars.add("strname", value);
            setResponsePage(FilterClient.class, pars);
        }

and after geting that parameter :

public FilterClient(final PageParameters parameters) {
        String strName="";
        if(parameters.containsKey("strname")){
            strName=parameters.getString("strname");
        }

the value of parameter is

Д instead of Д

Please help me to solve this issue.

+2  A: 

what encoding do you use?

You should try using UTF-8.

Try writing following in your templates at the top:

<?xml version="1.0" encoding="UTF-8" ?>

Wicket determines per default the output encoding based on that.

There is a little information about it in the javadoc:

http://wicket.apache.org/docs/1.4/org/apache/wicket/Page.html#configureResponse%28%29

Martin
+4  A: 

You should try to set URIEncoding in Tomcat server.xml configuration file.

http://wiki.apache.org/tomcat/FAQ/CharacterEncoding

Best practice is use only UTF-8 encoding in your application (in database and web-pages).

leonidv
Thank's Leonid. I have added URIEncoding="UTF-8" in the connector tag of my tomcat server.xml and it's worked.
Daler