Message:
The following issue has been closed.
Resolver: David Sean Taylor
Date: Fri, 4 Jun 2004 11:19 AM
Not a bug, as the spec requires setContentType. See my comments
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/JS2-67
Here is an overview of the issue:
---------------------------------------------------------------------
Key: JS2-67
Summary: Have to manually set the content type on the response object in certain
portlets
Type: Bug
Status: Closed
Priority: Major
Resolution: WON'T FIX
Project: Jetspeed 2
Components:
Container
Versions:
2.0-dev/cvs
2.0-a1
Assignee: David Sean Taylor
Reporter: Scott T Weaver
Created: Thu, 3 Jun 2004 8:39 AM
Updated: Fri, 4 Jun 2004 11:19 AM
Description:
Created a simple portlet that extends javax.portlet.GenericPortlet and implmenet the
doView() method like this:
String url = getInitParameter("url");
response.getWriter().write("<a href=\""+url+"\" target=\"_blank\" >"+url+"</a>");
This does not work and logs an error that the content needs to be set before
getWriter() is called.
As soon as I added that a line that does that:
String url = getInitParameter("url");
response.setContentType("text/html");
response.getWriter().write("<a href=\""+url+"\" target=\"_blank\" >"+url+"</a>");
everything works fine.
Am I missing something in the spec, or is this really a bug?
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]