Hey abhiram,
I still have a problem in server side,, can you tell me how to catch
variable from client.
Let say I have a textbox in client.
Textbox txtComment = new Textbox;
txtComment.setName("txtComment");
txtComment .setText("hello");
in server side:
I've tried:
String varXXX = (String) request.getParameter("txtComment");
but that's not working. :(
and I've also tried like this :
try {
List items = upload.parseRequest(request);
Iterator it = items.iterator();
while (it.hasNext()) {
FileItem item = (FileItem) it.next();
if (item.isFormField()) {
String name = item.getFieldName();
if (name.equals("txtComment")) {
ret = item.getString();
}
return ret;
}
}
} catch (FileUploadException e) {
return null;
}
but still null return.
can you tell me how to catch it.
regards
On Oct 21, 12:32 am, abhiram wuntakal <[email protected]> wrote:
> Hey Yoez,
>
> Not sure if it helps. But i have a workaround solution for this. Make it a
> two-step process. First use a RemoteServiceServlet to pass across your
> variables to the server side and then save these values into some variables
> on the server side.
>
> Then you can use a HTTPServlet to pass across your file contents to the
> server side. Now you have the file as well as the variables.
>
> HTH,
> Cheers,
> Abhiram
>
>
>
> On Mon, Oct 19, 2009 at 6:12 PM, YoeZ <[email protected]> wrote:
>
> > thanks ian,, but i'm using GWT and tried to uploadfile which is must
> > using FormPanel.
> > I have successfully upload my file to server with UploadFile widget,
> > but I have another textboxes too. and dunno how to catch inside
> > FormPanel.
>
> > On Oct 19, 7:15 pm, Ian Bambury <[email protected]> wrote:
> > > You'll stand more chance of an answer if you ask that question in a Java
> > > forum. This is a GWT group.
> > > Ian
>
> > >http://examples.roughian.com
>
> > > 2009/10/19 YoeZ <[email protected]>
>
> > > > hello... please help
>
> > > > On Oct 18, 12:31 am, YoeZ <[email protected]> wrote:
> > > > > Hi.
>
> > > > > I have 1 form panel with some textboxes and file upload.
> > > > > the question is, how to get variables from client/form panel in
> > > > > servlet?
> > > > > i created DTO/Pojo object to hold variables in client, but i donk
> > know
> > > > > how to catch in servlet..
>
> > > > > please help
>
> > > > > thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---