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 is
AAE> complex - one JSP compiled from many statical includes (small pices)
AAE> 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
AAE> list.add("Hello"); // This hightlight as error
AAE> list.add("Hey"); // This hightlight as error
%>>
AAE> 3.jsp
AAE> <%
AAE> SortedSet tree = new TreeSet(); // This hightlight as error
AAE> tree.addAll(list); // This hightlight as error
%>>
--
Greets
Robert
smime.p7s
Description: S/MIME Cryptographic Signature
