Hi, i have a web application, im using Tomcat 4.1 as a web server and jsp and servlets to biuld the application.
I use BASIC authentication to validate the users that can login, and i have a logout jsp page, where i invalidate the session in a scriplet like this:
and then there is a link to the main page (the one where the user has not logged in), but once in the main page instead of asking for the username and password again to enter a restricted resource, it lets it in, keeping the same user as before.
does anybody know what am i doing wrong??
i define all the authentication thing in my web.xml file like this:
if you need more information please let me know.. and i hope someone can give me an answer
thank you very much
Eli
I use BASIC authentication to validate the users that can login, and i have a logout jsp page, where i invalidate the session in a scriplet like this:
Code:
<% session.invalidate() %>
and then there is a link to the main page (the one where the user has not logged in), but once in the main page instead of asking for the username and password again to enter a restricted resource, it lets it in, keeping the same user as before.
does anybody know what am i doing wrong??
i define all the authentication thing in my web.xml file like this:
Code:
<security-constraint>
<web-resource-collection>
<web-resource-name> Test</web-resource-name>
<url-pattern> /jsp/firstPage.jsp </url-pattern>
<http-method> GET </http-method>
<http-method> POST </http-method>
</web-resource-collection>
<auth-constraint>
<role-name> userallowed </role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method> BASIC </auth-method>
<realm-name> appcontext </realm-name>
</login-config>
if you need more information please let me know.. and i hope someone can give me an answer
thank you very much
Eli