Project Referances - Websphere

This is a discussion on Project Referances - Websphere ; Hi, I have a problem it seems silly. I created a java project which I used to develop the beans which I have to use in a web project. I add the java project to Web projects in project>properties>Java Build ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Project Referances

  1. Project Referances

    Hi,
    I have a problem it seems silly. I created a java project which I used to develop the beans which I have to use in a web project. I add the java project to Web projects in project>properties>Java Build Path>projects select the java project there. I am able to create bean with the wizard. When I run the page I am getting compilation error,

    Beans.myBean not found

    Error 500: Unable to compile class for JSP.

    I also tried to export and include the jar in the project but that too didnt work the same problem.Can any body solve this? Any help is greatly appreciated
    Rahul

  2. Re: Project Referances

    You have to add your project in "Web Library Projects" editing your
    web.xml file.
    What you have done works at "build time", not for "run time"...

    Hope this help.
    Dario


  3. Re: Project Referances

    java.rahulraj@gmail.com wrote:
    > Hi,
    > I have a problem it seems silly. I created a java project which I used to develop the beans which I have to use in a web project. I add the java project to Web projects in project>properties>Java Build Path>projects select the java project there. I am able to create bean with the wizard. When I run the page I am getting compilation error,
    >
    > Beans.myBean not found
    >
    > Error 500: Unable to compile class for JSP.
    >
    > I also tried to export and include the jar in the project but that too didnt work the same problem.Can any body solve this? Any help is greatly appreciated
    > Rahul


    I believe that you will find that the app server will expect either to
    find the class(es) in the /WEB-INF/classes/... or a jar in
    /WEB-INF/lib that contains the classes. The app server
    doesn't know about your development time stuff I don't think.

    A while ago when I had a similar problem what I did was to make a custom
    builder that would build the bean jar file into my web project when the
    web project was built.

    Mike

  4. Re: Project Referances

    It is working when i exported the project as jar and impoerted that to the web project but on a single change to the java project classes i have to rebuild jar and import. Any way i have to find a better way for that.
    Thanks for that,
    Rahul

+ Reply to Thread