0
我必須刪除jstl庫(許可證問題)。使用jsp scriptlet重寫<c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>
的正確方法是什麼?
我想在幾個其他下面的代碼:
<%= session.getAttribute("SPRING_SECURITY_LAST_EXCEPTION.message") %>
但它返回null。
此外,我不能簡單地更改爲${SPRING_SECURITY_LAST_EXCEPTION.message}
,因爲所有特殊的html字符都需要轉義。
我試過了,但我得到了「方法getMessage()未定義類型對象」錯誤。我嘗試將它轉換爲字符串,但我收到了類似的錯誤消息 – gali4ka
<%=((AuthenticationCredentialsNotFoundException)session.getAttribute(「SPRING_SECURITY_LAST_EXCEPTION」))。getMessage()%>工作。當然,我不得不導入AuthenticationCredentialsNotFoundException – gali4ka