Hello.
Ephemeris Lappis
Le 15/08/2012 23:52, Nicolas LE BAS a écrit :
On 12-08-15 02:37 PM, Ephemeris Lappis wrote:
I think It's likely impossible anyway in portlets, since, for what I
know, there's no standard way to get the servlet request from the
portlet requests (action, render), and attributes set on these seem to
be local and not visible from Tiles...
You can't get the ServletRequest from the PortletRequest indeed, but
when you call requestDispatcher.include on the URL of a servlet, that
servlet receives a ServletRequest. And I believe this ServletRequest
comes with the same attributes that were set on the RenderRequest.
I think, I some tests I've done seem to confirm it, that attributes set
on a PortletRequest are scoped to the sole Portlet for its own use.
You say these attributes are not visible from Tiles... where are they
visible then? Are they visible from JSPs? I think you may be confusing
"definition attributes" with "request attributes", both are visible
from Tiles in different ways.
As PortletRequest attributes are not propagated to other portlets and
even less to the servlet request, Tiles will not see them. This is why
the servlet filter or the view preparer are good places, with the
difference that the latter only concerns the definitions that declare
it, when the filter may impact the whole servlet context.
The last point I want to check is the way a pure servlet filter will be
activated depending on the portlet container or the application server,
and the possible interferences between distinct portlet web
applications...
I can't help here... But please let us know of your findings, if this
is indeed the mainstream way of using Portlets, we should probably
make Tiles compatible with it.
Good luck
Nick