Servlets


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Servlets

  1. #1
    frankee Guest

    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 !

  2. #2
    Paul Clapham Guest

    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 !




  3. #3
    Ruchi Dhar Guest

    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center