Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:

Go Back   Caucho Forums > Hessian

Thread Tools Display Modes
Old 07-24-2012, 02:40 PM
nhinhi nhinhi is offline
Junior Member
Join Date: Aug 2011
Posts: 2
Default 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
Reply With Quote

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 07:57 AM.

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