- This topic has 4 replies, 2 voices, and was last updated 20 years, 2 months ago by Riyad Kalla.
-
AuthorPosts
-
Chris LindsleyMemberMyElcipse 3.8.1 j2sdk 1.4.2_05 Windows XP
The following code in a jsp page does not show an error in the jsp editor but it does fail when compiled on Tomcat. Notice the new PrinterWriter, but no import of java.io.PrinterWriter.
Thanks,
Chris
<%@ page language="java" import="java.io.StringWriter" %> <% try { } catch (Exception e) { String msMessage="status:Exception: " + e.toString(); java.io.StringWriter lWriter = new StringWriter(); e.printStackTrace(new PrintWriter(lWriter)); msMessage += "<br>" + lWriter.toString(); } %>
Riyad KallaMemberChris,
Click your “Problems” tab, click the little down arrow in the top right corner, then click “Filters” then “Select All” then “OK”. Does the error appear now?If not, then drop to a command line (Start > Run > Cmd) and type “javac” at the console, did anything run? If not, then you need to add your JDK’s bin directory (.e.g c:\j2sdk1.4.2_05\bin) to your path in your system and restart Eclipse. Our JSP editor uses the javac compiler found in the path to compile JSP pages. One of two things is happening, either your problems are being filtered out (my first suggestion) or ME is unable to compile the pages (my second suggestion).
Chris LindsleyMemberNeither of these is my problem. I think this problem must be closely related to the ‘Problems’ tab issue we are discussing in another thread. Both problems first occurred when I upgraded to the 3.8.x versions. Upgraded is not exactly right since I did fresh installs in all cases (new eclipse dir and new MyEclipse install).
Riyad KallaMemberUsing your example this is what I get:
If you open up a console and type java -version, what do you get? Also what is your Build ID for Eclipse (Help > About) and Build ID for ME (Window > Prefs > MyEclipse)?
Riyad KallaMemberWoops, I should have shown the “Problems” tab, but its showing:
Severity Description Resource In Folder Location Creation Time
2 cannot find symbol: symbol : class PrintWriter MyJsp.jsp TestWeb1/webroot line 10 September 22, 2004 8:26:59 AM -
AuthorPosts