[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

tomcat & java.lang.ClassNotFoundException: NameHandler.class

Posted on 2004-04-25
7
Medium Priority
?
350 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

A walk-through example of how to obtain and apply new DID phone numbers to your cloud PBX enabled users that are configured in Office 365. Whether you have 1, 10 or 100+ users in your tenant, it's quite easy to get them phone-enabled and making/rece…
If something goes wrong with Exchange, your IT resources are in trouble.All Exchange server migration processes are not designed to be identical and though migrating email from on-premises Exchange mailbox to Cloud’s Office 365 is relatively simple…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

656 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