- This topic has 5 replies, 3 voices, and was last updated 19 years, 5 months ago by
Mick Oyer.
-
AuthorPosts
-
Mick OyerMemberI have some very large JSP files (1000 lines or so), so I want to do includes of other JSP to break it up into chunks.
Because of this, I’d like to reference variables from one file that are declared in another, but the JSP validator complains
that the referenced variable doesn’t exist (even though the page compiles just fine). Should the validator know about
variables declared in one file and referenced in another – if so, this isn’t working for me. It does complain when I try to
reference a non-existent included JSP file (as it should), so it seems to know about includes.I’m running Eclipse 3.1.1, MyEclipse 4.0.2 on Linux – CentOS 4.0. Any help would be appreciated.
Scott AndersonParticipantMick,
Yes, the validator should know about includes because it compiles the page to validate it. Are you seeing red error markers in the left margin or yellow ones in the right? Can you give us a small, specific example that shows the problem? Also, can you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context to work with.
Mick OyerMemberScott:
The validator shows a red ‘X’ on the left side, and a bright red error marker on the right – I’ve included a whole bunch
of information (below) – first the test case, then all the info requested from posting guidelines. It’s certainly possible
I’m doing something stupid, but if so, I’m not sure what it is. File 1 includes File 2, which references the variable (setDebug), in File 1.There are also FATAL compiler errors in the log, but when I save the files and run inside Tomcat, everything works.
Maybe it has something to do with WHERE the files are being saved?Any help would be greatly appreciated (FWIW, I absolutely LOVE MyEclipse, using it all day everyday for all my JSP
development!).-Mick
==================
Test Case:
<%@ page language=”java” import=”java.util.*” pageEncoding=”UTF-8″%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+”://”+request.getServerName()+”:”+request.getServerPort()+path+”/”;boolean setDebug = false;
%><%@ include file=”TC001_include.jsp”%>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<base href=”<%=basePath%>”><title>My JSP ‘TC001.jsp’ starting page</title>
<meta http-equiv=”pragma” content=”no-cache”>
<meta http-equiv=”cache-control” content=”no-cache”>
<meta http-equiv=”expires” content=”0″>
<meta http-equiv=”keywords” content=”keyword1,keyword2,keyword3″>
<meta http-equiv=”description” content=”This is my page”><!–
<link rel=”stylesheet” type=”text/css” href=”styles.css”>
–>
</head><body>
This is my JSP page. <br>
</body>
</html>==================
Test Case (included file): “TC001_include.jsp”
The problem: At line 3 – if (if setDebug == true),
validator shows red X, with content = “cannot resolve symbol: symbol : variable setDebug”Severity Description Resource In Folder Location Creation Time Id
2 cannot resolve symbol: symbol : variable setDebug TC001_include.jsp NGAIntelReportMgmt/WebRoot/testfolder line 4 December 19, 2005 10:17:50 AM 7186==================
<%@ page language=”java” import=”java.util.*” pageEncoding=”UTF-8″%>
<%
if (setDebug == true) {String summaryContent =
“Ut Volutpat Lorem Ipsum Lectus”;}
%>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<base href=”<%=basePath%>”><title>My JSP ‘TC001_include.jsp’ starting page</title>
<meta http-equiv=”pragma” content=”no-cache”>
<meta http-equiv=”cache-control” content=”no-cache”>
<meta http-equiv=”expires” content=”0″>
<meta http-equiv=”keywords” content=”keyword1,keyword2,keyword3″>
<meta http-equiv=”description” content=”This is my page”><!–
<link rel=”stylesheet” type=”text/css” href=”styles.css”>
–>
</head><body>
This is my JSP page. <br>
</body>
</html>==================
*** Date: Mon Dec 19 10:20:17 PST 2005
*** System properties:
OS=Linux
OS version=2.6.9-22.EL
Java version=1.4.2_08*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 4.0.2 GA
Build id: 20051010-4.0.2-GA*** Eclipse details:
Eclipse SDKVersion: 3.1.1
Build id: M20050929-0840Eclipse Platform
Version: 3.1.1
Build id: M20050929-0840Eclipse RCP
Version: 3.1.1
Build id: M20050929-0840Eclipse Java Development Tools
Version: 3.1.1
Build id: M20050929-0840Eclipse Plug-in Development Environment
Version: 3.1.1
Build id: M20050929-0840Eclipse Project SDK
Version: 3.1.1
Build id: M20050929-0840Eclipse startup command=-os
linux
-ws
gtk
-arch
x86
-launcher
/usr/local/eclipse/eclipse
-name
Eclipse
-showsplash
600
-exitdata
50006
-vm
/usr/local/java/bin/java!ENTRY com.genuitec.eclipse.wdt.jsp.debug 1 1 2005-12-19 10:16:23.333
!MESSAGE Dec 19, 2005 10:16:23 AM com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler Ä
SEVERE: Javac exception
Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:933)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
at com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler.Ä(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler.compile(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler.compile(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.jasper.driver.MyEclipseJspC.Ä(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.jasper.driver.MyEclipseJspC.parse(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.JSPValidator.validate(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.ValidateAction$1.run(Unknown Source)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1719)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1739)
at com.genuitec.eclipse.wdt.jsp.validation.ValidateAction.validate(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.ValidateAction.run(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.Validator.validate(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.Validator.validateIfNeeded(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.Validator.validate(Unknown Source)
at com.ibm.etools.validation.ValidatorLauncher.start(ValidatorLauncher.java:58)
at com.ibm.etools.validate.ValidationOperation.launchValidator(ValidationOperation.java:1275)
at com.ibm.etools.validate.ValidationOperation.internalValidate(ValidationOperation.java:1099)
at com.ibm.etools.validate.ValidationOperation.validate(ValidationOperation.java:1014)
at com.ibm.etools.validate.ValidationOperation.run(ValidationOperation.java:731)
at com.ibm.etools.validate.ValidationBuilder.build(ValidationBuilder.java:155)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:593)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
at org.eclipse.core.runtime.Platform.run(Platform.java:783)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:168)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:202)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:231)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
at org.eclipse.core.runtime.Platform.run(Platform.java:783)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:234)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:253)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:282)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:139)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:200)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Dec 19, 2005 10:16:23 AM com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler Ä
SEVERE: Env: Compile: javaFileName=/tmp/myeclipse-jspcc//org/apache/jsp/testfolder/TC001_005finclude_jsp.java
classpath=/usr/java/j2sdk1.4.2_08/jre/lib/rt.jar:/usr/java/j2sdk1.4.2_08/jre/lib/sunrsasign.jar:/usr/java/j2sdk1.4.2_08/jre/lib/jsse.jar:/usr/java/j2sdk1.4.2_08/jre/lib/jce.jar:/usr/java/j2sdk1.4.2_08/jre/lib/charsets.jar:/usr/java/j2sdk1.4.2_08/jre/lib/ext/localedata.jar:/usr/java/j2sdk1.4.2_08/jre/lib/ext/dnsns.jar:/usr/java/j2sdk1.4.2_08/jre/lib/ext/ldapsec.jar:/usr/java/j2sdk1.4.2_08/jre/lib/ext/sunjce_provider.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-jaxrpc.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-j2ee.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-jsr77.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/activation.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/javax.servlet.jsp.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/namespace.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/mail.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/javax.servlet.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-saaj.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/xml-apis.jar::/documentum/shared/dfc/dfcbase.jar:/documentum/shared/dfc/dfc.jar:/documentum/shared/dfc/log4j.jar:/usr/local/java/junit/lib/junit.jar:::/home/moyer/workspace/NGAIntelReportMgmt/WebRoot/WEB-INF/classes:/home/moyer/workspace/NGAIntelReportFoundationClasses:/home/moyer/workspace/JDBCServices:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.wdt.jsp.debug_3.9.310/lib/jasper-runtime.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.wdt.jsp.debug_3.9.310/lib/jsp-api.jar
cp=/usr/local/eclipse/startup.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/rt.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/sunrsasign.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/jsse.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/jce.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/charsets.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/ext/localedata.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/ext/dnsns.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/ext/ldapsec.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/ext/sunjce_provider.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-jaxrpc.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-j2ee.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-jsr77.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/activation.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/javax.servlet.jsp.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/namespace.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/mail.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/javax.servlet.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-saaj.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/xml-apis.jar
cp=/documentum/shared/dfc/dfcbase.jar
cp=/documentum/shared/dfc/dfc.jar
cp=/documentum/shared/dfc/log4j.jar
cp=/usr/local/java/junit/lib/junit.jar
cp=/home/moyer/workspace/NGAIntelReportMgmt/WebRoot/WEB-INF/classes
cp=/home/moyer/workspace/NGAIntelReportFoundationClasses
cp=/home/moyer/workspace/JDBCServices
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.wdt.jsp.debug_3.9.310/lib/jasper-runtime.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.wdt.jsp.debug_3.9.310/lib/jsp-api.jar
work dir=/tmp/myeclipse-jspcc
extension dir=/usr/java/j2sdk1.4.2_08/jre/lib/ext
srcDir=/tmp/myeclipse-jspcc
compiler=extJavac
include=org/apache/jsp/testfolder/TC001_005finclude_jsp.java!ENTRY com.genuitec.eclipse.wdt.jsp.debug 1 1 2005-12-19 10:17:50.163
!MESSAGE Dec 19, 2005 10:17:50 AM com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler Ä
SEVERE: Javac exception
Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:933)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
at com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler.Ä(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler.compile(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler.compile(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.jasper.driver.MyEclipseJspC.Ä(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.jasper.driver.MyEclipseJspC.parse(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.JSPValidator.validate(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.ValidateAction$1.run(Unknown Source)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1719)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1739)
at com.genuitec.eclipse.wdt.jsp.validation.ValidateAction.validate(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.ValidateAction.run(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.Validator.validate(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.Validator.validateIfNeeded(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.Validator.validate(Unknown Source)
at com.ibm.etools.validation.ValidatorLauncher.start(ValidatorLauncher.java:58)
at com.ibm.etools.validate.ValidationOperation.launchValidator(ValidationOperation.java:1275)
at com.ibm.etools.validate.ValidationOperation.internalValidate(ValidationOperation.java:1099)
at com.ibm.etools.validate.ValidationOperation.validate(ValidationOperation.java:1014)
at com.ibm.etools.validate.ValidationOperation.run(ValidationOperation.java:731)
at com.ibm.etools.validate.ValidationBuilder.build(ValidationBuilder.java:155)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:593)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
at org.eclipse.core.runtime.Platform.run(Platform.java:783)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:168)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:202)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:231)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
at org.eclipse.core.runtime.Platform.run(Platform.java:783)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:234)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:253)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:282)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:139)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:200)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Dec 19, 2005 10:17:50 AM com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler Ä
SEVERE: Env: Compile: javaFileName=/tmp/myeclipse-jspcc//org/apache/jsp/testfolder/TC001_005finclude_jsp.java
classpath=/usr/java/j2sdk1.4.2_08/jre/lib/rt.jar:/usr/java/j2sdk1.4.2_08/jre/lib/sunrsasign.jar:/usr/java/j2sdk1.4.2_08/jre/lib/jsse.jar:/usr/java/j2sdk1.4.2_08/jre/lib/jce.jar:/usr/java/j2sdk1.4.2_08/jre/lib/charsets.jar:/usr/java/j2sdk1.4.2_08/jre/lib/ext/localedata.jar:/usr/java/j2sdk1.4.2_08/jre/lib/ext/dnsns.jar:/usr/java/j2sdk1.4.2_08/jre/lib/ext/ldapsec.jar:/usr/java/j2sdk1.4.2_08/jre/lib/ext/sunjce_provider.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-jaxrpc.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-j2ee.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-jsr77.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/activation.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/javax.servlet.jsp.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/namespace.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/mail.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/javax.servlet.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-saaj.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/xml-apis.jar::/documentum/shared/dfc/dfcbase.jar:/documentum/shared/dfc/dfc.jar:/documentum/shared/dfc/log4j.jar:/usr/local/java/junit/lib/junit.jar:::/home/moyer/workspace/NGAIntelReportMgmt/WebRoot/WEB-INF/classes:/home/moyer/workspace/NGAIntelReportFoundationClasses:/home/moyer/workspace/JDBCServices:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.wdt.jsp.debug_3.9.310/lib/jasper-runtime.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.wdt.jsp.debug_3.9.310/lib/jsp-api.jar
cp=/usr/local/eclipse/startup.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/rt.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/sunrsasign.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/jsse.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/jce.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/charsets.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/ext/localedata.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/ext/dnsns.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/ext/ldapsec.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/ext/sunjce_provider.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-jaxrpc.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-j2ee.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-jsr77.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/activation.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/javax.servlet.jsp.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/namespace.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/mail.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/javax.servlet.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-saaj.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/xml-apis.jar
cp=/documentum/shared/dfc/dfcbase.jar
cp=/documentum/shared/dfc/dfc.jar
cp=/documentum/shared/dfc/log4j.jar
cp=/usr/local/java/junit/lib/junit.jar
cp=/home/moyer/workspace/NGAIntelReportMgmt/WebRoot/WEB-INF/classes
cp=/home/moyer/workspace/NGAIntelReportFoundationClasses
cp=/home/moyer/workspace/JDBCServices
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.wdt.jsp.debug_3.9.310/lib/jasper-runtime.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.wdt.jsp.debug_3.9.310/lib/jsp-api.jar
work dir=/tmp/myeclipse-jspcc
extension dir=/usr/java/j2sdk1.4.2_08/jre/lib/ext
srcDir=/tmp/myeclipse-jspcc
compiler=extJavac
include=org/apache/jsp/testfolder/TC001_005finclude_jsp.javaWhat operating system and version are you running?
Linux – CentOS 4.0.2
What Eclipse version and build id are you using? (Help > About Eclipse Platform)
Version: 3.1.1
Build id: M20050929-0840– Was Eclipse freshly installed for MyEclipse?
Yes.
– If not, was it upgraded to its current version using the update manager?
– Are any other external plugins installed?
Just the standard plugins that come with Eclipse.
– How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*
[moyer@dmlinux plugins]$ ls -l org.eclipse.pde.*
-rw-rw-r– 1 moyer moyer 475665 Sep 29 06:05 org.eclipse.pde.core_3.1.1.jar
-rw-rw-r– 1 moyer moyer 140720 Sep 29 06:05 org.eclipse.pde.runtime_3.1.1.jar
-rw-rw-r– 1 moyer moyer 2668494 Sep 29 06:05 org.eclipse.pde.ui_3.1.1.jarWhat MyEclipse version are you using? (Help > About Eclipse Platform > Features)
Version: 3.1.1
What JDK version are you using to run Eclipse? (java -version)
java version “1.4.2_08”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)What JDK version are you using to launch your application server?
java version “1.4.2_08”What steps did you take that resulted in the issue?
using <% include %> directives
What application server are you using?
Tomcat 5.0
Are there any exceptions in the Eclipse log file? (<workspace>/.metadata/.log)
!ENTRY com.genuitec.eclipse.wdt.jsp.debug 1 1 2005-12-19 10:17:50.163
!MESSAGE Dec 19, 2005 10:17:50 AM com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler Ä
SEVERE: Javac exception
Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:933)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
at com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler.Ä(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler.compile(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler.compile(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.jasper.driver.MyEclipseJspC.Ä(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.jasper.driver.MyEclipseJspC.parse(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.JSPValidator.validate(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.ValidateAction$1.run(Unknown Source)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1719)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1739)
at com.genuitec.eclipse.wdt.jsp.validation.ValidateAction.validate(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.ValidateAction.run(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.Validator.validate(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.Validator.validateIfNeeded(Unknown Source)
at com.genuitec.eclipse.wdt.jsp.validation.Validator.validate(Unknown Source)
at com.ibm.etools.validation.ValidatorLauncher.start(ValidatorLauncher.java:58)
at com.ibm.etools.validate.ValidationOperation.launchValidator(ValidationOperation.java:1275)
at com.ibm.etools.validate.ValidationOperation.internalValidate(ValidationOperation.java:1099)
at com.ibm.etools.validate.ValidationOperation.validate(ValidationOperation.java:1014)
at com.ibm.etools.validate.ValidationOperation.run(ValidationOperation.java:731)
at com.ibm.etools.validate.ValidationBuilder.build(ValidationBuilder.java:155)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:593)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
at org.eclipse.core.runtime.Platform.run(Platform.java:783)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:168)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:202)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:231)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
at org.eclipse.core.runtime.Platform.run(Platform.java:783)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:234)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:253)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:282)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:139)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:200)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Dec 19, 2005 10:17:50 AM com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler Ä
SEVERE: Env: Compile: javaFileName=/tmp/myeclipse-jspcc//org/apache/jsp/testfolder/TC001_005finclude_jsp.java
classpath=/usr/java/j2sdk1.4.2_08/jre/lib/rt.jar:/usr/java/j2sdk1.4.2_08/jre/lib/sunrsasign.jar:/usr/java/j2sdk1.4.2_08/jre/lib/jsse.jar:/usr/java/j2sdk1.4.2_08/jre/lib/jce.jar:/usr/java/j2sdk1.4.2_08/jre/lib/charsets.jar:/usr/java/j2sdk1.4.2_08/jre/lib/ext/localedata.jar:/usr/java/j2sdk1.4.2_08/jre/lib/ext/dnsns.jar:/usr/java/j2sdk1.4.2_08/jre/lib/ext/ldapsec.jar:/usr/java/j2sdk1.4.2_08/jre/lib/ext/sunjce_provider.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-jaxrpc.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-j2ee.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-jsr77.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/activation.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/javax.servlet.jsp.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/namespace.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/mail.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/javax.servlet.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-saaj.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/xml-apis.jar::/documentum/shared/dfc/dfcbase.jar:/documentum/shared/dfc/dfc.jar:/documentum/shared/dfc/log4j.jar:/usr/local/java/junit/lib/junit.jar:::/home/moyer/workspace/NGAIntelReportMgmt/WebRoot/WEB-INF/classes:/home/moyer/workspace/NGAIntelReportFoundationClasses:/home/moyer/workspace/JDBCServices:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.wdt.jsp.debug_3.9.310/lib/jasper-runtime.jar:/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.wdt.jsp.debug_3.9.310/lib/jsp-api.jar
cp=/usr/local/eclipse/startup.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/rt.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/sunrsasign.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/jsse.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/jce.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/charsets.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/ext/localedata.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/ext/dnsns.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/ext/ldapsec.jar
cp=/usr/java/j2sdk1.4.2_08/jre/lib/ext/sunjce_provider.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-jaxrpc.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-j2ee.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-jsr77.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/activation.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/javax.servlet.jsp.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/namespace.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/mail.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/javax.servlet.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/jboss-saaj.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_4.0.1/data/libraryset/1.4/xml-apis.jar
cp=/documentum/shared/dfc/dfcbase.jar
cp=/documentum/shared/dfc/dfc.jar
cp=/documentum/shared/dfc/log4j.jar
cp=/usr/local/java/junit/lib/junit.jar
cp=/home/moyer/workspace/NGAIntelReportMgmt/WebRoot/WEB-INF/classes
cp=/home/moyer/workspace/NGAIntelReportFoundationClasses
cp=/home/moyer/workspace/JDBCServices
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.wdt.jsp.debug_3.9.310/lib/jasper-runtime.jar
cp=/root/MyEclipse4.0/eclipse/plugins/com.genuitec.eclipse.wdt.jsp.debug_3.9.310/lib/jsp-api.jar
work dir=/tmp/myeclipse-jspcc
extension dir=/usr/java/j2sdk1.4.2_08/jre/lib/ext
srcDir=/tmp/myeclipse-jspcc
compiler=extJavac
include=org/apache/jsp/testfolder/TC001_005finclude_jsp.java
Scott AndersonParticipantMick,
First, the log entries are fine. They’re just kicked out when a compilation error in a JSP page is detected. No worries there.
I tried your case and see what the issue is. Basically, validation like you’re trying to perform in your included JSP page simply isn’t possible. Here’s the problem.
Your included page might be included in 1000 JSP files, some of which define the ‘setDebug’ variable, and some of which don’t. What should the validator do?
When each “outer” jsp is compiled, the included pages are considered. But, there’s no way to know what context an included page should be validated in, when
done alone. For this reason, the JSP spec suggests naming included files with a different extension (.jspf) so that tools will know they’re included files. You can
actually use whatever you want (.inc is also popular). If you change to a naming convention for included files, you can then instruct the MyEclipse JSP validator
to not validate them separately by setting the extension at Window > Preferences > MyEclipse > Editors > JSP > JSP Fragement Extensions.Hope that explains things and gives you a workaround. If you change the names and add the extension you’ll need to force a rebuild on the project to
remove the existing error markers.
rogue_devMemberI too use several included files. I have renamed the fragments as .jspf, and I do not get spurious validation errors.
However, it should be possible to perform validation on the .jsp + all the included .jspf files as a whole. All the required information is there. Then in a .jsp file which did not declare a variable (ie: setDebug) but it did call a fragment which required that variable, you could show a validation error in the .jsp file (the error would be that a variable was not declared which a fragment required).
Note that the error is NOT in the fragment, but in the including .jsp file. This would be similar to Java abstract classes. If an extending class does not implement an abstract method, the error shows up in the extending class, not the abstract class.
Mick OyerMemberScott:
Thanks, this helps a lot. I didn’t think about renaming an include as a fragment – that seems to work fine. I see your point about the validator flagging errors in included pages that don’t use or set the variable, not sure how you would handle a situation like that. When changing my test case it seems that the .jspf file isn’t validated at all, but I when I intentionally break the jspf file, I do get a validator error in the main source file, which is fine by me, just as long as I get an error indicator somewhere.Thanks again.
-Mick
-
AuthorPosts