Solved

tomcat & java.lang.ClassNotFoundException: NameHandler.class

Posted on 2004-04-25
7
338 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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

A procedure for exporting installed hotfix details of remote computers using powershell
In this article, I show you step by step with screenshots to assist you - HOW TO: Deploy and Install the VMware vCenter Server Appliance 6.5 (VCSA 6.5), with some helpful tips along the way.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 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

22 Experts available now in Live!

Get 1:1 Help Now