Hi Bowie, Im actually interested in how to read the error code or exception when setting an url in a frame object. When the servlet call goes correct correct, the browser shows a file download window. If the servlet call fails, the frontend needs to be aware of this somehow.
Do I need somehow read the content of the frame object? If so, how can I achieve this? There is no AsyncCallback object since I just set an url of a frame. Thanks. Albert On 12 March 2012 15:29, dodo dard <[email protected]> wrote: > Helo, > > Well it is a delicate subject to handle. There is no default method to > deal with the error result. > A way to approach this, is by testing the servlet response. The > fastest is to make sure that there is no "ERROR CODE" (404, 503 ...) > in resultHtml. > But this make your application depends on your servlet container > implementation. If you can rewritte your ServletReponse, then you can > decide your own error code and how to handle it. > > Hope this help you, > Bowie > ==================== > http://www.html5bydemo.com/ > > On Mar 12, 11:19 am, Appien <[email protected]> wrote: > > Hi guys, > > > > In my GWT application the user can download a PDF file by using a > servlet. > > To start the download I create in GWT a hidden Frame Object which calls > the > > servlet. The happy workflow path works great however I want give the user > > some feedback when generating the PDF file fails. Since the result of the > > servlet call gets ‘printed’ in the Frame object, the printed exception > also > > appears in the hidden Frame and not e.g. by a popup for the user. > > > > Unfortunately I don’t see a way so the servlet throws directly exceptions > > to the AsyncCallback of GWT. > > > > I’ve the following pseudo code for handling my exception. > > > > My questions are the following: > > - Is this the right way to do exception handling for servlet exceptions > in > > GWT? > > - If not, which approach should I use for this? > > > > Many thanks for all the help! > > > > Albert > > -- > 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. > > -- 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.
