天天看點

JasperException: is quoted with " which must be escaped when used within

異常資訊:

錯誤原因:

org.apache.jasper.JasperException: /WEB-INF/view/jsp/default/ui/casLoginView.jsp(48,35) Attribute value request.getQueryString() == null ? "" : request.getQueryString().replaceAll("&locale=([A-Za-z][A-Za-z]_)?[A-Za-z][A-Za-z]|^locale=([A-Za-z][A-Za-z]_)?[A-Za-z][A-Za-z]", "") is quoted with " which must be escaped when used within the value

這句話的意思是說,在value屬性中引用"時應該轉義,escaped是逃脫逃逸的意思,我們國内的書籍都把這個翻譯成了轉義。

解決辦法:

value="<%=request.getQueryString() == null ? \"\" : request.getQueryString().replaceAll(\"&locale=([A-Za-z][A-Za-z]_)?[A-Za-z][A-Za-z]|^locale=([A-Za-z][A-Za-z]_)?[A-Za-z][A-Za-z]\", \"\")%>"
           

繼續閱讀