You have to put your java classes in a package. If you do not, and put 
the class files in WEB-INF/classes then Tomcat cannot find them because 
this is not the default package location for Tomcat.

Bottom line: always use pacjages for your classes !!!!!

ron


-----Original Message-----
From: "Manoj Kithany" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Date: Sun, 22 Sep 2002 20:59:03 +0000
Subject: RE: Simple Bean not working but Servlet/JSP Working

> Hi Mr. Reynir,
> 
> THANKS for reply. I have already removed the package name from the 
> FormBean.java file.
> 
> Please help.
> 
> Thanks!
> 
> Manoj G. Kithany
> 
> 
> >From: Reynir Hübner <[EMAIL PROTECTED]>
> >Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >Subject: RE: Simple Bean not working but Servlet/JSP Working
> >Date: Sun, 22 Sep 2002 20:47:21 -0000
> >
> >do you have the bean specified in a package ?
> >either put it into a package (and the correct "folder") as 
> >/classes/com/domain/packagename/FormBean.class
> >and then use this (with import line), or remove the package 
> >com.domain.packagename; from the file, and it should work.
> >
> >hope it helps
> >[EMAIL PROTECTED]
> >
> >
> >
> >
> >
> > > -----Original Message-----
> > > From: Manoj Kithany [mailto:[EMAIL PROTECTED]]
> > > Sent: 22. september 2002 20:47
> > > 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/proc
> > > ess$jsp.java:72:
> > > 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/proc
> > > ess$jsp.java:75:
> > > 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/proc
> > > ess$jsp.java:80:
> > > 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]
> 
> 
> _________________________________________________________________
> Join the world’s largest e-mail service with MSN Hotmail. 
> http://www.hotmail.com
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to