You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-user@portals.apache.org by Paul Spencer <pa...@mindspring.com> on 2004/03/13 14:41:08 UTC

getting request attributes from the session

Inside a JSP, should the request attributes in request and renderRequest 
objects be the same?

My read of section PLT 16.3 of the JSR implies that both object will 
return attributes from a common list of request attribute. Thus, the 
attributes are the sames.

I am migrating a JSP that gets attribute values via JSTL. The associated 
JSR 168 portlet application calls request.setAttribute() to set request 
attributes used by the JSP.  Currently the attributes are not available 
as request attributes, only as renderRequest attributes.  Thus 
preventing the use of JSTL when getting request attributes.

As an example:

   request.setAttribute("att1", "value1");
   renderRequest.setAttribute("att2", "value2");

   Should both request.getAttribute() and renderRequest.getAttribute()
   should return the same values for the attribute "att1" and "att2"?

Paul Spencer






Re: getting request attributes from the session (Corrected)

Posted by Stefan Hepper <st...@hursley.ibm.com>.
Paul Spencer wrote:
> I need to correct parts of the original posting.
> 
> 
>> Inside a JSP, should the request attributes in request and 
>> renderRequest objects be the same?
>>
>> My read of section PLT 16.3 of the JSR implies that both object will 
>> return attributes from a common list of request attribute. Thus, the 
>> attributes are the sames.
> 
> 
> Is the above statement correct?
> 

yes, as the included JSP has a servlet request that is based on the 
portlet request, besides that additional attributes mentioned in 16.3.1 
of course.

>>
>> I am migrating a JSP that gets attribute values via JSTL. The 
>> associated JSR 168 portlet application calls request.setAttribute() to 
>> set request attributes used by the JSP.  Currently the attributes are 
>> not available as request attributes, only as renderRequest 
>> attributes.  Thus preventing the use of JSTL when getting request 
>> attributes.
> 
> 
> In Pluto the request attribute and the renderRquests attribute objects 
> are the same. I am not reporting a problem with Pluto.
> 
>>
>> As an example:
>>
>>   request.setAttribute("att1", "value1");
>>   renderRequest.setAttribute("att2", "value2");
>>
>>   Should both request.getAttribute() and renderRequest.getAttribute()
>>   should return the same values for the attribute "att1" and "att2"?
>>
>> Paul Spencer
>>
>>

OK, seems like we did not put that part into the spec, yes that should 
be added that the servlet response attribute methods must be based on 
the portlet response ones.


Stefan
> Paul Spencer wrote:
> 
> 
> 
> 


Re: getting request attributes from the session (Corrected)

Posted by Paul Spencer <pa...@mindspring.com>.
I need to correct parts of the original posting.


> Inside a JSP, should the request attributes in request and renderRequest 
> objects be the same?
> 
> My read of section PLT 16.3 of the JSR implies that both object will 
> return attributes from a common list of request attribute. Thus, the 
> attributes are the sames.

Is the above statement correct?
> 
> I am migrating a JSP that gets attribute values via JSTL. The associated 
> JSR 168 portlet application calls request.setAttribute() to set request 
> attributes used by the JSP.  Currently the attributes are not available 
> as request attributes, only as renderRequest attributes.  Thus 
> preventing the use of JSTL when getting request attributes.

In Pluto the request attribute and the renderRquests attribute objects 
are the same. I am not reporting a problem with Pluto.

> 
> As an example:
> 
>   request.setAttribute("att1", "value1");
>   renderRequest.setAttribute("att2", "value2");
> 
>   Should both request.getAttribute() and renderRequest.getAttribute()
>   should return the same values for the attribute "att1" and "att2"?
> 
> Paul Spencer
> 
> 
Paul Spencer wrote: