Im a little unclear how a JSPPortlet is different from a ServletInvoker calling a JSP. Differences I can see is that with the JSPPortlet, we will automatically search for the JSP based on Jetspeed's fallback algorithm (thats nice), add the default objects, and we use the Turbine service to invoke it. With the ServletInvoker, we simply get a dispatcher and include the JSP.
It seems like there a lot of overhead (invoking other servlets) with aggregating JSPs, compared to Turbine/Velocity's approach of working within the same servlet (Turbine). I've also noticed that when I run the JSP-based templating, it runs a lot slower than Velocity (perceptually). I believe there are metrics in the code somewhere to measure this... Here are some of the possible examples of invoking other servlets, although JSP always seems to get invoked via the request dispatcher include mechanism: - a plain old servlet (which you have already provided) - a Velocity Servlet http://jakarta.apache.org/velocity/developer-guide.html#Using%20Velocity%20I n%20Servlets - another Turbine servlet - a JSP (we could also illustrate Struts or Jakarta Taglibs) Thanks for the examples! I will include them in the Jetspeed Tutorial, David ----- Original Message ----- From: "Ozgur Balsoy" <[EMAIL PROTECTED]> To: "'Jetspeed Users List'" <[EMAIL PROTECTED]> Sent: Saturday, February 02, 2002 2:32 PM Subject: tRE: new ServletInvokerPortlet > > Could you provide me an example using velocity or jsp (instead of > out.println)? I will include it in the tutorial > > I have noticed that this is what you were looking for. This JSP is very > similar to hello.vm which is already in the Jetspeed package. > > Ozgur > > <%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld' > prefix='jetspeed' %> > <%@ page import="org.apache.jetspeed.util.URILookup" %> > > <% > if( request.getParameter("x_login") == null ) { %> > > <form method="get" action="<jetspeed:uriLookup type="Home" />"> > <p> Username:<input type="text" name="x_username" size="20"><br> > Password:<input type="password" name="x_password" > size="20"><br> > <input type="submit" name="x_login" value="Login"> > </p> > </form> > > <% } else { %> > > <p> You have logged in as <%= > request.getParameter("x_username")%><br> > and your password is <%= > request.getParameter("x_password")%> > </p> > <p> <a href="<jetspeed:uriLookup type="Home" />"> > Click here for the form</a> > </p> > <% } %> > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
