[jboss-user] [JBoss Portal] - Getting PortletPreferences in StrutsPortlet
sridhark79
do-not-reply at jboss.com
Wed Dec 27 04:40:01 EST 2006
Hi,
I am trying to obtain PortletPreferences from a Struts Action class as follows
public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) throws Exception {
PortletRequest portRequest = (PortletRequest)request.getAttribute("javax.portlet.request");
PortletPreferences prefs = renderRequest.getPreferences();
System.out.println("The value of attribute is "+prefs.getValue("attribute1","default"));
}
But all the time i get only default printed on the server console. The attribute1 has a value in the HSQL portal database.
I ma accesing only after sucessful portal logging. Though i was unable to retreive the values i am able to set the value of this attribute.
Can anyone let me know whats incorrect or wrong here.?
Thanks & Regards
Sridhar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996401#3996401
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996401
More information about the jboss-user
mailing list