• Post Reply Bookmark Topic Watch Topic
  • New Topic

useBean class attribute error  RSS feed

 
Ramesh kangamuthu
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.
 
Vassili Vladimir
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>
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 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 Redhat VI Editor
  • 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?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66208
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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 Redhat VI Editor
  • 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 Redhat VI Editor
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!