-
Servlets
Hi!
My problem is as follows: there shall be sent a form via POST request from
a html or a swf file to a servlet which is located on a server. This servlet
only processes the data of the form in some without sending back anything.
On the client side instead there is always a return page appearing which
says that the requested page contained no data. (????) All I want is no return
at all: the sending source (swf or html) shall only send the data and continue
as if nothing happened. Who could give me soem hint ? I would be grateful
for anything !
Thanks in advance !
-
Re: Servlets
You must return something from a servlet. Once the browser sends a request,
it will wait until it receives a response to this request. In your case,
perhaps you should send the same form that is already visible in the
browser. (Aren't you going to confirm to the user that the data was
received successfully?)
PC2
frankee <masquerade@firemail.de> wrote in message
news:3a6a57db$1@news.devx.com...
>
> Hi!
> My problem is as follows: there shall be sent a form via POST request from
> a html or a swf file to a servlet which is located on a server. This
servlet
> only processes the data of the form in some without sending back anything.
> On the client side instead there is always a return page appearing which
> says that the requested page contained no data. (????) All I want is no
return
> at all: the sending source (swf or html) shall only send the data and
continue
> as if nothing happened. Who could give me soem hint ? I would be grateful
> for anything !
> Thanks in advance !
-
Re: Servlets
HTTP protocol has specific hearders for sending the response. If you send
204 which is no data browser doesn't do anything. In your servlet after
processing your data send 204 response. In HttpServletResponse you have
method named setStatus which takes int as pararmeter. You can write like
this
public void doPost(HttpServletRequest request, HttpServletResponse resp)
throws ServletException, IOException
{
resp.setStatus(HttpServletResponse.SC_NO_CONTENT);
return;
}
"frankee" <masquerade@firemail.de> wrote:
>
>Hi!
>My problem is as follows: there shall be sent a form via POST request from
>a html or a swf file to a servlet which is located on a server. This servlet
>only processes the data of the form in some without sending back anything.
>On the client side instead there is always a return page appearing which
>says that the requested page contained no data. (????) All I want is no
return
>at all: the sending source (swf or html) shall only send the data and continue
>as if nothing happened. Who could give me soem hint ? I would be grateful
>for anything !
>Thanks in advance !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks