Hi!
I found a tricky way to resolve the asynchonous update. We invoke a servlet dispatcher ( controller ), then a transaction ( model ) and finally before forward to the next jsp ( view) , we check ( in the controller ) whether the transaction need a response.
The code is:
if(strRedirectPage.equals("none"))
response.setStatus(204);
else {
response.setStatus(300);
System.out.println("\n forward to: /" + strRedirectPage);
servletContext.getRequestDispatcher("/" + strRedirectPage).forward(request, response);
}
Check the status related to HttpServletResponse.
http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpServletResponse.html Hope it help and best wishes, A.Perdomo.
----- Original Message -----
From: <
johan.apelgren@skandia.se>
To: <
perdomo@yifan.net>
Sent: Friday, 22 de November de 2002 5:02
Subject: RE: Regarding asynchronous submit question in JavaRanch
Okay,
here's an URL to your question:
https://coderanch.com/forums/ 08601
Regards,
Johan Apelgren
-----Original Message-----
From: A.Perdomo [mailto
erdomo@yifan.net]
Sent: Tuesday, November 19, 2002 20:49
To:
johan.apelgren@skandia.se Subject: Re: Regarding asynchronous submit question in JavaRanch
Hi! Could you send me the question? We had some problems considering
asyncronous update from servlets/jsp and
ejb. But, I can't remember exactly
the question.
Thanks, A.Perdomo.
----- Original Message -----
From: <
johan.apelgren@skandia.se>
To: <
perdomo@yifan.net>
Sent: Tuesday, 19 de November de 2002 13:12
Subject: Regarding asynchronous submit question in JavaRanch
Hi!
Read your question about how to perform an asynchronous update. I need this
feature also. Have you implemented this? If so, could you briefly tell me
how?
Regards
Johan Apelgren
Software Architect
__________________________________________________________
Skandia Liv IT * +46-(0)8-788 49 34
Sveav�gen 44 * +46-(0)70-559 49 34
S-10350 Stockholm *
johan.apelgren@skandia.se http://www.skandia.se/liv