Hi!
Manie Coetzee wrote:
> First:
> I currently have problem with JSP pages that does not re-compile.
> I use Tomcat as the servlet engine. The problem is that when I
> change a JSP page, make a war file and re-deploy it (copy it to the
> deploy directory) the JSP page is not reloaded! Only when I restart
> JBoss the changes takes effect. Am I doing something wrong or
> must the 'reload' option be specified somewhere?
No idea. "Works for me"...
> 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.
> Rickard, If you see this, I am working for a company
> called Hemisphere Technologies and we are based
> in Cape Town, South Africa. Some of the guys here
> are trying to follow the extreme programming route
> and are busy with a unit test framework for EJB's. The
> framework is designed in such a way that each bussiness object
> have a unit test. Each of thos bussiness objects is wrapped up
> by a EJB wrapper which enable the bussiness object to excists
> in a EJB environment. The unit test itself also have
> a EJB wrapper that adds the functionality of testing
> the bussiness object in a EJB enviroment. If you guys
> are not doing something like this already, tell me
> if you would be interested.
Sounds pretty straightforward, although I'm questioning the validity of
testing the stuff outside of an EJB container. I mean, there's nothing
of what an EJB container provides available (JDBC pools, environment
naming, tx, security, etc.) so why not do the testing in the container?
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]