Title: Struts JBoss / Tomcat and From
Why do you use ActionForm as value object in EJB? I thnik, this is not a clean design,
since you make your EJB code dependent on Struts. Struts beloongs to the web layer,
EJB to the businness layer. Your EJB do not need things like HttpRequest, so'd try
to make them independet from the servlet.* package.
 
I'd suggest a simple redesign. Use simple beans as value object and nest them in
your action forms. Struts supports nested properties, so will not need to create
delegating propertry setters and getters in your action form. (unless you want to
do some conversions - ActionForms' properties should be string based, value objects
should use the "real" type of the property)
 
--
gR
 
 
P.S.: Of course it would be nice, if struts.jar could be installed in server scope
instead of application scope. I suppose, it would need some changes in the class
loading in ActionServlet.
 
----- Original Message -----
Sent: Thursday, September 20, 2001 10:50 PM
Subject: Struts JBoss / Tomcat and From

I have deployed my app using JBoss/Tomcat. I recently started using the ActionForm as value objects in my EJB's. JBoss now needs struts.jar in the class path, so it can find ActionForm, so I put sturts.jar in JBOSS_HOME/lib/ext. This works fine put it kills struts. Struts now throws a ClassNotFoundException for my ActionForm's.

If I remove the stuts.jar from the JBoss class path JBoss dies and struts works again.

Anyone got some advice for me here?

Thanks in advance.

Andrew


This is the exception that get thrown by Tomcat

Error: 500
Location: /jazzman/contact/details/address.jsp
Internal Servlet Error:

javax.servlet.ServletException: Exception creating bean of class com.jazzman.contact.details.view.AddressValue: java.lang.ClassNotFoundException: com.jazzman.contact.details.view.AddressValue

        at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
        at contact.details._0002fcontact_0002fdetails_0002faddress_0002ejspaddress_jsp_0._jspService(_0002fcontact_0002fdetails_0002faddress_0002ejspaddress_jsp_0.java:409)

        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
        at org.apache.tomcat.core.Handler.service(Handler.java:287)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
        at java.lang.Thread.run(Unknown Source)

Root cause:
javax.servlet.jsp.JspException: Exception creating bean of class com.jazzman.contact.details.view.AddressValue: java.lang.ClassNotFoundException: com.jazzman.contact.details.view.AddressValue

        at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:527)
        at contact.details._0002fcontact_0002fdetails_0002faddress_0002ejspaddress_jsp_0._jspService(_0002fcontact_0002fdetails_0002faddress_0002ejspaddress_jsp_0.java:95)

        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
        at org.apache.tomcat.core.Handler.service(Handler.java:287)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
        at java.lang.Thread.run(Unknown Source)

Reply via email to