According to the JSR 168 Spec PLT 11.1 PortletRquest Interface, Section PLT 
11.1.13 anonymous wrote : Request attributes are objects associated with a 
portlet during a single portlet request. Request attributes may be set by the 
portlet or the portlet container to express information that otherwise could 
not be expressed via the API. Request attributes can be used to share 
information with a servlet or JSP being included via the 
PortletRequestDispatcher.

This suggests that an attribute set in the ActionRequest should be propagated 
to a JSP. But if I set an attribute in processAction:

public void processAction(ActionRequest request, ActionResponse response) 
throws PortletException
  | {
  |     // some processing done here .... 
  |     request.setAttribute("myattribute", "some object");
  | }

then it does not get propagated to my JSP and the result of

<% MyObject oby = (MyObject)renderRequest.getAttriubte("myattribute"); %>

is null. Is this a bug or do I misinterpret the JSR 168 Spec?

Either way it's a shame as this means I have to stick all information to the 
PortletSession even if it's related to a specific request. From Servlets I am 
used to sticking objects created while handling a request into a request 
attribute rather then a session attribute (unless it's  information which I 
will need for future requests like user information).

Best Regards,

Anette

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037074#4037074

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037074
_______________________________________________
jboss-user mailing list
[EMAIL PROTECTED]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to