jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject Re: Plugging in Implicit Objects
Date Wed, 21 Jan 2004 14:26:07 GMT
I'm not that familiar with the portlet spec, but I assume a filter could also be
used to create your attribute maps. No tags needed and the filter can apply to
every request so it's not tied to JSP.

Quoting Eric W Hauser <ehauser@indiana.edu>:

> I've got some portlet projects coming up, and the one thing the bothers me
> is that fact that EL expressions in JSPs are not easy to use.  A quick
> background of the problem: Each portlet has its own PortletRequest,
> PortletSession, and PortletContext objects which are just extensions of
> HttpServletRequest, HttpSession, and ServletContext objects.  Accessing 
> these objects from a JSP using requires a container specific tag that
> makes them available in the page context.  I would like to be able to
> access them using EL expressions.
> 
> I've been trying to come up with a workaround and came up with a couple of
> solutions.  First, I could just define a tag (i.e.
> <p:initPortletObjects/>) that would just make the attributes of these
> objects available in a Map that is stored in the PageContext.  Then, they
> called be accessed by ${pageScope.portletRequest.attribute}.  However, the
> downside to doing this is that I would have to run this tag on every page
> and it would be creating objects that may not get used.  My other option
> was to build my own version of the tag libraries and add these as
> implicit objects so that they could be resolved by the expression
> evaluator.  
> 
> I was thinking that there should be an easier way to accomplish this, but
> the spec doesn't define a way to plugin implicit objects.  I'm
> sure there would be other instances were this could be useful.  Just
> wondering if any had any thoughts/suggestions.
> 
> -------------------
> Eric Hauser
> ehauser@indiana.edu

-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org


Mime
View raw message