Caucho Forums

Caucho Forums (
-   Hessian (
-   -   How to get user principal in home class? (

nhinhi 07-24-2012 02:40 PM

How to get user principal in home class?
Hi all,
I have a class which implements Service
public interface IMyService {
public void getWorkSpace();

public class MyServlet implements Service, IMyService {
public void getWorkSpace() {
//here, I need to get the user principal ???
//(something like request.getUserPrincipal())
// userPrincipal = request.getUserPrincipal();
System.out.println("Current user princial: " + CURRENT_USER_PRINCIPAL.getName());

In my web.xml:
<display-name>My security</display-name>
<web-resource-name>Protected Area</web-resource-name>
All authenticated role

At client side:
HessianProxyFactory factory = new HessianProxyFactory();
IMyService myService = (IMyService)factory.create(IMyService.class, url);
//here, I need to output the line: "Current user principal: myUser" ????

My web application is deployed in websphere server. The WebSphere server will be responsible for authentication the user to myservlet.
My question is in the title, how can I get the authenticated user in MyServlet?
Thank you for your help

All times are GMT. The time now is 06:38 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.