Solved

tomcat & java.lang.ClassNotFoundException: NameHandler.class

Posted on 2004-04-25
7
339 Views
Last Modified: 2010-04-01
I am learning the how to handle the html forms by java beans, but I always got the following error information: By a way, I can run applet without error.

java.lang.ClassNotFoundException: NameHandler.class
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1383)

jsdk 1.4, tomcat 5.0, winXp, win2000(I have two computers.)

here is the code: thanks a lot!
 <%@ page language="java"  %>
<jsp:useBean id="mybean"  class="NameHandler.class" />
<jsp:setProperty name="mybean" property="*" />
<html><head><title>Hello, User</title></head>
<body bgcolor="#000000">
      <%@ include file="dukebanner.html" %>
      <table border="0" width="700">
            <tr><td width="550">
                      <form method="get" action = verify.jsp>
                            <input type="text" name="username" size="25">
                            <br>
                            <input type="submit" value="Submit">
                            <input type="reset" value="Reset">
                      </form>
          </td></tr></table>
      <%If ( request.getParameter("username") != null ) {
      %>
      <%@ include file="response.jsp" %>
      <% }
      %>
</body></html>
0
Comment
Question by:laoyaobest
  • 3
  • 3
7 Comments
 
LVL 13

Expert Comment

by:copyPasteGhost
ID: 10913806
your class files must be in the

web-inf/classes/packageName/MyClass.class
Hope that helps,
Ghost
0
 
LVL 13

Expert Comment

by:copyPasteGhost
ID: 10913809
also your class NameHandler must be in a package.
Ghost
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 10913811
you can not use a bean class without a package in tomcat 5.0
package you class NameHandler is mypackage and then do
<jsp:useBean id="mybean"  class="mypackage.NameHandler.class" />
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:laoyaobest
ID: 10913812
let me try!
0
 

Author Comment

by:laoyaobest
ID: 10913851
it seems work but i need more time to try. thanks a lot. I will come back in  10 minutes.
0
 
LVL 13

Accepted Solution

by:
copyPasteGhost earned 100 total points
ID: 10913852
sure, glad I can help
Ghost
0
 

Author Comment

by:laoyaobest
ID: 10913864
it is ok. thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
In 2017, ransomware will become so virulent and widespread that if you aren’t a victim yourself, you will know someone who is.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now