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 bu...@apache.org on 2004/06/07 09:16:28 UTC
DO NOT REPLY [Bug 29421] New: -
PortletURL.setParameter("key.with.dot", ...) breaks portal
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29421>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=29421
PortletURL.setParameter("key.with.dot", ...) breaks portal
Summary: PortletURL.setParameter("key.with.dot", ...) breaks
portal
Product: Pluto
Version: Current CVS
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: portal driver
AssignedTo: pluto-dev@jakarta.apache.org
ReportedBy: Pradeep.Gond@Sun.COM
When a key is used with "." (DOT) in PortletURL.setParameter("key.with.dot",
...), pluto portal breaks and gives SEVERE error.
Exception will be "java.lang.NumberFormatException: For input string: with", if
key="key.with.dot"
Same problem occurs for renderParameters, as reported here
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=pluto-user@jakarta.apache.org&msgNo=688
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 "." for parameters, 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 "with" becomes value for key "key".. as a result
method PortalControlParameter.decodeRenderParamValues() line 74 throws an NFE,
which appears as:
"java.lang.NumberFormatException: For input string: with"
Is DOT reserved for internal use or is there any specific reason for not
allowing DOT in keys? 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, "/");