在web.xml中加入了如下的代码  <error-page>
<error-code>404</error-code>
<location>/pageNotFound.html</location>
</error-page>

<error-page>
<error-code>500</error-code>
<location>/internalError.html</location>
</error-page><error-page>
<exception-type>java.lang.NumberFormatException</exception-type>
<location>/numberFormatException.html</location>
</error-page>然后分别建立了对应的pageNotFound.html,internalError.html,numberFormatException.html页面以其中的一个为例,现有一html文件numberFormatException.html源码如下
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>numberFormat</title>
</head><body>
数据格式转换错误
</body>
</html>
又设置了一错误jsp文件numberFormat.jsp内容为:
<%
Integer.parseInt("ee");
%>然后在浏览器中输入http://localhost:8080/jsp/10chapter/numberFormat.jsp得到的结果为什么不是数据格式转换错误而是
无法显示网页 
您要访问的网页有问题,无法显示。 --------------------------------------------------------------------------------请尝试以下操作:打开 localhost:8080  主页,然后查找指向您感兴趣信息的链接。 
单击刷新按钮,或以后再试。单击搜索,寻找 Internet 上的信息。 
也可查看相关站点列表。 
HTTP 500 - 内部服务器错误 
Internet Explorer  
我的numberFormatException.html明明没错的啊,而且直接打开都没问题的呀?

解决方案 »

  1.   

    2006-8-9 20:57:33 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;%SystemRoot %\System32\Wbem;C:\Program Files\Java\jdk1.5.0_04\bin;C:\Program Files\Microsoft SQL Server\80\Tools\BINN
    2006-8-9 20:57:33 org.apache.coyote.http11.Http11BaseProtocol init
    信息: Initializing Coyote HTTP/1.1 on http-8080
    2006-8-9 20:57:33 org.apache.catalina.startup.Catalina load
    信息: Initialization processed in 1094 ms
    2006-8-9 20:57:33 org.apache.catalina.core.StandardService start
    信息: Starting service Catalina
    2006-8-9 20:57:33 org.apache.catalina.core.StandardEngine start
    信息: Starting Servlet Engine: Apache Tomcat/5.5.15
    2006-8-9 20:57:33 org.apache.catalina.core.StandardHost start
    信息: XML validation disabled
    2006-8-9 20:57:35 org.apache.catalina.startup.ContextConfig applicationWebConfig
    信息: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/liuyanben]
    2006-8-9 20:57:36 org.apache.coyote.http11.Http11BaseProtocol start
    信息: Starting Coyote HTTP/1.1 on http-8080
    2006-8-9 20:57:36 org.apache.jk.common.ChannelSocket init
    信息: JK: ajp13 listening on /0.0.0.0:8009
    2006-8-9 20:57:36 org.apache.jk.server.JkMain start
    信息: Jk running ID=0 time=0/110  config=null
    2006-8-9 20:57:36 org.apache.catalina.storeconfig.StoreLoader load
    信息: Find registry server-registry.xml at classpath resource
    2006-8-9 20:57:37 org.apache.catalina.startup.Catalina start
    信息: Server startup in 3844 ms
    只是这些了,不知道有没有其它的问题