Tomcat: POST from one servlet or internal class to another servlet

Discussion in 'Java' started by Sean Clarke, Jan 7, 2004.

  1. Sean Clarke

    Sean Clarke Guest

    Hi,
    I am trying to POST some data from a class within one servlet to another
    servlet (so I can reuse it)...

    More info? an internal class of one of the servlet generates some XML, this
    XML then needs to be HTTP POST'ed to another servlet for processing on the
    same server, what is the best way of achieving it?

    I have looked around and seen some methods that look useful, but the are all
    deprecated (in ServletContext), I could fudge it using paths etc. (but what
    about ports?), I'd like to do it properly.

    Can anyone shed some light?

    Many thanks

    --
    Regards

    Sean Clarke
    -------------------------------------------------
    Linux.... for those whose IQ is greater than 98 !!
     
    Sean Clarke, Jan 7, 2004
    #1
    1. Advertising

  2. Sean Clarke

    Sudsy Guest

    Sean Clarke wrote:
    > Hi,
    > I am trying to POST some data from a class within one servlet to another
    > servlet (so I can reuse it)...
    >
    > More info? an internal class of one of the servlet generates some XML, this
    > XML then needs to be HTTP POST'ed to another servlet for processing on the
    > same server, what is the best way of achieving it?
    >
    > I have looked around and seen some methods that look useful, but the are all
    > deprecated (in ServletContext), I could fudge it using paths etc. (but what
    > about ports?), I'd like to do it properly.
    >
    > Can anyone shed some light?


    I had to do something comparable in order to get JSP output to
    store in a file. You do it just like you would from a client:
    URL#openConnection, setDoOutput( true ), etc. Fairly basic.
     
    Sudsy, Jan 7, 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. circuit_breaker
    Replies:
    2
    Views:
    2,059
    Jack Jia
    Apr 4, 2004
  2. Doug McCann
    Replies:
    1
    Views:
    1,099
    William Brogden
    Aug 5, 2004
  3. loveNUNO
    Replies:
    2
    Views:
    955
    loveNUNO
    Nov 20, 2003
  4. marekw2143
    Replies:
    3
    Views:
    1,386
    marekw2143
    Jul 25, 2009
  5. Robert Cohen
    Replies:
    3
    Views:
    295
    Andrew Durstewitz
    Jul 15, 2003
Loading...

Share This Page