You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Graham <dg...@hotmail.com> on 2002/10/17 15:38:51 UTC
Re: Pros and Cons of Hard coding a JSP page in a Struts template vs using a
parameter?
You won't notice any difference in speed or memory between the two. Looks
like the second one is more flexible though. Why are you importing
javax.servlet and javax.servlet.jsp?
David
>From: "Smith, Johnathan M." <js...@ubspw.com>
>Reply-To: "Struts Users Mailing List" <st...@jakarta.apache.org>
>To: "'struts-user@jakarta.apache.org'" <st...@jakarta.apache.org>
>Subject: Pros and Cons of Hard coding a JSP page in a Struts template vs
>using a parameter?
>Date: Thu, 17 Oct 2002 08:26:42 -0400
>
>I would like to know the pros and cons of hard coding a JSP page in a
>struts
>template.
>
>Which struts template is better on speed and memory?
>
>EXAMPLE1
><%@ page language="java" %>
><%@ page import="javax.servlet.http.*" %>
><%@ page import="javax.servlet.jsp.*" %>
><%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
><%@ taglib uri="/WEB-INF/cdd.tld" prefix="cdd" %>
><template:insert template="TempTest.jsp">
><template:put name="header" content="header.jsp"/>
><template:put name="navbar" content="navbar.jsp"/>
><template:put name="body" content="JSP/AddVendor.jsp"/>
></template:insert>
>
>EXAMPLE2:
><%@ page language="java" %>
><%@ page import="javax.servlet.http.*" %>
><%@ page import="javax.servlet.jsp.*" %>
><%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
><%@ taglib uri="/WEB-INF/cdd.tld" prefix="cdd" %>
><template:insert template="TempTest.jsp">
><template:put name="header" content="header.jsp"/>
><template:put name="navbar" content="navbar.jsp"/>
><template:put name="body" content="<%= request.getParameter(\"body\") %>"/>
></template:insert><HTML>
>
>I would think that example number 1 is better and faster?? From looking at
>the source code example 1 is bigger do to a include inline?
>
>
>--
>To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>For additional commands, e-mail:
><ma...@jakarta.apache.org>
_________________________________________________________________
Broadband? Dial-up? Get reliable MSN Internet Access.
http://resourcecenter.msn.com/access/plans/default.asp
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>