John Steel wrote:
> I've been using this pattern for some time with excellent results:
> <%
>     if (user == null) {
> %>           
>      <%@ include file="/jsp/loginpanel.jsp" %>
> <%
> } else {
> %>   
>      <%@ include file="/jsp/logoutpanel.jsp" %>
> <%
> }
> %>   
> I'm curious how this affects performance. In once sense, the "assembled" 
> jsp is being changed each visit. So is it rebuilt each time? What gets 
> cached?

It is much less complicated than you are imagining.  <%@ include %> is a 
static compilation, means that effectively /jsp/loginpanel.jsp and 
/log/logoutpanel.jsp are cut and paste into your main JSP before it is 
compiled.  There is no caching or recompiling or anything, anymore than 
the following code would be recompiled or cached specially:

<%
if (user == null) {
   %>Red<%
} else {
   %>Blue<%
}
%>

-- 
Serge Knystautas
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to