0
我的時區中的下午好。Jsp中的句柄異常
我在我的Web應用程序開發中使用了struts框架。 我有參數化的例外是在struts-config.xml文件處理:
<global-exceptions>
<exception key="sap-error" type="com.galpenergia.sgt.util.excepcoes.chained.user.UserException" path="/globalError.jsp"/>
<exception key="global-error" type="java.lang.Exception" path="/globalError.jsp"/>
</global-exceptions>
而在globalError JSP我有以下的頁面指令
<%@page isErrorPage="true" %>
當我試圖讓從消息它告訴我異常對象是空的。
<% if(exception != null) {%>
<%=exception.getMessage() %>
<%}else{ %>
<p>Exception object is null</p>
<% }%>
爲什麼會發生這種情況?
在此先感謝。 最好的regrads