Jboss4.0_Jsp_page_errorPage_exception problem
nkkwok May 2, 2005 12:41 AMRelated Files:
C:\jboss-4.0.0\server\default\deploy\jsp.war\Calculate2.html
<FORM METHOD=GET ACTION=Calculate2.jsp> <INPUT TYPE=TEXT NAME=Value1><BR> <INPUT TYPE=TEXT NAME=Value2><BR> <INPUT TYPE=SUBMIT VALUE=Calculate> </FORM>
C:\jboss-4.0.0\server\default\deploy\jsp.war\Calculate2.jsp
<%@ page errorPage="Calculate2Error.jsp" %> <%! private String v1; private String v2; %> <% v1 = request.getParameter("Value1"); v2 = request.getParameter("Value2"); %> The sum of <%= v1 %> and <%= v2 %> is <%= Integer.parseInt(v1) + Integer.parseInt(v2) %>
C:\jboss-4.0.0\server\default\deploy\jsp.war\Calculate2Error.jsp
<%@ page isErrorPage="true" %> Calculate2Error.jsp reported the following error: <I><%= exception %></I>. <P><A HREF="Calculate2.html">Click here to try again</A>
My problem:
One of the response of the above codes are like this:
When the calculate2html file is displayed on the browser,
suppose when not entering any value or non-integer value
in the input box, the Calculate2Error.jsp will be called via
Calculate2.jsp to display exception error
message: java.lang.NumberFormatException: null
or any wrong input like:abcd
But we I do so, I got the following error reported:
ERROR:
Condition: When not puting value on Value1 text box.......as shown:
http://localhost:8080/jsp/Calculate2.jsp?Value1=&Value2=6
Result: The page cannot be displayed
HTTP 500 - Internal server error
Internet Explorer
Please advise why such problem occurs or any idea on the possible cause of it.
Information of my PC:-
-------Operating system used: Window professional XP sp1 (English)
--------System >> Environment Variables >> User variables
ANT_HOME: C:\apache-ant-1.6.2
JAVA_Home: c:\Program Files\Java\jdk1.5.0_01
JBOSS_HOME: C:\jboss-4.0.0
path: C:\Program Files\Java\jdk1.5.0_01\bin;C:\apache-ant-1.6.2\bin
--------System >> Environment Variables >> System variables
OS Windows_NT
Path: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
C:\Program Files\Common Files\Adaptec Shared\System;
C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;
C:\Program Files\Java\jdk1.5.0_01\bin
PATHEXT:.COM; .EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH