aspose file tools*
The moose likes Tomcat and the fly likes Authentication problems with MySQL and Tomcat 6.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Authentication problems with MySQL and Tomcat 6.0" Watch "Authentication problems with MySQL and Tomcat 6.0" New topic
Author

Authentication problems with MySQL and Tomcat 6.0

Dani Thorp
Greenhorn

Joined: Apr 29, 2008
Posts: 11
Hi everyone,
I'm trying to get FORMS authentication with Tomcat 6.0 and MySQL DB, but I can access to a directory that should be protected... There's my configuration files:

tomcat-users.xml


server.xml


And web.xml


The 'user' and 'role' tables are created, and the ODBC driver is set correctly. In the /security directory I have some html pages that I would protect, but I don't know what I'm doing wrong.
Any help will be highly appreciate.
Dani Thorp
Greenhorn

Joined: Apr 29, 2008
Posts: 11
I've noticed that in the /secure directory the html pages are shown without CSS, so I suppose that FORMS security is working, but somehow I'm not redirected to the login page.
Does anyone knows if it's possible to block html pages with that security? I mean, I only would like to know if it's possible to do it, because googling around I've mainly found information with jsp pages.
Many thanks,

Dani
Dani Thorp
Greenhorn

Joined: Apr 29, 2008
Posts: 11
Pffff... at last I got it. Just in case someone needs my solution: in the 'server.xml' file I had the the 'context' defined inside the 'engine' tag, when would be inside the 'host'.

Jaja, I know nobody has responded me, but writing here also helps me to put my thoughts in order ^^'
Lenny Peter
Ranch Hand

Joined: Apr 22, 2008
Posts: 52
Like this?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Authentication problems with MySQL and Tomcat 6.0