views:

234

answers:

2

I have a self built JSP webapp and at the moment I'm using tomcats built in admin pannel to manage user accounts (that are stored in tomcats config xml files) but this is limited because i can not create new accounts from within the web-app (eg. I can not have a sign up website) and need to manually create the accounts.

What is the most straight forward way of implementing accounts in a tomcat environment?

dennis

+2  A: 

Set up a database realm in Tomcat, either a simple JDBC realm or a DataSource realm that will allow for connection pooling. Then adding users is a very simple CRUD web application, possibly combined with some confirmation emails.

erickson
A: 

If you are on Windows (not specified in the question) and want to use a windows logon to authenticate you might want to check out JCIFS. JCIFS allows you to obtain the user name of an authenticated windows logon in Java. It is easy to install and relatively foolproof.

Not for every situation but in windows only environments it can get you up and running quickly.

Peter Kelley
jCIFS can be used to integrate ActiveDirectory auth on services running on non-windows servers as well, so it's not entirely "windows only". (obviously it's only useful if you use AD to begin with)
mitchnull