Fill doGet, doPost in servlet

Discussion in 'Java' started by bigbinc, Feb 26, 2004.

  1. bigbinc

    bigbinc Guest

    Is it possible to run doGet and doPost from an application and
    basically is it possible to call doGet, doPost directly... it seems
    like the only thing that is needed is filling in the method
    arguements..


    For example fill in request and response?

    public void doGet (HttpServletRequest request, HttpServletResponse
    response)
    throws ServletException, IOException {

    doPost(request, response);

    } // end of the function
    bigbinc, Feb 26, 2004
    #1
    1. Advertising

  2. bigbinc

    Oscar kind Guest

    bigbinc <> wrote:
    > Is it possible to run doGet and doPost from an application and
    > basically is it possible to call doGet, doPost directly... it seems
    > like the only thing that is needed is filling in the method
    > arguements..
    >
    > For example fill in request and response?
    >
    > public void doGet (HttpServletRequest request, HttpServletResponse
    > response)
    > throws ServletException, IOException {
    >
    > doPost(request, response);
    >
    > } // end of the function


    Yes you can, provided you implement the interfaces HttpServletRequest and
    HttpServletResponse. The question I'd ask is why I would want to emulate
    a webserver, because it is so cumbersome. Are you sure this is the way to
    go?


    Oscar

    --
    Oscar Kind http://home.hccnet.nl/okind/
    Java/J2EE Developer email available on website
    Oscar kind, Feb 26, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fred
    Replies:
    2
    Views:
    4,369
  2. Ryan Gaffuri
    Replies:
    4
    Views:
    3,912
    Sudsy
    Sep 30, 2004
  3. Jeff Kish

    doget dopost handler

    Jeff Kish, Feb 13, 2007, in forum: Java
    Replies:
    0
    Views:
    332
    Jeff Kish
    Feb 13, 2007
  4. =?utf-8?B?6L65IOaxnw==?=

    [Servlet] how to send a stream to servlet doPost

    =?utf-8?B?6L65IOaxnw==?=, Sep 14, 2007, in forum: Java
    Replies:
    3
    Views:
    642
    GArlington
    Sep 14, 2007
  5. Replies:
    2
    Views:
    407
    Chris ( Val )
    Nov 13, 2007
Loading...

Share This Page