This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

useBean class attribute error

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
org.apache.jasper.JasperException: /Welcome.jsp(7,0) The value for the useBean class attribute pancard.PANBean is invalid.
 
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please post your code ?
 
Ramesh kangamuthu
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
previous page

<%--PAN Card Accessing--%>
<html>
<head><title>PAN Card Accessing</title></head>
<body bgcolor="lightblue" text="yellow">
<form name="lOginForm" action="Welcome.jsp" method="post">
PAN <input type="text" name="pan"><br>
Password <input type="password" name="password"><br>
<input type="submit" value="Save"><br>
<a href="PANRegistration.jsp">Create New Account</a>
</form>
</body>
</html>

welcome.jsp

<%--PAN Card Accessing--%>
<html>
<head><title>Welcome Page for the Customer</title></head>
<body bgcolor="lightblue" text="yellow">
<form name="welcomeForm">
<%@ page import="pancard.PANBean" %>
<jsp:useBean id="panbean" class="pancard.PANBean" scope="request"/>
<jsp:setProperty name="panbean" property="pan" param="pan"/>
<% String user="<jsp:getProperty name="panbean" property="pan"/>";%>
<h3><%=user%> have Successfully Logged In</h3>
</form>
</body>
</html>
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is your PANBean.class file?
Does this class have a zero argument constructor?
 
Ramesh kangamuthu
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PANBean is in pancard package

//PAN Bean



[BPSouther: Added code tags]
[ November 13, 2007: Message edited by: Ben Souther ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the class file located?
Where on your hard drive is the actual file?
 
Marshal
Posts: 67425
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you read the JSP FAQ entries on this issue?
 
Ramesh kangamuthu
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My web application name is 'PANCard' it is inside 'webapps' of tomcat5.5 container.Inside 'PANCard' web app root directory, I have created 'WEB-INF' folder.'WEB-INF' has 'classes' folder and web.xml deployment descriptor.I put the package pancard with PANBean class inside the 'classes' folder.I strictly followed the deployment web app structure.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Your didn't declare your class as 'public'.

Try:
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Bear Bibeault:
Have you read the JSP FAQ entries on this issue?



Just added the check for the public modifier to the BeansNotFound FAQ entry.
 
Ramesh kangamuthu
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much ben.I have relieved from this problem after spending lot of time
 
The glass is neither half full or half empty. It is too big. But this tiny ad is just right:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic