Problem During deployment

HI

PLease tell ur suggestions for this error:

I expected very soon

HTTP Status 500 -

--

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

Generated servlet error:

D:\jboss-4.0.0\server\default\work\jboss.web\localhost\sample\org\apache\jsp\index_jsp.java:59: handlePageException(java.lang.Exception) in javax.servlet.jsp.PageContext cannot be applied to (java.lang.Throwable)

if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);

^

1 error

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)

org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)

note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.

--

[1762 byte] By [senthilmurugana] at [2007-11-27 9:29:00]
# 1

It looks like_jspx_page_context.handlePageException( t );

is expecting ' t ' in the above code to be of type java.lang.Exception.

Instead, its of type java.lang.Throwable. If you look up on the internet 'java.lang.Exception', you will see its derived (through inheritance) from java.lang.Throwable. Therefore you might be able to change your code from

_jspx_page_context.handlePageException( t );

to

_jspx_page_context.handlePageException( new java.lang.Exception(t) );

to elminate the error. This should work, but its not a good way to program. Instead, your JSP page should only display data and not have any business logic (such as your business logic in the JSP page that is throwing exceptions). If you read up on Model View Controller (MVC) you will see 'separation of concerns) about only using JSP to display data.

D:\jboss-4.0.0\server\default\work\jboss.web\localhost\sample\org\apache\jsp\index_jsp.java:59: handlePageException(java.lang.Exception) in javax.servlet.jsp.PageContext cannot be applied to (java.lang.Throwable)

if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);

I believe you need to import some java package into your JSP page.

Example of importing a package:

<%@ page import="java.util.*" %>

if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);

^

1 error

George123a at 2007-7-12 22:36:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...