wood burning stoves 2.0*
The moose likes Tomcat and the fly likes jdbcRealm. Suddenly can't get access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "jdbcRealm. Suddenly can Watch "jdbcRealm. Suddenly can New topic
Author

jdbcRealm. Suddenly can't get access

camilla camilla
Greenhorn

Joined: Jul 05, 2005
Posts: 2
I have implementet formAuthentication and jdbcRealm by subclassing jdbcRealm since I have my own db-structure with users and roles. This seems to work fine. In my loginpage I use j_security:
<form method="POST" action="j_security">
<input type="text" name="j_username" />
<input type="text" name="j_username" />
camilla camilla
Greenhorn

Joined: Jul 05, 2005
Posts: 2
upps... deidn't mean to sendt it yet..
Again:

I have implementet formAuthentication and jdbcRealm by subclassing jdbcRealm since I have my own db-structure with users and roles. This seems to work fine. In my loginpage I use j_security:
<form method="POST" action="j_security">
<input type="text" name="j_username" />
<input type="text" name="j_username" />
</form>

I have defines roles in the web.xml file and have different accesslevels to different folders. This also seems to work fine, since I can login as I want to with correct roles and users.
But the problem occurs when I logout and want to login again.

In my logout I have the following code:
session.invalidate();
response.sendRedirect("index.jsp");

The logou works fine, but if I relogin I get access denied error:
403 - access to the specified resource has been forbidden.
If I close the browser and try again it works fine. So I have to close the browser before logging in with the same or a different user. And worse, this happens only once and a while.

Has somebody seen something similar. I can't figure out the problem. I'm mainly using JSF technology, but jsp for the loginpage because of the j_security.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jdbcRealm. Suddenly can't get access