Patching JBoss Portal for UTF-8 character set support

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2005 10:40 AM
We have patched JBoss Portal to correctly set the UTF-8 encoding for pages. But - the patch has not been applied to the specific JBoss bundle you download with Alfresco yet.
We have uploaded a patch file for JBoss Portal to here:
http://www.alfresco.org/resource/portal-server-lib.zip
Stop JBoss, unZip the JAR file from the above location and overwrite the file at this location with the patched file:
alfresco\jboss\server\default\deploy\jboss-portal.sar\lib
And restart.
Thanks,
Kevin
We have uploaded a patch file for JBoss Portal to here:
http://www.alfresco.org/resource/portal-server-lib.zip
Stop JBoss, unZip the JAR file from the above location and overwrite the file at this location with the patched file:
alfresco\jboss\server\default\deploy\jboss-portal.sar\lib
And restart.
Thanks,
Kevin
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2005 05:46 AM
Hi Kevin,
The patch is not complete I think, if you apply it to the stock jboss-portal.sar there are still some issues. If you apply it to a redeployed jboss portal with the following fixes applied, it works fine and dandy
Fix 1:
core/src/main/org/jboss/portal/core/invocation/ContentTypeInterceptor.java
line 115, add
Fix 2:
/server/src/main/org/jboss/portal/server/servlet/AbstractMainServlet.java
line 76, replace doGet with the following:
Compile, deploy, unjar the .sar and apply your patch… now everything UTF8 works fine
Regards,
Michael
The patch is not complete I think, if you apply it to the stock jboss-portal.sar there are still some issues. If you apply it to a redeployed jboss portal with the following fixes applied, it works fine and dandy

Fix 1:
core/src/main/org/jboss/portal/core/invocation/ContentTypeInterceptor.java
line 115, add
response.setCharacterEncoding("UTF-8");
Fix 2:
/server/src/main/org/jboss/portal/server/servlet/AbstractMainServlet.java
line 76, replace doGet with the following:
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { log.info("Setting character encoding to UTF-8…"); req.setCharacterEncoding("UTF-8"); PortalServer container = getContainer(); ServerManager manager = container.getManager(); InvocationFactory ctx = manager.getInvocationContext(); Invocation invocation = ctx.decode(req, resp); invoke(invocation); }
Compile, deploy, unjar the .sar and apply your patch… now everything UTF8 works fine

Regards,
Michael
