Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
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: Thu, 3 Jun 2004 8:39 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]

Reply via email to