facebook

Erroneous compile errors on JSPs

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #214416 Reply

    djacobs
    Member

    Posting guidelines information:

    – Operation System: Debian GNU/Linux (2.4.26-1-686-smp)
    – Eclipse Version: Version: 3.0.0 Build id: 200406251208
    – Not a fresh install of Eclipse
    – Fresh install of MyEclipse
    – Other Plug-ins: EMF, SDO, XSD, VE, GEF)
    – Eclipse Version: 3.8.1
    – JDK 1.4.2_05
    – Application Server: Tomcat 5.0.28

    I’ve just set up an existing source base as a J2EE Web Project, with a source
    tree like this:

    +dev30
    -+src
    –+[Java package directories beneath here]
    -+generated
    —+[XDoclet-generated source packages here]
    -+docroot
    –+jsp
    —+account
    —+acct
    —+admin
    —+[…various subdirectories at same level]
    —-+dealerReport.jsp
    —-+msg-no-items.jsp
    —-+[…various JSPs]

    I’ve defined src, generated and docroot as source directories.

    A randomly distributed handful of the package/file icons have red “x”
    error markers on them, but when I examine the file contents, the error
    markers in the file are a bit strange:

    – in several cases, there are none; the package is marked “x” but the
    JSP files within have no error flags in them.
    – in one case, dealer-report.jsp, there are all sorts of error markers, which
    when “hovered” show mostly classpath-type errors (“cannot resolve
    symbol: symbol :class File”) ; note that the weird spacing around the two
    occurrences of the word “symbol” is exactly as it appears in the hover
    message.
    – What’s interesting is that the File class is not referenced anywhere in the
    file in question. Moreover, the error markers occur on source lines which
    clearly do not demonstrate the error indicated by the message, for other
    types of errors as well. [And yes, the JRE rt.jar is in the classpath.]

    What’s more, when I initially had this problem, it was in just one JSP file. Then I did a “Project > Clean” and a rebuild, and this time, 5 JSPs are having similar problems.

    Any idea what’s going on here?

    Thanks,
    –dave

    #214435 Reply

    Riyad Kalla
    Member

    Dave,
    if your project is a web project, you don’t need to add docroot to the sources dir (although I guess it can’t hurt). Also I didn’t notice a WEB-INF directory, do you have one? Also do you have the J2EE 1.4 Library Set OR your jsp-api and servlet-api.jar files added to your build path?

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Erroneous compile errors on JSPs

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