facebook

Servlet API spec. 2.4 problem [Closed]

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

    bingo
    Member

    Hi! I have a small problem with the following configuration:

    What operating system and version are you running?
    Mandrake 10.0
    What Eclipse version and build id are you using?
    Version: 2.1.3
    Build id: 200403101828
    Was Eclipse freshly installed for MyEclipse?
    Yes
    Are any other external plugins installed?
    No
    How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*
    7
    org.eclipse.pde_2.1.0/
    org.eclipse.pde.build_2.1.3/
    org.eclipse.pde.core_2.1.2/
    org.eclipse.pde.doc.user_2.1.0/
    org.eclipse.pde.runtime_2.1.0/
    org.eclipse.pde.source_2.1.3/
    org.eclipse.pde.ui_2.1.2/
    What MyEclipse version are you using?
    Version: 2.7.1
    Build id: 200403241200-2.7.1-GA
    What JDK version are you using to run Eclipse?
    java version “1.4.2_04”
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
    Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
    What JDK version are you using to launch your application server?
    Same thing
    What steps did you take that resulted in the issue?
    I followed this thread because I had the same problem about VariableResolver:
    https://www.genuitec.com/forums/topic/jsp-editor-problems-with-jstl-closed/&highlight=variableresolver
    So I simply added servlet-api.jar and jsp-api.jar from tomcat 5.0.19 to my WEB-INF/lib, which is for the API spec 2.4 and removed the J2EE 1.3 jar container from my project.
    Now I’m stucked with this warning message when starting Tomcat:
    INFO: validateJarFile(…/WebRoot/WEB-INF/lib/servlet-api.jar) – jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    I’m wondering where did I forget to tell that I’m using the servlet api 2.4… It’s not in my web.xml, I fixed that already
    What application server are you using?
    Tomcat 5.0.19
    Are there any errors in the Eclipse log?
    No

    If you have any idea about what could be causing this, I’ll be glad to hear about it!
    Thanks!

    #208249 Reply

    Riyad Kalla
    Member

    bingo,
    I think you might have misunderstood that thread… you don’t suppose to copy those two jars INTO your project, you are just suppose to add them to your build path via the “Add External JAR” functionality.

    So remove those two jars from your project, edit your Java Build Path for your project, and add those two External JARs to your build path from the <Tomcat>\common\lib dir.

    #208259 Reply

    bingo
    Member

    Ok, I did what you told me and that fixed the line telling me that the jar couldn’t be loaded.

    But then again, I re-read the other thread and what I still understand is that Fi-Tek copied the two jars directly in his webproject WEB-INF/lib to fix his problem. 🙂

    As NOPE suggested to use JSP 2.0 apis I tried to use JSP 2.0 apis of TOMCAT 5.0.16 (jsp-api.jar and servlet-api.jar) by putting it into WEB-INF/lib location of my webproject. I also removed J2EE 1.3 libraries from my project. But it didnot solve my problem. I also tried to do a complete refresh (by right click on the project on package explorer and clicking refresh) of my project and this also didn’t solve the problem. I was kind of frustrated but I kept on working as those files were working fine in tomcat. Then day before yesterday my machine was restarted (Eclipse and project was opened) due to power failure. And when I restarted Eclipse then my project started recompiling all the jsp files and that solved the problem. So what I missed was the recompiling all the jsp files of my project after putting jsp-api.jar and servlet-api.jar files which I didn’t do as I said I have more than 100 jsp files and recompiling takes a lot of time. It would be a nice feature to have the compile/recompile option for a single jsp file which will consider the most recent libraries included in the project.

    Anyways, thank you!

    #208265 Reply

    Riyad Kalla
    Member

    bingo,
    I appologize, you are correct, Fi-Tek did say that.

    I’m glad we got your setup corrected though and its working now.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Servlet API spec. 2.4 problem [Closed]

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