Hi all,

   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.

   <portlet-app>
   
      <service-name>UserModule</service-name>
      <service-class>org.jboss.portal.identity.UserModule</service-class>
      <service-ref>:service=Module,type=User</service-ref>
   
</portlet-app>


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. !
   


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974742#3974742

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974742
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to