That is not a problem. Please take a look at
wicket-examples:/src/java/wicket/examples/encodings/*.java which shows
how to do it. Basically like (see below). Search the source for
configureResponse and the javadoc should as well.
public class Home extends WicketExamplePage
{
protected void configureResponse()
{
final Locale originalLocale = getSession().getLocale();
getSession().setLocale(Locale.GERMANY);
super.configureResponse();
final String encoding = "text/" + getMarkupType() + "; charset="
+ CharSetUtil.getEncoding
(getRequestCycle());
getResponse().setContentType(encoding);
}
Juergen
On 4/27/05, 叶卫国 <[EMAIL PROTECTED]> wrote:
> I solved the problem by adding a character encoding filter in web.xml....
>
> So porobably this is not a bug, but i think maybe wicket can do it better.
>
> At first, i want to call the HttpServletRequest.setCharacterEncoding method
> to change the encoding of request, but
>
> it's difficult because i can not find a point to override
> RequestCycle.onBeginRequest .
>
> It's my first time to ask help by mail list, thanks to all that answerd my
> question.
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Tell us your software development plans!
> Take this survey and enter to win a one-year sub to SourceForge.net
> Plus IDC's 2005 look-ahead and a copy of this survey
> Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>