• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP Error

 
Ranjit Nair
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If have following WEB-INF Structure

WEB-INF
CLASSES --> userAccount.class
LIB
web.xml
music.jsp
userpage.jsp

Code for userpage:
<%@ page language = "java" %>
<jsp:useBean id="UP" scope="application" class="userAccount" />
<jsp:setProperty name="UP" property="sAccountID" param="sAccountID" />
<jsp:setProperty name="UP" property="sPassword" param="sPassword" />

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>

<%
String sAccountID = UP.getsAccountID();
String sPassword = UP.getsPassword();
String aAccountID = UP.getaAccountID();
String aPassword = UP.getaPassword();
boolean validateUser = UP.ValidateUserAccount();
if(validateUser == true)
{
out.println("hello user");
}
else
{
out.println("Register yourself");
}
boolean validateAdmin = UP.ValidateAdminAccount();
if(validateAdmin == true)
{
out.println("hello Admin");
}
else
{
out.println("You are not authorised for this service");
}
%>

</body>

</html>

I have successfuly deployed the apllication and also the verifier did give any failed results.

But when i run it, gives me following error:
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.


An error occurred at line: 2 in the jsp file: /userpage.jsp

Generated servlet error:
C:\j2sdkee1.3.1\repository\798RPTC0\web\LoginContextRoot\userpage$jsp.java:60: Class org.apache.jsp.userAccount not found.
userAccount UP = null;
^


An error occurred at line: 2 in the jsp file: /userpage.jsp

Generated servlet error:
C:\j2sdkee1.3.1\repository\798RPTC0\web\LoginContextRoot\userpage$jsp.java:63: Class org.apache.jsp.userAccount not found.
UP= (userAccount)
^


An error occurred at line: 2 in the jsp file: /userpage.jsp

Generated servlet error:
C:\j2sdkee1.3.1\repository\798RPTC0\web\LoginContextRoot\userpage$jsp.java:68: Class org.apache.jsp.userAccount not found.
UP = (userAccount) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "userAccount");
^
3 errors, 1 warning
 
Stan Sokolov
Ranch Hand
Posts: 120
Hibernate IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that org.apache.jsp.userAccount
is not in classpath. It seems you don't use package to keep your class. I advice you to do this. And actually specify name of the package when define a bean.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!