Why is the servlet request not available in the portlet API
Posted
by John Smith
on Stack Overflow
See other posts from Stack Overflow
or by John Smith
Published on 2010-05-13T11:11:14Z
Indexed on
2010/05/13
11:14 UTC
Read the original article
Hit count: 297
The portlet API deos not provide any reference to the enclosing servlet request and response objects. I know it is not the preferred model of interaction with the user, but it seems draconian to remove all access.
I understand that for portlet driven interaction with the user, you want to use portlet URLs, and let the portlet container manage all the complexity.
However if you have a number of portlets which are basically showing variants of the same data, it makes sense for them to be able to use the enclosing request to drive the data.
We ended up using using a Liferay specific call to get the request, and it all seems to work as we wish.
However I do feel the guilt.
So my question really is, is there an underlying deep reason for the prohibition, or is it just to enforce the authors view of the API environment?
© Stack Overflow or respective owner