tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oskar Zinger <oskar.zin...@micromuse.com>
Subject get/setAttribute and getParameter...
Date Sat, 02 Jun 2001 18:45:13 GMT
Hi,
What is more time consuming?

JSP1:
<% request.setAttribute("FLAG", new Boolean("true")); %>
<jsp:include page="JSP2.jsp" flush="true"/>

JSP2:
<% boolean FLAG = ((Boolean)
request.getAttribute("FLAG")).booleanValue();
     if (FLAG) {
       ..........
       ...........
     }
%>

OR?:

JSP1:
<jsp:include page="JSP2.jsp?FLAG=true" flush="true"/>

JSP2:
<% String FLAG = request.getParameter("FLAG");
      if (FLAG.equals('true")) {
         ..........
         ..........
      }
%>

OR?:

JSP1:
<jsp:include page="JSP2.jsp?FLAG=true" flush="true"/>

JSP2:
<% boolean FLAG = (new
Boolean(request.getParameter("FLAG"))).booleanValue();
      if (FLAG) {
         ..........
         ..........
      }
%>


AND, which way is it best practiced.

Thankss for any help!
--
Oskar Zinger


Mime
View raw message