Tôi muốn loại trừ chỉ một tệp JSP question.jsp
từ security-constraint
.Loại trừ một JSP khỏi sự bảo mật của web.xml
Tôi có điều này từ web.xml của tôi:
<security-constraint>
<display-name>My Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<url-pattern>*.do</url-pattern>
<url-pattern>*.jsp</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
</security-constraint>
Bạn có thể tạo thư mục và đặt mọi thứ khác (ngoại trừ question.jsp) trong thư mục đó và sử dụng mẫu đó, ví dụ: '/ securefolder/*. jsp'. –
Tôi có rất nhiều JSP nên rất rủi ro. có giải pháp nào khác không? –