The client side of GWT won't help you.
The server side is the GWT RPC mechanism, and it won't help you a lot too.
It depends  of the server technology.
If you're in a java world, best would be to rely on a servlet. They are
indeed made to manage such things  :-)

you would have something like that, with a "ManagePostServlet" :

1 : the submit :

  <form method="POST" action="
http://localhost:8888/servlet/ManagePostServlet<http://localhost:8888/com.startup.strhandle/strhandle.html>
">
      User Name <input name=l-name><br>
       <input type=hidden name=prefered value="tt">
</form>


2 : Handling the Post data


 public void  doPost ( HttpServletRequest  req, HttpServletResponse  res )

        throws ServletException, IOException {

..

    // Get the parameter.
   // store it in a context, or do what you want with it :-)

        req.getParameter("prefered");
..

3: Redirect/Forward to a GWT page

Once you've retrieved the post data, you can go to GWT page.
Do a forward or a redirect (it depends of what your pages do... see
http://www.javapractices.com/topic/TopicAction.do?Id=181 )

The servlet can store data in the session for example.

Once you've reached a GWT page, you can use a classical GWT service
(which is a servlet in fact...) to retrieve these data.



008/12/17 Yair Ohayon <[email protected]>

> Great , that's exactly what i want to do.
> How do i parse that parameters on the server ?
> Maybe this example will clearify what i am searching for
> some web site
> ...
>       <form method="POST" action="
> http://localhost:8888/com.startup.strhandle/strhandle.html";>
>       User Name <input name=l-name><br>
>        <input type=hidden name=prefered value="tt"><br>
>  ...
> Action is my gwt app ,
> After submitting , the browser display the strhandle.html and i want to
> access the post params , in this example param "prefered".
>
> Is this impossible too ?
>
>
>
>
>
> On Wed, Dec 17, 2008 at 9:19 PM, Jason Essington <
> [email protected]> wrote:
>
>>
>> Correct, you cannot read the post parameters from the client, as they
>> don't really exist.
>>
>> An HTTP post supplies the post parameters as the content of the
>> request (server) and they are no longer available when the response is
>> returned (client)
>>
>> you would have to parse the parameters on the server, and somehow
>> embed them in your response.
>>
>> -jason
>>
>> On Dec 17, 2008, at 12:12 PM, Croc wrote:
>>
>> >
>> > Someone please...?
>> >
>> >
>> > On Dec 16, 10:40 pm, Croc <[email protected]> wrote:
>> >> Hi All,
>> >> I am new to gwt and didn't find how to read post paramters in GWT
>> >> App.
>> >> meaning that i have an html page with uses some input fields (pure
>> >> html 0 no java script) and this html is redirecting to my gwt app , i
>> >> need to read those paramters on the GWT app  and respond.
>> >>
>> >> I can readt the GET params by using
>> >>  Window.Location.getParameterMap();
>> >>
>> >> but i can't seem to find a way to read POST .
>> >> tries dictionary - but the html is with no scripts so it won't help
>> >> me.
>> >>  anyone please?
>> > >
>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to