Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Tomcat: POST from one servlet or internal class to another servlet (http://www.velocityreviews.com/forums/t130122-tomcat-post-from-one-servlet-or-internal-class-to-another-servlet.html)

Sean Clarke 01-07-2004 01:14 PM

Tomcat: POST from one servlet or internal class to another servlet
 
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 !!

Sudsy 01-07-2004 02:22 PM

Re: Tomcat: POST from one servlet or internal class to another servlet
 
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.



All times are GMT. The time now is 03:21 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.