--------------------------------------------------------------------------------
Hi,
I am trying to add some security features to an already developed web application. The problem is that I have modified the web.xml but the basic authorization doesn't work for 1 file..and that's the "index.html", which plays the role of the introduction page.All the rest demand identification first, before I browse them, except "index.html".
Also, when I tried to set as a "welcome-file" another page, it just didn't work!..it seems that this "index.html" is set as the default welcome-file no matter what I do.I have searched all the files that contain a reference to that page, or a redirection ot it but I couldn't find anything.
Here's the addition I did to the application's web.xml
<!-- SECURITY CONSTRAINT -->
<security-constraint>
<web-resource-collection>
<web-resource-name>SecureHello</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>customer</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
<!-- SECURITY ROLES -->
<security-role>
<role-name>customer</role-name>
</security-role>
<!-- WELCOME FILE IS NOT WORKING! -->
<welcome-file-list>
<welcome-file>
copyright.jsp
</welcome-file>
</welcome-file-list>
Ok..I tried a few things and some modifications.The problem is not the change the default welcome-page, but to include it to the restricted pages so that the basic authorization will work for it as well.
In the first place it seemed that only the index.html page was not included in the authorization.But then I made a second .html page to test it, and I included it in the web.xml of the application, as restricted.
Guess what..neither of the two html pages asked for login before browsing them.Somehow the html pages are totally un-affected, but this doesn't seem right.I know that basic authorization in tomcat works for any kind of pages...
Please, if anyone has anything to suggest let me know...
Hi,
I am trying to add some security features to an already developed web application. The problem is that I have modified the web.xml but the basic authorization doesn't work for 1 file..and that's the "index.html", which plays the role of the introduction page.All the rest demand identification first, before I browse them, except "index.html".
Also, when I tried to set as a "welcome-file" another page, it just didn't work!..it seems that this "index.html" is set as the default welcome-file no matter what I do.I have searched all the files that contain a reference to that page, or a redirection ot it but I couldn't find anything.
Here's the addition I did to the application's web.xml
<!-- SECURITY CONSTRAINT -->
<security-constraint>
<web-resource-collection>
<web-resource-name>SecureHello</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>customer</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
<!-- SECURITY ROLES -->
<security-role>
<role-name>customer</role-name>
</security-role>
<!-- WELCOME FILE IS NOT WORKING! -->
<welcome-file-list>
<welcome-file>
copyright.jsp
</welcome-file>
</welcome-file-list>
Ok..I tried a few things and some modifications.The problem is not the change the default welcome-page, but to include it to the restricted pages so that the basic authorization will work for it as well.
In the first place it seemed that only the index.html page was not included in the authorization.But then I made a second .html page to test it, and I included it in the web.xml of the application, as restricted.
Guess what..neither of the two html pages asked for login before browsing them.Somehow the html pages are totally un-affected, but this doesn't seem right.I know that basic authorization in tomcat works for any kind of pages...
Please, if anyone has anything to suggest let me know...