Pluto issue:
https://issues.apache.org/jira/browse/PLUTO-516
https://issues.apache.org/jira/browse/PLUTO-516 - Pluto's
PorletSessionImpl#setAttribute sometimes sets var into APPLICATION_SCOPE
without explanation
Antony Stubbs wrote:
>
> Ok, trying to track this down, think I've found something.
>
>
> Why does the Pluto PorletSessionImpl#setAttribute use application shop in
> the following situation? This really needs explanation ala javadoc etc.
> Because in the spec, it clearly says that setAttribute should use
> PORTLET_SCOPE as it does in the else block. This seems to be cause the
> session attributes set in getWindowId in the Apache Bridges to fail in
> detecting the container assigned window id, because of course the
> attribute gets put into APPLICATION_SCOPE and a window id is never
> created.
>
>
> public void setAttribute(String name, Object value, int scope) {
> ArgumentUtility.validateNotNull("attributeName", name);
> if (scope == PortletSession.APPLICATION_SCOPE) {
> httpSession.setAttribute(name, value);
> } else {
> httpSession.setAttribute(createPortletScopedId(name), value);
> }
> }
>
>
> Ok, yup, changing the setAttribute calls from
> PortletWindowUtils#getWindowId to call the explicit version of
> setAttribute(name,value,scope) and pass PortletSession.PORTLET_SCOPE lets
> the Apache Bridges function work correctly.
>
> I will continue to investigate. Can anyone offer an explanation?
> The Apache Bridges issue is again, here:
> https://issues.apache.org/jira/browse/PB-84
>
>
> Antony Stubbs wrote:
>>
>> I'm having difficulty getting my helloworld portlet running on pluto,
>> with apache bridges.
>>
>> I am getting StringIndexOutOfBoundsException on
>> PortletWindowUtils#getWindowId
>>
>> portletWindowId = nameRef[0].substring("javax.portlet.p.".length(),
>> nameRef[0].indexOf('?'));
>>
>> throws StringIndexOutOfBoundsException, because the value of nameRef[0]
>> comes back just as PORTLET_WINDOW_ID
>>
>> i.e. "org.apache.portals.bridges.util.portlet_window_id" not
>> "javax.portlet.p.*" as the code implies
>>
>>
>> getPortletWindowId for session: CC465B39BA9199712DEEF690F90AE2C2 (thread:
>> 15)
>> no portletWindowId yet - going to derive it.
>> 17/10/2008 15:44:23 org.apache.catalina.core.ApplicationDispatcher invoke
>> SEVERE: Servlet.service() for servlet default threw exception
>> java.lang.StringIndexOutOfBoundsException: String index out of range: -17
>>
>>
>> I'm not sure but I discussed it here and it may be related:
>> https://issues.apache.org/jira/browse/PB-84 CCE in
>> PortletWindowUtils.getPortletWindowId
>>
>> Does the Bridges windowId code not work correctly when running on portlet
>> 2.0 perhaps? I know sessio0n isolation is now an optional feature of
>> portlet 2.0 - perhaps that's causing problems.
>>
>
>
-----
___________________________
http://stubbisms.wordpress.com http://stubbisms.wordpress.com
--
View this message in context:
http://www.nabble.com/StringIndexOutOfBoundsException-on-apache-bridges-tp20055052p20079501.html
Sent from the Pluto - User mailing list archive at Nabble.com.