Author: julien(a)jboss.com
Date: 2007-04-17 04:45:57 -0400 (Tue, 17 Apr 2007)
New Revision: 6977
Modified:
trunk/core/src/main/org/jboss/portal/core/theme/PageRendition.java
trunk/server/src/main/org/jboss/portal/server/PortalConstants.java
trunk/theme/src/main/org/jboss/portal/theme/LayoutDispatcher.java
Log:
JBPORTAL-1340 : Wrong character encoding in pages
Modified: trunk/core/src/main/org/jboss/portal/core/theme/PageRendition.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/theme/PageRendition.java 2007-04-16 22:50:19
UTC (rev 6976)
+++ trunk/core/src/main/org/jboss/portal/core/theme/PageRendition.java 2007-04-17 08:45:57
UTC (rev 6977)
@@ -70,6 +70,16 @@
/** Performs the page rendition. */
public void render(MarkupInfo markupInfo, ServletContextDispatcher dispatcher) throws
IOException, ServletException
{
+ // Compute correct content type response header
+// String contentType = rendererContext.getContentType() + "; charset=" +
rendererContext.getCharset();
+ String contentType = markupInfo.getContentType() + "; charset=" +
markupInfo.getCharset();
+
+ // Set charset and content type on the response
+ dispatcher.getResponse().setContentType(contentType);
+ dispatcher.getResponse().setCharacterEncoding(markupInfo.getCharset());
+
+
+ //
ThemeContext themeContext = new ThemeContext(theme,
pageService.getThemeService());
//
Modified: trunk/server/src/main/org/jboss/portal/server/PortalConstants.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/server/PortalConstants.java 2007-04-16 22:50:19
UTC (rev 6976)
+++ trunk/server/src/main/org/jboss/portal/server/PortalConstants.java 2007-04-17 08:45:57
UTC (rev 6977)
@@ -35,7 +35,7 @@
public class PortalConstants
{
/** Current version. */
- public static Version VERSION = new Version("JBoss Portal", 2, 6, 0, new
Version.Qualifier(Version.Qualifier.Prefix.BETA, "1"), "Ninja");
+ public static Version VERSION = new Version("JBoss Portal", 2, 6, 0, new
Version.Qualifier(Version.Qualifier.Prefix.CR, "1"), "Ninja");
/** The default portal name. */
public static String DEFAULT_PORTAL_NAME = "default";
Modified: trunk/theme/src/main/org/jboss/portal/theme/LayoutDispatcher.java
===================================================================
--- trunk/theme/src/main/org/jboss/portal/theme/LayoutDispatcher.java 2007-04-16 22:50:19
UTC (rev 6976)
+++ trunk/theme/src/main/org/jboss/portal/theme/LayoutDispatcher.java 2007-04-17 08:45:57
UTC (rev 6977)
@@ -101,11 +101,6 @@
{
try
{
- // Set charset and content type on the response
- dispatchedResponse.setContentType(rendererContext.getContentType().toString());
- dispatchedResponse.setCharacterEncoding(rendererContext.getCharset());
-
- //
RequestDispatcher dispatcher =
dispatchedServletContext.getRequestDispatcher(layoutURI);
//