helllo,
can u please tell me how implement servlet in gwt project
My aim is:-
i want clients machines username.
but its returning server's userid.
now i am trying to implement servlet.
SO tell me how write code? how to call and execute


On Friday, September 2, 2011 1:22:42 PM UTC+5:30, vaibhav gwt wrote:
>
> Thanks for reply 
> In your provided code , you are calling TargetServlet from client. 
> I  want to call targetServlet from BasicServiceImpl(GWT Servlet). 
>
>
>
> On Sep 1, 6:41 am, Abduxkur Ablimit <sugar...@yahoo.com> wrote: 
> > you can call a servlet from client side like this (may be you want put 
> these code into AsyncCallback method body, from gwt servlet): 
> > 
> >         btn.addClickHandler(new ClickHandler(){ 
> >             public void onClick(ClickEvent event) { 
> >                final String link = GWT.getModuleBaseURL() + 
> > 
> "someServlet?year="+year.getValue(year.getSelectedIndex())+"&month="+month.getValue(month.getSelectedIndex());
>  
>
> >                 RequestBuilder builder = new 
> RequestBuilder(RequestBuilder.GET,link); 
> >                 try { 
> >                 
> >      builder.sendRequest(null, new RequestCallback() { 
> >                         @Override 
> >                         public void onResponseReceived(Request request, 
> >                                 Response response) { 
> >                             if (response.getStatusCode() == 200) { 
> >                                // response.getText(); 
> >                              } else if (response.getStatusCode() == 404) 
> { 
> >                                 Window.alert("Service not available."); 
> >                             } 
> >                         
> >  } 
> >                         @Override 
> >                         public void onError(Request request, Throwable 
> exception) { 
> >                             Window.alert("Service not available."); 
> >                         } 
> >                     }); 
> >         
> >          } catch (RequestException re) { 
> >                     GWT.log("Error", re); 
> >                 } 
> >             } 
> >         }); 
> > 
> > ________________________________ 
> > From: vaibhav bhalke <bhalke.vaib...@gmail.com> 
> > To: google-we...@googlegroups.com <javascript:> 
> > Sent: Wednesday, August 31, 2011 4:30 PM 
> > Subject: GWT : How to call SERVLET FROM GWT_SERVLET and How to return 
> value from target servlet to source servlet? 
> > 
> > I have 2 servlets. 
> > One In GWT module i.e BasicServiceImpl extends RemoteServiceServlet 
> implements BasicMassUpdateService 
> > and other servlet TargetServlet extends HttpServlet in TargetServlet in 
> diff module/package com.comp.server.servlets 
> > I am using GWT-RPC in my gwt module. I want to write one method 
> > getRecordList() in BasicServiceImpl which returns list of record on 
> > client side.(right now I am sending dummy data in record list) 
> > In other servlet i.e TargetServlet RecordList formed from database 
> value. 
> > Use case: 
> > When we call getRecordList() method using rpc then I want to call 
> > SERVLET : TargetServlet to get recordlist, TargetServlet will return 
> > recordlist to getRecordList of Gwt_servlet and finally getRecordList() 
> > returns recordlist on client side 
> > 1: How to call other servlet(TargetServlet) from GWT_SERVLET i.e 
> BasicServiceImpl 
> > 2: How to send recordlist from TargetServlet to getRecordList() of 
> BasicServiceImpl(GWT SERVLET) 
> > Any help or guidance in this matter would be appreciated 
> > 
> > -- 
> > Best Regards, 
> > Vaibhav 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Google Web Toolkit" group. 
> > To post to this group, send email to 
> > google-we...@googlegroups.com<javascript:>. 
>
> > To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com <javascript:>. 
> > For more options, visit this group athttp://
> groups.google.com/group/google-web-toolkit?hl=en.

-- 
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+unsubscr...@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.

Reply via email to