I've had this happen too.  The classes compile, but fail to run.  It always
turns out to be some sort of CLASSPATH problem.  Check *.properties and make
sure any place you define classpath has the required classes there.  If you
use WinNT/2K, and Tomcat runs as a service, make sure you also check your
wrapper.properties that jk_nt_service.exe uses.


Anthony

-----Original Message-----
From: Fei Xie [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 16, 2001 10:00 AM
To: [EMAIL PROTECTED]
Subject: Exception creating bean: java.lang.ClassNotFoundException


Can anyone help me with this?

I have the classes in the right folders.  However, the ActionForm is not 
visible to the jsp page.

javax.servlet.ServletException: Exception creating bean of class 
messageboard.Message: java.lang.ClassNotFoundException: messageboard/Message
        at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
        at 
_0002fmessage_0002ejspmessage_jsp_1._jspService(_0002fmessage_0002ejspmessag
e_jsp_1.java:602)
        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$JspServletWrapper.service(JspServlet.ja
va:177)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
        at 
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:484)

message.jsp
<html:form action="/add" name="MessageForm" focus="subject" 
type="messageboard.Message">

struts-config.xml
<struts-config>

  <!-- ========== Form Bean Definitions =================================== 
-->
  <form-beans>

    <!-- user form bean -->
    <form-bean      name="IdentityForm"
                    type="messageboard.Identity"/>

    <!-- message form bean -->
    <form-bean      name="MessageForm"
                    type="messageboard.Message"/>

  </form-beans>

  <!-- ========== Action Mapping Definitions ============================== 
-->
  <action-mappings>

    <!-- Edit user registration -->
    <action    path="/add"
               type="messageboard.AddMessageAction"
               name="MessageForm"
               scope="session"
               validate="true"
               inputForm="/message.jsp">
      <forward name="help" path="/help.jsp"/>
      <forward name="success" path="/showmessage.jsp"/>
    </action>

  </action-mappings>

</struts-config>

Thanks in advance.

-Fei


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Reply via email to