You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by Pradeep <Pr...@Sun.COM> on 2004/05/27 15:50:11 UTC

pluto: PortletURL.setParameter("my.some.key", ...) breaks portal

Hi,

When a key is used with "." (DOT), pluto portal breaks and gives SEVERE 
error.
Exception will be "PortletException: For input string: some" , if 
key="my.some.key"

It is a common practice to use DOT's for key. I did some investigation 
and here is what I found:

this method 
org.apache.pluto.portalImpl.core.PortalURL.analyzeRequestInformation() 
is tokenizing on "/" and "."  which is not allowing to have a key with 
"." (DOT).
Because of internal encoding any render param's value should start with 
an int, representing the count.. here "some" becomes value for key 
"my".. as a result method 
PortalControlParameter.decodeRenderParamValues() line 74 throws an NFE, 
which appears as:
"PortletException: For input string: some"

is DOT reserved for internal use or is there any specific reason for not 
allowing DOT in key? otherwise we can fix it as follows:

[portal\src\java\org\apache\pluto\portalImpl\core\PortalURL.java, line 
377: ]

StringTokenizer tokenizer = new StringTokenizer(pathInfo, "/.");

following will fix the issue:
StringTokenizer tokenizer = new StringTokenizer(pathInfo, "/");

-- 
Regards,
Pradeep



Re: pluto: PortletURL.setParameter("my.some.key", ...) breaks portal

Posted by Marcel Dullaart <md...@epo.org>.
Indeed. I also reported this problem, altough I tought it was limited to 
the use of renderParameters.
I reported the problem in the user mailinglist 
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=pluto-user@jakarta.apache.org&msgNo=688
and a possible solution in the dev list 
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=pluto-dev@jakarta.apache.org&msgNo=1523

Marcel




Pradeep <Pr...@Sun.COM> 
27-05-2004 15:50
Please respond to
pluto-dev@jakarta.apache.org


To
pluto-dev@jakarta.apache.org
cc

Subject
pluto: PortletURL.setParameter("my.some.key", ...) breaks portal






Hi,

When a key is used with "." (DOT), pluto portal breaks and gives SEVERE 
error.
Exception will be "PortletException: For input string: some" , if 
key="my.some.key"

It is a common practice to use DOT's for key. I did some investigation 
and here is what I found:

this method 
org.apache.pluto.portalImpl.core.PortalURL.analyzeRequestInformation() 
is tokenizing on "/" and "."  which is not allowing to have a key with 
"." (DOT).
Because of internal encoding any render param's value should start with 
an int, representing the count.. here "some" becomes value for key 
"my".. as a result method 
PortalControlParameter.decodeRenderParamValues() line 74 throws an NFE, 
which appears as:
"PortletException: For input string: some"

is DOT reserved for internal use or is there any specific reason for not 
allowing DOT in key? otherwise we can fix it as follows:

[portal\src\java\org\apache\pluto\portalImpl\core\PortalURL.java, line 
377: ]

StringTokenizer tokenizer = new StringTokenizer(pathInfo, "/.");

following will fix the issue:
StringTokenizer tokenizer = new StringTokenizer(pathInfo, "/");

-- 
Regards,
Pradeep