• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem in executing beans in a jsp file..please help  RSS feed

 
javed iqbal
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I am facing problem in executing a java bean in a jsp file.
I am using jswdk1.0.1 on Windows NT workstation.
The classpath environment variable is set as
C:\jdk1.3\lib\tools.jar;C:\jswdk1.0.1\lib\jspengine.jar;
C:\jswdk1.0.1\classes;C:\jswdk1.0.1\examples\HelloJsp;
The folder C:\jswdk1.0.1\examples\HelloJsp contains the source files(*.jsp) and C:\jswdk1.0.1\classes contains java bean.

my code is :
<html>
<head>
<title>Admin Login Form</title>
</head>
<%@ page language = "java" %>
<jsp:useBean id="adBean" scope="page" class="adminBean" />
<body>
<%!boolean result=false; %>
<%
adBean.openConnection();
adBean.getAdminData(request);
result=adBean.verifyAdminNamePassword();
adBean.closeConnection();
if (result)
{
%>
<p>You are login successfully</p>
<%
}
else
{
%>
<p>Sorry can not verify admin name and password </p>
<%
}
%>
</body>
</html>
The error on the browser is "500 HTTP internal Server error"
How can i adjust the classpath so that it will execute the bean from the jsp file.
Thanks in advance.
[This message has been edited by javed iqbal (edited July 16, 2001).]
[This message has been edited by javed iqbal (edited July 16, 2001).]
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"500 Internal Server Error" usually means that the servlet/JSP is abnormally terminating. Check your server logs.
 
Sarath Mohan
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Try this:
Just include jsp.jar and servelt.jar in your webservers classpath
Check whether your bean is declared as a public class with public constructor.
Enable java console in your browser (IE)
and catch all possible errors with system.out.println
while executin bean check your java console and webserverer output
Cheers
Binu
Originally posted by Tim Holloway:
"500 Internal Server Error" usually means that the servlet/JSP is abnormally terminating. Check your server logs.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!