portlet url non conformance to api

Description

It seems that when I create a PortletURL and set a parameter, then use .toString to display this url for use, the parameter is set.

However, if i use the same url object, and set the parameter to another value, instead of changing the existing value, it creates another parameter in the list.

e.g. parameter method

PortletURL url = null;
url = response.createRenderURL();
System.out.println("DAVViewingPortlet.addNavigation : url : " + url.toString( ) );
url.setParameter( "method", "CreateCollection" );
System.out.println("DAVViewingPortlet.addNavigation : url : " + url.toString( ) );
url.setParameter( "method", "UploadFile" );
System.out.println("DAVViewingPortlet.addNavigation : url : " + url.toString( ) );

DAVViewingPortlet.addNavigation : url : http://127.0.0.1:8080/c/portal/layout?p_l_id=1&p_p_id=davviewing_WAR_davviewing&p_p_action=0&p_p_state=normal&p_p_mode=view&p_p_width=536&p_p_col_order=w1&p_p_col_pos=0&p_p_col_count=1&#p_davviewing_WAR_davviewing
DAVViewingPortlet.addNavigation : url : http://127.0.0.1:8080/c/portal/layout?p_l_id=1&p_p_id=davviewing_WAR_davviewing&p_p_action=0&p_p_state=normal&p_p_mode=view&p_p_width=536&p_p_col_order=w1&p_p_col_pos=0&p_p_col_count=1&_davviewing_WAR_davviewing_method=Home&_davviewing_WAR_davviewing_method=CreateCollection&#p_davviewing_WAR_davviewing
DAVViewingPortlet.addNavigation : url : http://127.0.0.1:8080/c/portal/layout?p_l_id=1&p_p_id=davviewing_WAR_davviewing&p_p_action=0&p_p_state=normal&p_p_mode=view&p_p_width=536&p_p_col_order=w1&p_p_col_pos=0&p_p_col_count=1&_davviewing_WAR_davviewing_method=Home&_davviewing_WAR_davviewing_method=CreateCollection&_davviewing_WAR_davviewing_method=UploadFile&#p_davviewing_WAR_davviewing
D

The last url has two method parameters set to diferent values.

Cheers

Paul.

Environment

jdk 1.4 liferay pro 3.5

Activity

Show:

Raymond AugéOctober 31, 2005 at 1:33 PM

Hello Paul,

My name is Raymond Auge. I'm a Liferay user and I'm trying to integrate
Slide into Liferay. I'm having a problem with jaas authentication. Since
you're our resident expert on the subject I thought that I might ask you
for advice.

I'll show you what I'm trying and perhaps you can tell me what I'm doing
wrong:

--> configure slide for jaas
slide.xml:
<Context path="/slide" debug="0" privileged="true" useNaming="true">
<Realm className="org.apache.catalina.realm.JAASRealm"
appName="slide_login"
userClassNames="com.liferay.portal.jaas.PortalPrincipal"
roleClassNames="com.liferay.portal.jaas.PortalRole"
debug="99"
useContextClassLoader="false"
/>

</Context>

--> add jaas config
jaas.config: (loaded at tomcat startup)
PortalRealm {
com.liferay.portal.jaas.PortalLoginModule required;
};

slide_login {
com.liferay.portal.jaas.PortalLoginModule required;
};

--> configure the rest of slide
-->enable authentication in slide/WEB_INF/web.xml
-->added
<auto-create-users>true</auto-create-users>
<auto-create-users-role>org.apache.slide.structure.SubjectNode</auto-create-users-role>
to Domain.xml

--> slide is deployed in it's own webapp (this could be the problem)

Thanks,

Raymond

Brian ChanAugust 7, 2005 at 6:46 PM

CVS COMMIT LOG:
SUBJECT: [Lportal-cvs-commits] portal/portal-ejb/src/com/liferay/portlet PortletURLImpl.java,1.53,1.54
https://liferay.atlassian.net/browse/LEP-426#icft=LEP-426

Brian ChanAugust 7, 2005 at 6:46 PM

CVS COMMIT LOG:
SUBJECT: [Lportal-cvs-commits] portal/portal-ejb/src/com/liferay/portal/util PropsUtil.java,1.138,1.139
https://liferay.atlassian.net/browse/LEP-426#icft=LEP-426

Brian ChanAugust 7, 2005 at 6:46 PM

CVS COMMIT LOG:
SUBJECT: [Lportal-cvs-commits] portal/portal-ejb/src/com/liferay/portal/struts StrutsURLEncoder.java,1.14,1.15
https://liferay.atlassian.net/browse/LEP-426#icft=LEP-426

Brian ChanAugust 7, 2005 at 6:46 PM

CVS COMMIT LOG:
SUBJECT: [Lportal-cvs-commits] portal/portal-ejb/classes portal.properties,1.234,1.235
https://liferay.atlassian.net/browse/LEP-426#icft=LEP-426

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Affects versions

Priority

Zendesk Support

Created August 2, 2005 at 5:57 AM
Updated October 31, 2005 at 1:33 PM
Resolved August 7, 2005 at 6:45 PM

Flag notifications