[JBoss Portal] - Unable to persist preferences.
by PeterJ
I am trying to update the portlet preferences within my code, but the preferences are not being persisted. I have based my code on what I found in the WeatherPortlet. I even added debugging to the WeatherPortlet to see how it was doing things. Here is the code:
public void processAction(ActionRequest request, ActionResponse response) throws PortletException {
| String newZip = request.getParameter("newzip");
| log.debug("newZip=" + newZip);
| if(null != newZip) {
| PortletPreferences prefs = request.getPreferences();
| try {
| prefs.setValue("RssXml", RSS_URL_PREFIX + newZip);
| prefs.store();
| String xxx = prefs.getValue("RssXml", null);
| log.debug("RssXml=" + xxx);
| } catch(Exception e) {
| e.printStackTrace();
| }
| }
| response.setRenderParameter("newzip", RSS_URL_PREFIX + newZip);
| response.setPortletMode(PortletMode.VIEW);
| }
And here is what shows up on the log file (sans leading junk):
newZip=92691
| RssXml=http://xml.weather.yahoo.com/forecastrss?p=33145
The 33145 zip is what is configured in portal.xml. So immediately after setting the preference and storing it, it disappears and reverts back to the original setting.
Should I open a JIRA issue?
Using: JBoss 4.0.4-GA, JBoss Portal 2.4.0-CR1, JDK 5.0
Standard disclaimer: I searched through the forum, JIRA, and even did a general google and could not find anything on this topic.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959329#3959329
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959329
19 years, 9 months
[Security & JAAS/JBoss] - Where is the destination url stored?
by bezdomny
I have an issue, similar to others here, where my default page is sometimes my login.html page. If this is the case, when I log into the web app, I get the 400 Invalid direct reference message because to j_security_check, the destination page is also the log in page. Here is my login-config section of web.xml
<login-config>
<auth-method>FORM</auth-method>
<realm-name>blah</realm-name>
<form-login-config>
<form-login-page>/common/login.html</form-login-page>
<form-error-page>/common/loginerror.jsp</form-error-page>
</form-login-config>
</login-config>
Where does JBoss store the URL it uses after a successful login? I want to check this to see it is set, in the case of someone bookmarking the login.html page, and if it is set to the login.html page explicitly. Can anyone help here?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959320#3959320
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959320
19 years, 9 months