I read the Jportal 2.4.0 refereence guide and know in the jboss-portlet.xml ,we can Inject Services in the portlet context. so I do the same thing like the reference .But I do it in Portal 2.2.0, I don't think there is any diference.
then in my portlet i Write:
UserModule userModule = (UserModule) getPortletContext().getAttribute("UserModule");
String userId = request.getParameters().getParameter("userid");
User user = userModule.findUserById(userId);
but when I test, firstly, I login then I found userModule is null , and also user is null. so anyone can help me solve this problem? I want get the user object in the context. Thanks. !