Announcement Announcement Module
Collapse
No announcement yet.
Sun One Portal Issue: contentType either contains a wildcard Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sun One Portal Issue: contentType either contains a wildcard

    I am getting following error in Sun One Portal. Is this a Sun One Portal issue or should framework set content type automatically?

    ERROR:
    ViewRendererServlet: 96 - Could not complete request
    java.lang.IllegalStateException: RenderResponseImpl.getWriter: contentType either contains a wildcard or is not set

  • #2
    To fix problem I included following code

    I tried to fix problem by including the following code in ViewRendererServlet
    Code:
           
     ...     	
                    if (view instanceof AbstractView) {
                		response.setContentType(((AbstractView) view).getContentType());
                	}
                    view.render(model, request, response);
    ...
    however I saw comment in InternalResourceView that
    // Note: The JSP is supposed to determine the content type itself.

    Is that in JSP spec?

    And if so does that mean thet Sun One Portal is performing incorrectly?


    the request passed into ViewRendererServlet is com.sun.portal.portlet.impl.RDResponseWrapper and a set content on it has no effect on wrapped response so that's why my solution did not work.


    What's the recommended approach or work-around here?

    Comment


    • #3
      Fixed (Hopefully?)

      I think this problem is fixed in the latest update to the Spring Portlet MVC framework, but I don't have an environment where I can test this. You can get the new download at:

      http://opensource.atlassian.com/conf...ay/JSR168/Home

      Let me know if it works.

      Comment

      Working...
      X