Now I have the problem, that I need one file below the
/jsp/ path, that should not be protected by the filter, as
this file will be accessed by an automated process.
So, can I exclude a single file from the protection without
moving the file to another location?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
in my security-constraint I have the following definition:
<web-resource-collection>
<web-resource-name>SecJSP</web-resource-name>
<url-pattern>/jsp/*.jsp</url-pattern>
</web-resource-collection>
Now I have the problem, that I need one file below the
/jsp/ path, that should not be protected by the filter, as
this file will be accessed by an automated process.
So, can I exclude a single file from the protection without
moving the file to another location?
Hi, did you manage to sort this out, as i have a similar problem.
iam using constraint below
\ \<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE securityfilter-config PUBLIC
"-//SecurityFilter.org//DTD Security Filter Configuration 1.1//EN"
"http://www.securityfilter.org/dtd/securityfilter-config_1_1.dtd">
<securityfilter-config>
<security-constraint>
<web-resource-collection>
<web-resource-name>Artemis Application</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>AllAuthenticatedUsersAllowed</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/loginerror.jsp</form-error-page>
<form-default-page>servlet/artemispm.triton.PageRender?page=admin</form-default-page>
</form-login-config>
</login-config>
<realm className="ArtRealm">
</realm>
</securityfilter-config>
--------------------------------
however i would like to add an exceprion to this. i.e an exception to a paticular servlet call.
any suggestion or help would be welcone
You would add the following after your security-constraint tag.
<security-constraint>
<web-resource-collection>
<web-resource-name>Test</web-resource-name>
<url-pattern>/jsp/Test.jsp</url-pattern>
</web-resource-collection>
</security-constraint>
For every file that you want to exclude, you would add a security-constraint tag as above.