[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jetspeed-user
Subject:    Re: Portlets and JSP fragments
From:       ingo schuster <ingo.apache () web ! de>
Date:       2001-03-07 8:16:15
[Download RAW message or body]

My last mails didn't make it through to the new list, so I try again:

At 07:43 03/02/01, David Sean Taylor wrote:
>Ingo,
>
>When I use JSP templating, a portlet cannot output JSP expressions to the
>stream.
>
>Im looking at default.jsp, and it has
>
>  <jsp:include page="<%= screenJsp %>" flush="true" />
>
>Which evals to 'ecs.jsp', which contains one tag:
>
><jetspeed:ecsscreen />
>
>If the tag's output has JSP expressions, they will never be evaluated.
>
>Maybe this is wishful thinking, but I was under the impression that portlets
>could contain resuable JSP-fragments.

David, this can't possibly work this way: JSPs are tanslated into servlets 
by a JSP-processor upon their first request. It is this JSP processor that 
interprets the JSP-Tags during this translation. It'd have an enormous 
performance impact if this translation had to be done for each request - 
"dynamic insertion of JSP-Tags" is hence not possible.
All you can do is either to produce dynamic content within the portlet 
itself or (dynamically) include a JSP via RequestDispatcher.include - just 
like you suggested below.

Sorry to dissapoint you,

         ingo.

>Is this something that the new Portlet API will support,
>or will I always have to resort to writing a JSPPortlet which does something
>like the ECS example below to include JSP fragments:
>
>     public void output(PrintWriter out)
>     {
>         ServletContext ctx = rundata.getServletContext();
>         RequestDispatcher dispatcher = ctx.getRequestDispatcher(url);
>         try
>         {
>              dispatcher.include(rundata.getRequest(),
>rundata.getResponse());
>
>
>thanks,
>
>-- david
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic