Robert, By conceptions I be by your side, but in real life happened situations that I was described above. For example: I must define header, that can hightlight menu of current subsystem of website and the same in footer (hightliting menu).
Follow by conception I must write header.jsp and footer.jsp that can be live separately. But this code dublication I guess. So if we use follow: index.jsp: <%@ include file="/includes/top.jsp" %> <%@ include file="/includes/subsystemDetection.jsp" %> <%@ include file="/includes/header.jsp" %> ... <%@ include file="/includes/footer.jsp" %> in file subsystemDetection.jsp I will detec subsystem and define global variable what I'll be used in header.jsp and footer.jsp for highlighting menu items. Best regarts, Alexey -----Original Message----- From: Robert F. Beeger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 3:27 PM To: [EMAIL PROTECTED] Subject: Re: [Eap-features] JSP improving (JSP depends) Hi! -1 No offense meant, but this seems to be bad code style to me. It's okay to split a JSP up into logical units. But the only reason you have here is that the JSP is too big for you. It's ok when the included parts use some objects that are defined in the including JSP, but to define some objects and imports in one of the included files and use them in other included files looks strange to me. It will be hard to maintain such code, I guess. Wednesday, March 20, 2002, 12:32:37 PM, Alexey A. Efimov wrote AAE> I'll be give +10 for follows (maybe somebody agree with me): AAE> if I have WEB Application module. And the structure of this module AAE> is complex - one JSP compiled from many statical includes (small AAE> pices) JSPs. For example: AAE> big.jsp: AAE> <%@ include file="/includes/top.jsp" %> AAE> <%@ include file="/includes/1.jsp" %> AAE> <%@ include file="/includes/2.jsp" %> AAE> <%@ include file="/includes/3.jsp" %> AAE> This no troubles. Follow. AAE> top.jsp: AAE> <%@ page import="java.util.* %> <%-- For example --%> AAE> And it's no troubles too. Troubles follow: AAE> 1.jsp: AAE> <% AAE> List list = new ArrayList(); // This hightlight as error %>> AAE> 2.jsp: AAE> <% AAE> list.add("Hi"); // This hightlight as error list.add("Hello"); // AAE> This hightlight as error list.add("Hey"); // This hightlight as AAE> error %>> AAE> 3.jsp AAE> <% AAE> SortedSet tree = new TreeSet(); // This hightlight as error AAE> tree.addAll(list); // This hightlight as error %>> -- Greets Robert _______________________________________________ Eap-features mailing list [EMAIL PROTECTED] http://www.intellij.com/mailman/listinfo/eap-features
