facebook

jsp import reporting error

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #215722 Reply

    MyElcipse 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();
    }
    %>
    #215735 Reply

    Riyad Kalla
    Member

    Chris,
    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).

    #215749 Reply

    Neither 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).

    #215753 Reply

    Riyad Kalla
    Member

    Using 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)?

    #215755 Reply

    Riyad Kalla
    Member

    Woops, 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

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: jsp import reporting error

You must be logged in to post in the forum log in