?
Solved

tomcat & java.lang.ClassNotFoundException: NameHandler.class

Posted on 2004-04-25
7
Medium Priority
?
344 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 400 total points
ID: 10913852
sure, glad I can help
Ghost
0
 

Author Comment

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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is a fine trick which I've found useful many times, when you just don't want to accidentally run a batch script or the commands needs administrator rights.
The top devops trends for 2017 are focused on improved deployment frequency, decreased lead time for change and decreased MTTR.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

765 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