You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ji...@apache.org on 2004/06/03 17:40:56 UTC

[jira] Created: (JS2-67) Have to manually set the content type on the response object in certain portlets

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: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


[jira] Closed: (JS2-67) Have to manually set the content type on the response object in certain portlets

Posted by ji...@apache.org.
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: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


[jira] Commented: (JS2-67) Have to manually set the content type on the response object in certain portlets

Posted by ji...@apache.org.
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: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org