users@glassfish.java.net

JSP page not finding EJB classes

From: <glassfish_at_javadesktop.org>
Date: Sun, 23 Sep 2007 13:54:06 PDT

I have an enterprise application consisting of general java class files, jsp files and EJBs.
The EAR structure is like this:
[code]
EAR
  META-INF\
    application.xml
    MANIFEST.MF
  webapp.war
    jsp\
      test.jsp
    META-INF\
      MANIFEST.MF
    WEB-INF\
      web.xml
      lib\
        xxx.jar
        yyy.jar
  ejb.jar
    META-INF\
      MANIFEST.MF
      orm.xml
      persistence.xml
      sun-ejb-jar.xml
    com\
      sql\
        beans\
          CoreServices.class
          CoreServicesBean.class
[/code]

If I access a servlet in the xxx.jar archive in webapp.war (defined in web.xml of course), this servlet is able to use the CoreServicesBean class in the ejb.jar archive

If, on the other hand, I try to access test.jsp (also in the webapp.war archive), I get an error message stating that the package "com.sql.beans" is not found.

This could seem like a classpath issue, but why then is a servlet able to find the bean, whereas a jsp (located in the same war file) is not able to find it?

Marius
[Message sent by forum member 'mariusw' (mariusw)]

http://forums.java.net/jive/thread.jspa?messageID=236680