Title: Сообщение
Hello Michael,
 
Maybe example that i present i no good, but i was to show trouble. I try ansver.
 
>Having them multiple times in the assembled JSP is no problem
But i'll be not guaratied this by all servers. As i know earlet tomcat was throwde page with duplicate imports. And you have code dublication as is.
 
>IDEA cannot rely
When i put WEB application into IntelliJ project it shuld be scaned to detect relations (maybe recursive). Ok, then you can see that relation on WEB application load is not troubles.
So, when i made changes in application, the changes files scaned for detection changes in depended tree.  But, if one page included into several pages, this may made some troubles.
 
I guess that this JSP feature is needed.
 
Thanks
 
 
-----Original Message-----
From: Michael Descher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 20, 2002 10:33 PM
To: [EMAIL PROTECTED]
Subject: AW: [Eap-features] JSP improving (JSP depends)

I think it is not necessary that imports from big.jsp or top.jsp are known in 1.jsp. Just put the imports in the pages that use them. Having them multiple times in the assembled JSP is no problem. A solution for the other problem would be great. This is often used in our application when some parts are used in multiple JSPs to prevent heavy code duplication. One could say that a taglib is the solution but I think this is only valid if the include does not consist of too much HTML code. So having included JSPs know the declared variables from the outer JSPs would be fine. It might be a problem if the JSP is included from multiple  JSPs. Consider your 2.jsp is used in two other JSPs where one of them declares the needed List and the other does not. This is of course an error and the assembled JSP would fail, but this means IDEA cannot rely on the first occurence of the include but must know all dependencies and maybe even mark those places where something is missing for using the include.
 
Michael
 
-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Alexey A. Efimov
Gesendet: Mittwoch, 20. März 2002 12:33
An: [EMAIL PROTECTED]
Betreff: [Eap-features] JSP improving (JSP depends)

I'll be give +10 for follows (maybe somebody agree with me):

if I have WEB Application module. And the structure of this module is complex - one JSP compiled from many statical includes (small pices) JSPs. For example:

big.jsp:
<%@ include file="/includes/top.jsp" %>
<%@ include file="/includes/1.jsp" %>
<%@ include file="/includes/2.jsp" %>
<%@ include file="/includes/3.jsp" %>

This no troubles. Follow.
top.jsp:
<%@ page import="java.util.* %> <%-- For example --%>

And it's no troubles too. Troubles follow:
1.jsp:
<%
List list = new ArrayList(); // This hightlight as error
%>

2.jsp:
<%
list.add("Hi");  // This hightlight as error
list.add("Hello");  // This hightlight as error
list.add("Hey");  // This hightlight as error
%>

3.jsp

<%
SortedSet tree = new TreeSet(); // This hightlight as error
tree.addAll(list); // This hightlight as error
%>


Solutions in the custom database with user define relations via JSP. So I we define:
big.jsp - self by self
top.jsp - self by self
1.jsp - depends on top.jsp (this mean that IntelliJ must do include top.jsp but not show it)
2.jsp - depends on 1.jsp (this mean that IntelliJ must do include 1.jsp, then top.jsp  but not show these)
3.jsp - depends on 2.jsp (this mean that IntelliJ must do include 2.jsp, follow - 1.jsp, then top.jsp  but not show these)

Thanks for attention.

Alexey Efimov - Software Engineer
Sputnik Labs
1st Kolobovsky per., 6/3
Moscow, 103051, Russia
Phone: +7 (095) 725 5444
Direct: +7 (501) 401 3217
Fax: +7 (095) 725 5443
E-Mail: mailto:[EMAIL PROTECTED]
http://www.spklabs.com


Reply via email to