Anonymous committed de92cc5

Trying to fix content type issue on jboss portal 2.2.0
22:39:43,484 ERROR [Jsr168Dispatcher] Could not execute action
java.lang.IllegalStateException: No content type defined
at org.jboss.portal.server.output.FragmentResult.getOutputStream(
at org.jboss.portal.portlet.impl.RenderResponseImpl.getPortletOutputStream(
at org.jboss.portal.portlet.impl.DispatchedHttpServletResponse$1.<init>(
at org.jboss.portal.portlet.impl.DispatchedHttpServletResponse.getOutputStream(
at javax.servlet.ServletResponseWrapper.getOutputStream(
at com.opensymphony.webwork.portlet.result.PortletVelocityResult.executeRenderResult(
at com.opensymphony.webwork.portlet.result.PortletVelocityResult.doExecute(
at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(
Issue number:
Obtained from:
Submitted by:
Reviewed by:


Comments (0)

Files changed (1)


                 contentType = contentType + ";charset=" + encoding;
+            response.setContentType(contentType);
             VelocityManager velocityManager = VelocityManager.getInstance();
             Template t = getTemplate(stack,
                     velocityManager.getVelocityEngine(), invocation,
             Context context = createContext(velocityManager, stack, request,
                     response, finalLocation);
             Writer writer = new OutputStreamWriter(response.getOutputStream(),
-            response.setContentType(contentType);
             t.merge(context, writer);
             // always flush the writer (we used to only flush it if this was a
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.