Manoj Please make your bean a part of a package, something like com.kithany.FormBean. It will work then.
Regards Sanjeev -----Original Message----- From: Manoj Kithany [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 2:17 AM To: [EMAIL PROTECTED] Subject: Simple Bean not working but Servlet/JSP Working Hi Experts, I tried a simple JSP/Servlet applications and it worked. I am using Apache 1.3.26 + (Jboss 3.0.3, Tomcat 4.0.4 bundle) Now, I am trying for simple Bean Application with JSP/Servlets and Html pages. My directory structure is : /kithany (root) /kithany/register.html /kithany/success.jsp /kithany/retry.jsp /kithany/process.jsp (bean) /kithany/WEB-INF/web.xml /kithany/WEB-INF/classes/FormBean.java /kithany/WEB-INF/classes/FormBean.class /kithany/META-INF/application.xml Then, I create the kithany.war file as shown below: #cd /kithany #jar -cvfM kithany.war . I then put the "kithany.war" file in /jboss/server/default/deploy directory and In your browser type: http://IP_ADDR_ESS:8080/kithany/register.html which works fine. In my "register.html" file my action is <form action="/kithany/process.jsp" method=post> When I click the SUBMIT button in "register.html" form (which then calls bean and servelte), I get following Error - wonder why. ---------------------------------------------------------------------------- -------- Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error - that prevented it from fulfilling this request org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 10 in the jsp file: /process.jsp Generated servlet error: /jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/kithany/process$jsp.java:7 2: Class org.apache.jsp.FormBean not found. FormBean formHandler = null; ^ An error occurred at line: 10 in the jsp file: /process.jsp Generated servlet error: /jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/kithany/process$jsp.java:7 5: Class org.apache.jsp.FormBean not found. formHandler= (FormBean) ^ An error occurred at line: 10 in the jsp file: /process.jsp Generated servlet error: /jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/kithany/process$jsp.java:8 0: Class org.apache.jsp.FormBean not found. formHandler = (FormBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "FormBean"); ---------------------------------------------------------------------------- -------- My process.jsp file is: ---------------------------------------------------------------------------- -------- <%@ page import="java.util.*" %> <%! ResourceBundle bundle =null; public void jspInit() { bundle = ResourceBundle.getBundle("forms"); } %> <jsp:useBean id="formHandler" class="FormBean" scope="request"> ****** THIS IS MY LINE 10 <jsp:setProperty name="formHandler" property="*"/> </jsp:useBean> <% if (formHandler.validate()) { %> <jsp:forward page="<%=bundle.getString(\"/kithany/process.success\")%>"/> <% } else { %> <jsp:forward page="<%=bundle.getString(\"/kithany/process.retry\")%>"/> <% } %> ---------------------------------------------------------------------------- -------- My web.xml file is as shown below: ---------------------------------------------------------------------------- --- <web-app> <servlet> <servlet-name>FormBean</servlet-name> <servlet-class>FormBean</servlet-class> </servlet> <servlet> <servlet-name>HelloWorldExample</servlet-name> <servlet-class>HelloWorldExample</servlet-class> </servlet> <servlet-mapping> <servlet-name>HelloWorldExample</servlet-name> <url-pattern>/HelloWorldExample/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>FormBean</servlet-name> <url-pattern>/FormBean/*</url-pattern> </servlet-mapping> <web-app> ---------------------------------------------------------------------------- --- I would really appreciate if any of you Experts could put some light onto this error. THANKS! Manoj G. Kithany [EMAIL PROTECTED] _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html