• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Http 500 Internal Server Error.

 
ajay vasudevan
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have deployed a jsp page in tomcat 5.5 web server using standard actions. The code is as under

UniversalEL.jsp
----------------------
<%@ page errorPage="/EL1/myException.jsp" session="false"%>
<html>
<title>
</title>
<body bgcolor='#BBBBFF'>
</body>
<jsp:useBean id = "emp_attrib" class = "EL1.Employee" scope = "request">
<jsp:setProperty name = "emp_attrib" property = "name" value = '${param.name_txt}'/>
</jsp:useBean>
<%--
EL1.Person emp_attrib = new EL1.Employee();
emp_attrib.setName(request.getParameter("name_txt"));
--%>
Inside Universal Page...
<jsp:getProperty name = "emp_attrib" property = "name"/>
</html>

the exception page

myException.jsp
-------------------------
<@page isErrorPage="true"%>
<html>
<%
exception.getMessage();
%>
</html>

the bean class

Employee.java
--------------------

package EL1;
public class Employee
{
String name;
public Employee()
{}
public void setName(String name)
//throws Exception
{
this.name = name;
int i = 10/0; <-- Note Here !
}
public String getName()
{
return name;
}
public void setDas(String ds)
{
name = ds;
}
public String getDas()
{
return "DAS12121";
}
}

when i type the following url
http://ajay/EL1/Universal.jsp

i get the following error.
" Http 500 Internal Server Error. "

but when i code
System.out.println("From Error Page"); in myException.jsp
it prints it to the console !!!

Can u please explain why ?

regards,

ajay vasudevan
scjp 1.4
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic