Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-26-2007, 08:08 PM
Senior Member
 
Join Date: Jun 2007
Posts: 111
Eric is on a distinguished road
Accounts of users
I want to make a page Web with accounts of users, in which the users can be registered and login, does somebody can guide to me?, how can I do that?

I did it that: when somebody does login I pay attention to the data base if that person already registered, I do session=req.getSession (true); and I keep like attribute from session the user's name. The problem is when other user does login, the page shows the first user's account.

Eric
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-27-2007, 05:20 PM
Senior Member
 
Join Date: Jun 2007
Posts: 114
Albert is on a distinguished road
RE: Accounts of users
if you use tomcat, attached the security of your project to this. you only must modify server.xml

Code:
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" driverName="org.postgresql.Driver" connectionURL="jdbc: postgresql://10.0.0.1:5432/DB" connectionName="USER_DB" connectionPassword="PASSWORD_DB" userTable="TABLE_USERS" userNameCol="FIELD_USER" userCredCol="FIELD_PASSWORD" userRoleTable="TABLE_ROLLS" roleNameCol="FIELD_ROLL" />
and in the web.xml

Code:
<login-config> <auth-method>FORM</auth-method> <realm-name>MyFirst Protected Area</realm-name> <form-login-config> <form-login-page>/PAGE_LOGIN</form-login-page> <form-error-page>/PAGIE_LOGIN_ERROR</form-error-page> </form-login-config> </login-config> <security-role> <role-name>ROLLS_THA_ACEPT_THE_SYSTEM</role-name> </security-role>
Albert
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Users peiceonly Threads and Synchronization 6 06-09-2008 10:17 AM


All times are GMT +3. The time now is 09:11 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org