Win a copy of Rust Web Development this week in the Other Languages 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

JSP Error

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 120
IntelliJ IDE Hibernate Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You showed up just in time for the waffles! And this tiny ad:
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
reply
    Bookmark Topic Watch Topic
  • New Topic