How to request.getParameter in GWT?

1,170 views
Skip to first unread message

Randhawa

unread,
Jan 31, 2008, 11:42:51 PM1/31/08
to Google Web Toolkit
Hey guys,

How can I use request.getParameter() in GWT?

For ex. I have a url http://google.com/gwt.jsp?id=1

How do I get the value of the id?

Thanks

GWT Newbie

unread,
Feb 1, 2008, 12:57:55 AM2/1/08
to Google Web Toolkit
If you are talking about the client side, there is no concept
'request', but just the query parameter that could be obtained from
the docoment.location.href by using regular expressions.

On Feb 1, 12:42 pm, Randhawa <simerj...@gmail.com> wrote:
> Hey guys,
>
> How can I use request.getParameter() in GWT?
>
> For ex. I have a urlhttp://google.com/gwt.jsp?id=1

Tom Hjellming

unread,
Feb 1, 2008, 1:03:18 AM2/1/08
to Google-We...@googlegroups.com

Pavel Byles

unread,
Feb 1, 2008, 9:24:30 AM2/1/08
to Google-We...@googlegroups.com
use jsni:
$wnd.location.search;

Srini Marreddy

unread,
Feb 1, 2008, 11:04:48 AM2/1/08
to Google Web Toolkit
In your GWT Remote Servlet class which extends RemoteServiceServlet
you can get the HttpServletRequest object by calling protected method
getThreadLocalRequest() . you can read all request parameters from
that object .

Regards
Srini Marreddy

On Feb 1, 8:24 am, "Pavel Byles" <pavelby...@gmail.com> wrote:
> use jsni:
> $wnd.location.search;
>
> On Jan 31, 2008 11:42 PM, Randhawa <simerj...@gmail.com> wrote:
>
> > Hey guys,
>
> > How can I use request.getParameter() in GWT?
>
> > For ex. I have a urlhttp://google.com/gwt.jsp?id=1
Reply all
Reply to author
Forward
0 new messages