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." <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
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: <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

_________________________________________________________________
Broadband? Dial-up? Get reliable MSN Internet Access. http://resourcecenter.msn.com/access/plans/default.asp


--
To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to