Tuesday, March 10, 2015

malformed URI sequence

Hello,
        I am using GWT 2.5.1 version. In my project, I have a case where if the user enters locale parameter other than the supported languages we are showing a default language which is english(en). For getting the locale parameter, I am using com.google.gwt.user.client.Window.Location.getParameterMap.If the user enters '%' special charater in the locale parameter from the url then, the getParameterMap() method (com.google.gwt.user.client.Window.Location.getParameterMap) is throwing some exception.The below is the exception thrown by the getParameterMap() method.



com.google.gwt.core.client.JavaScriptException: (URIError) @com.google.gwt.http.client.URL::decodeQueryStringImpl(Ljava/lang/String;)([string: '%']): malformed URI sequence
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.http.client.URL.decodeQueryStringImpl(URL.java)
    at com.google.gwt.http.client.URL.decodeQueryString(URL.java:117)
    at com.google.gwt.user.client.Window$Location.buildListParamMap(Window.java:310)
    at com.google.gwt.user.client.Window$Location.ensureListParameterMap(Window.java:327)
    at com.google.gwt.user.client.Window$Location.getParameterMap(Window.java:230)
    at srdm.cloud.client.sso.WebUISession.checkSession(WebUISession.java:283)
    at srdm.cloud.client.WebUI.onModuleLoad(WebUI.java:79)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:406)
    at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Thread.java:744)


Now, How can I get the parameters from the url using gwt irrespective of any special characters.


Thanks & Regards,
Sarath U

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment