facebook

error in jsps containing class libraries

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

    I get an error in all jsp pages containing the following code:
    <%@ taglib uri=”/WEB-INF/struts-bean.tld” prefix=”bean” %>

    the error is:
    cannot load class: org.apache.struts.taglib.bean.CookieTei

    these pages used to compile ok with 2.5.1.

    The project directory structure is:
    EAR
    /xxxEAR
    /xxxEAR/META-INF/application.xml
    /xxxEAR/struts.jar

    WAR
    /xxxWAR
    /xxxWAR/src
    /xxxWAR/web
    /xxxWAR/web/WEB-INF

    In the war project I have a reference in struts.jar located in the ear project and 2.5.1 finds the tag classes.
    If i keep the reference and just add a copy of struts.jar in /WEB-INF/lib everything works ok.

    I think that the old 2.5.1 behaviour is the correct one and should be supported.

    #198215 Reply

    Scott Anderson
    Participant

    In the war project I have a reference in struts.jar located in the ear project

    I’m not really sure what this means? Can you be more explicit how you were referencing struts.jar in your EAR from your WAR?

    If i keep the reference and just add a copy of struts.jar in /WEB-INF/lib everything works ok.

    This is the standard packaging. Is there some reason you’d like to place it in the EAR? You should be able to do this if you add a manifest Class-Path entry in your web projects META-INF/MANIFEST.MF that references the archive in the EAR. However, this would only come into play during deployment, not compilation within the environment. For the compiler to find the library during development, it must somehow be on the classpath of the web project. This is normally done by placing it in the WEB-INF/lib directory.

    –Scott
    MyEclipse Support

    #198230 Reply

    In the war project I have a reference in struts.jar located in the ear project

    I’m not really sure what this means? Can you be more explicit how you were referencing struts.jar in your EAR from your WAR?

    I mean that it is in my web project’s build path.

    Is there some reason you’d like to place it in the EAR?

    Yes! I have many web projects in my ear and i want to include struts.jar only once.

    You should be able to do this if you add a manifest Class-Path entry in your web projects META-INF/MANIFEST.MF that references the archive in the EAR.

    I have done that.

    However, this would only come into play during deployment, not compilation within the environment.

    I agree.

    For the compiler to find the library during development, it must somehow be on the classpath of the web project. This is normally done by placing it in the WEB-INF/lib directory.

    It is on the classpath! Actually, It is in my ear project and referenced by my web project build path.
    My web project .classpath contains a line like:
    <classpathentry kind=”lib” path=”/xxxEAR/struts.jar”/>

    It is not in the web project WEB-INF/lib because i only want to have 1 copy of the file and not one for each web project included in my ear.

    #198235 Reply

    support-michael
    Keymaster

    You are correct that 2.5.1 worked correctly with packaged taglibs. An internal issue exists in the 2.6.0 and 2.6.1 releases that causes package taglib support to quit functioning. A has already been released to QA for testing and should be available by the end of the week or early next week.

    Michael
    MyEclipse Support

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: error in jsps containing class libraries

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