JSR-168 Portlet and Alfresco Dashlet config for MySpaces portlet. Fixes for web-script JSF runtime to encode URL args as per servlet runtime.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5826 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-06-01 13:27:16 +00:00
parent def34e03f1
commit fcf8278717
4 changed files with 67 additions and 1 deletions

View File

@@ -24,6 +24,10 @@
*/
package org.alfresco.web.scripts.jsf;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.web.scripts.WebScriptMatch;
import org.alfresco.web.scripts.WebScriptURLRequest;
@@ -50,6 +54,18 @@ public class WebScriptJSFRequest extends WebScriptURLRequest
public WebScriptJSFRequest(String[] scriptUrlParts, WebScriptMatch match)
{
super(scriptUrlParts, match);
// decode url args (as they would be if this was a servlet)
try
{
for (String name : this.queryArgs.keySet())
{
this.queryArgs.put(name, URLDecoder.decode(this.queryArgs.get(name), "UTF-8"));
}
}
catch (UnsupportedEncodingException e)
{
throw new AlfrescoRuntimeException("Unable to decode UTF-8 url!", e);
}
}
/* (non-Javadoc)