velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject #parse() and UTF-8 output problem
Date Fri, 11 Jun 2004 03:19:23 GMT

In my web application, I have a Controller servlet which extends Velocity
Servlet. In the Controller servlet, I have

// set the request/response encoding once and for all
response.setContentType("text/html; charset=UTF-8");

This has been working great, the HTML rendered is in UTF-8.

However, today I modified template so that the common parts get extracted.
So, instead of

html header stuff
html footer stuff

I have


But, when I run the web app, the browser displays two weird characters in
the html page. When I looked at the html source, it is like

<html>< body>

So there is no newline between <html><body> which was in the header.vm.

When I take the response.setxxxx() encoding off and run the app again, the
html page is good again.

So, I guess the encoding messed up the #parse() somehow. But could not
figure this out.

Any help is greatly appreciated!


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

View raw message