facebook

jsp validation cant see java source under WEB-INF [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #201730 Reply

    Our repository is organized in an expanded war format with java source files located under WEB-INF. As a result, any reference made by a jsp to a java class registers an error with eclipse, i.e. “XXX (class) cannot be resolved…” I really don’t want to turn JSP validation off. Is there a way to make this work?

    Ken

    #201732 Reply

    Riyad Kalla
    Member

    Ken,
    I just tried the following with Eclipse 2.1.2 and ME 2.7RC2 on Windows XP with JDK 1.4.2_03:

    Scenario 1)
    * Source folder is /WEB-INF/src (source separate from class files)
    * Change project’s source directory to reflect changes
    * Create new Login.jsp in webroot directory
    * jsp:useBean the new class
    * OK

    Scenario 2)
    * Source folder is /WEB-INF/classes (source mixed with class files)
    * Change project’s source directory to reflect changes
    * Create new Login.jsp in webroot directory
    * jsp:useBean the new class
    * OK

    So it seems its working as it should. Was this example an accurate representation of the directory/source organization you were talking about? Did you update your project’s source directory to point to the root of your source tree? Did you also update your output directory to be /webroot/WEB-INF/classes?

    How exactly is the JSP ‘using’ the class file that it cannot resolve? (maybe an example piece of code).

    Best,
    Riyad

    #201734 Reply

    I should really check my stuff before I bother you. I discovered that the errors were only on pages which, although designated as *.jsp, were actually just operating as text includes into other pages. I don’t suppose it’s reasonable to expect validation to reference the import statements in the containing pages. ❓

    Thanks for your help.

    #201735 Reply

    Riyad Kalla
    Member

    No problem, I’m glad it didn’t turn out to be something worse.

    As far as the validator checking import statements, I’m not too sure how reasonable/unreasonable this is. We are always happy to see what we can do to fit people’s needs. I’ll forward your request on to the necessary warm bodies that can better evaluate that request.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: jsp validation cant see java source under WEB-INF [Closed]

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