Solved

tomcat & java.lang.ClassNotFoundException: NameHandler.class

Posted on 2004-04-25
7
341 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
netstat -a in AIX unix 8 44
servlet init param and contect param 3 66
Is possible to make a jsp script work with oracle wallet? 7 102
own marker interface 1 57
Google always has something new and amazing up its sleeve, and the most current thing that they have been working on is another step in the evolution of Google Search, from machine learning to its brilliant successor, deep learning.
This problem is more common than not and I will show you some things to check to solve this problem.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

825 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