Rickard �berg wrote:

> > Second:
> > I cannot access a class that is in a bean package from a
> > JSP page.  I have a bean called Contact.  On that bean there
> > is a method called getDetails which returns a ContactDetails
> > object.  This method is called from a JSP page. Correct me if
> > I'm wrong but this is the procedure that I follow.
> >
> > First I create a ejb-client jar that have the classes and objects
> > that the JSP page requires (Contact.class, ContactDetails.class)
> > In the ear file I put this ejb-client jar in a sub directory called
> > lib.  The structure looks like this:
> >
> > /META-INF/application.xml
> > /lib/ejb-client.jar
> > cms-ejb.jar
> > cms-web.war
> >
> > In the war file I specify a manifest file that
> > references the ejb-client.jar:
> >
> > Manifest-Version: 1.0
> > Class-Path: ./lib/ejb-client.jar
> >
> > When I deploy the ear file JBoss tells me that
> > it successfully added the ejb-client.jar file
> > to the common class path.
> >
> > Now when I try to import the class in my JSP page
> > <%@ page import="za.co.hemtech.cms.ejb.Contact" %>
> > Tomcat reports that the class could not be found.
>
> I think that the class is probably accessible to Tomcat as such, but not
> to the JSP compiler. They delegate to javac, which is "funky" at best
> with regard to classloading.
>
> This probably don't help you much, but my approach is to use taglibs,
> which can access these classes without any problems. I don't do Java
> code in JSP's, for obvious reasons.
>
> > If the proccess I followed is correct, can anybody
> > tell me why I cannot import the class file when
> > it is reported by JBoss that that class is added
> > to the common class path?
>
> As above, it's probably the javac classpath that is messed up. I have no
> good solution to how to fix that.
>

Hi Rickard

Do you by any change have a piece of example code where
a simple bean is deployed with client code, which is then
referenced in a war files manifest file.

I have been trying to do just that for three days
but nothing seems to work.  JBoss tells me that it added
the client class files to the common class path but I just
can't access them in a servlet.  Currently I'm just adding
the client code to my war class package, which is bad, bad,
very bad.

Another thing:
You say that your JSP's is reloaded each time you make
a change?  I gather you you also use Tomcat as the servlet
engine.  Can you describe for me what happens when a war file
is put in the deploy directory and what JBoss actualy do.
I can be mistaken, but I think that JBoss or Tomcat keeps
a cached compiled version of the JSP file, and does not
update it when the JSP page changes.


Thanks
Manie Coetzee



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to