The following comment has been added to this issue:
Author: David Sean Taylor
Created: Fri, 4 Jun 2004 11:18 AM
Body:
see PLT.12.3.1 in the Porlet spec:
"A portlet must set the content type of the response using the setContentType method
of the RenderResponse interface."
This is not a bug and Im going to close the issue.
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/JS2-67?page=comments#action_35906
---------------------------------------------------------------------
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: Unassigned
Priority: Major
Project: Jetspeed 2
Components:
Container
Versions:
2.0-dev/cvs
2.0-a1
Assignee:
Reporter: Scott T Weaver
Created: Thu, 3 Jun 2004 8:39 AM
Updated: Fri, 4 Jun 2004 11:18 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]