How to get login username with pageContext?

2005-10-04 Thread
%
pageContext.getRequest().???
List userRoleList =
UserRoleService.getInstance().getUserRoleList();
%

I fail to find getRemoteUser() in pageContext.getRequest
after login with JDBCRealm.
I'd like to pass it in as a parameter in getUserRoleList().

Thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get login username with pageContext?

2005-10-04 Thread
It is blank if it is printed like this

%
  String user = request.getRemoteUser();
%
c:out value=${user} /



2005/10/4, Raghupathy,Gurumoorthy [EMAIL PROTECTED]:
 %
String user = request.getRemoteUser();

 %

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: 04 October 2005 15:34
 To: Tomcat Users List
 Subject: How to get login username with pageContext?


 %
pageContext.getRequest().???
List userRoleList =
 UserRoleService.getInstance().getUserRoleList();
 %

 I fail to find getRemoteUser() in pageContext.getRequest
 after login with JDBCRealm.
 I'd like to pass it in as a parameter in getUserRoleList().

 Thanks

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to logout after login with JDBCRealm?

2005-10-02 Thread
The webapp is enabled with JDBCRealm.
After login, how to logout without closing the browser?

Thnx

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Unable to login Tomcat Manager?

2005-09-21 Thread
I have enabled JDBCRealm with MD5 in server.xml Tomcat 5.5.
Then I am not able to login Tomcat Manager.
When I click Tomcat Manager,
I input the username and password in tomcat-users.xml,
it keeps on prompting me username and password.
I wonder if the old password is not encrypted by MD5.
Then I encrypt the password by MD5 and put into tomcat-users.xml.

user username=admin password=MD5 encrypted roles=admin,manager /

Still the same?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Unable to login Tomcat Manager?

2005-09-21 Thread
However I go into http://localhost:8080/erp
It is ok.

I have added record to user_profile, user_role

Table: user_role
usernm role_name
admin   Administrator
admin   Manager
admin   admin

The error message becomes
Access to the requested resource has been denied

Why?


2005/9/22, 梁炳場 [EMAIL PROTECTED]:
 However I go into http://localhost:8080/erp
 It is ok.

 I have added record to user_profile, user_role

 Table: user_role
 usernm role_name
 admin   Administrator
 admin   Manager
 admin   admin

 The error message becomes
 Access to the requested resource has been denied

 Why?


 2005/9/22, andy gordon [EMAIL PROTECTED]:
  if you enable the jdbc realm then authentication and authorizaiton comes
  from a jdbc datasource not the tomcat.uses.xml file. This is why tomcat
  keeps asking you for a user name and password. I suggest you read the realm
  how to on the tomcat website so you can correct your problem.
 
  - andy
 
  ±ç¬±³õ [EMAIL PROTECTED] wrote:
  I have enabled JDBCRealm with MD5 in server.xml Tomcat 5.5.
  Then I am not able to login Tomcat Manager.
  When I click Tomcat Manager,
  I input the username and password in tomcat-users.xml,
  it keeps on prompting me username and password.
  I wonder if the old password is not encrypted by MD5.
  Then I encrypt the password by MD5 and put into tomcat-users.xml.
 
 
 
  Still the same?
 
  -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 
 
 
  __
  Do You Yahoo!?
  Tired of spam? Yahoo! Mail has the best spam protection around
  http://mail.yahoo.com



How to get user name after login

2005-09-14 Thread
After implementation of JDBCRealm,
how to retrieve the username in Servlet after login?


Thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Get user name from request.something()

2005-09-06 Thread
When JDBCRealm is implemented,
1. after login, can the HttpServletRequest of Struts Action get the username?

2. after login, if user ever bookmarked a page or something, can
Tomcat force the user go back to the beginning page?


Thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: After 1st installation of JDBCRealm?

2005-09-04 Thread
Thank you.

Can JDBCRealm support a user has more than 1 roles?

Can the SecurityManager support controlling path of Struts such  as
/fooApp/fooPath.do?

Thank you in advance




在 2005/9/4,Mark Thomas [EMAIL PROTECTED] 撰寫:
 梁炳場 wrote:
  Thank you Mark,
 
  How about security manager?
 
  Can I use policy file under $CATALINA_HOME/conf/catalina.policy file
  with JDBCRealm?
 
 Yes you can but this is not at all related to application users/roles.
 See
 http://java.sun.com/j2se/1.4.2/docs/guide/security/smPortGuide.html
 for what this does.
 
 Mark
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: After 1st installation of JDBCRealm?

2005-09-03 Thread
Thank you Mark,

How about security manager?

Can I use policy file under $CATALINA_HOME/conf/catalina.policy file
with JDBCRealm?



2005/9/3, Mark Thomas [EMAIL PROTECTED]:
 梁炳場 wrote:
  I just install JDBCRealm of Tomcat 5.5
  It works. Very simple to configure.
 
  But I have a few questions to ask.
 
  1. How can users change password?
 They can't without you writing some custom code.
 
  And if password is encrypted, how to manage password?
  eg, how to create the 1st user name and password?
 Again, custom code. If you use digest passwords, you can use the same
 digest mechanism.
 
  2. Can the Struts Action class get the value of request.isUserInRole()?
 Yes.
 
  3. Can JDBCRealm support policy like JAASRealm?
 No.
 
  4. Roles are defined in web.xml and database's tables.
  Is it double work? If there is a difference of roles in web.xml
  and tables for the same username, which prevail?
 There is no user to role mapping in web.xml therefore there is no
 question of one prevailing over another.
 
 Database defines mapping between users and roles.
 web.xml defines mappign between roles and application resources
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



After 1st installation of JDBCRealm?

2005-09-02 Thread
I just install JDBCRealm of Tomcat 5.5
It works. Very simple to configure.

But I have a few questions to ask.

1. How can users change password?
And if password is encrypted, how to manage password?
eg, how to create the 1st user name and password?
2. Can the Struts Action class get the value of request.isUserInRole()?
3. Can JDBCRealm support policy like JAASRealm?
4. Roles are defined in web.xml and database's tables. 
Is it double work? If there is a difference of roles in web.xml
and tables for the same username, which prevail?


Can anyone give me hints?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]