tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karthikeyan.K.V" <karthi...@attbi.com>
Subject RE: java.lang.NoClassDefFoundError (help a newbie plz...)
Date Thu, 21 Feb 2002 18:12:19 GMT

U have to put the compiled class of HitCountBean(HitCountBean.class) in
WEB-INF/classes/hit

Karthik
-----Original Message-----
From: Claudiu Bran [mailto:ubik@romtelecom.ro]
Sent: Thursday, February 21, 2002 10:09 PM
To: tomcat-user@jakarta.apache.org
Subject: java.lang.NoClassDefFoundError (help a newbie plz...)


I have a simple .jsp which wants to use a bean named HitCountBean, but upon
execution I get

Internal Servlet Error: javax.servlet.ServletException: hit/HitCountBean
[...]
Root Cause:
java.lang.NoClassDefFoundError: hit/HitCountBean
[...]

Here is HitCountBean.jsp, located in /var/tomcat/webapps/myex/
----
<jsp:useBean id="counter" scope="application" class="hit.HitCountBean" />
<jsp:setProperty name="counter" property="newSession" value="<%=
session.isNew() %>" />
[...]
----
And this is HitCountBean.java located in
/var/tomcat/webapps/myex/WEB-INF/classes/hit/
----
package hit;
import java.util.Date;
import java.text.DateFormat;
import java.io.Serializable;

public class HitCountBean implements Serializable {
   private boolean b;
   private int hitCount;
   private String serverStart;
   private Date date = new Date();
[...]
}

So, what do I have to do, where do I have to put  HitCountBean.java ?
Thanks in advance

PS: I am *very* newbie to jsp, java.


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message