RE: Can a servlet receive its own request?

2005-05-18 Thread Robert Harper
I don't think so. You will have to have something start the request. Servlets are loaded by the container and are run in response to a request. Once the servlet is running, there is no reason why it could not make an http request for data from another server/servlet and parse the response. Robert

Re: Can a servlet receive its own request?

2005-05-18 Thread Frank W. Zammetti
You *probably* could do this... I'm not 100% sure. What I *AM* sure about though is that this would be pretty ugly :) I'm not sure what you mean by Outside server processes request and responds with POST response (also via https). though... Is the idea that the request to the outside server is

Re: Can a servlet receive its own request?

2005-05-18 Thread Dakota Jack
Requests from from a browser or any other suitable socket based mechanism that sends requests. Servlets and servers don't send requests, although you can have a client in a server that does send requests. You could, I suppose, even build a request making mechanism inside a servlet or as a field

Re: Can a servlet receive its own request?

2005-05-18 Thread Dakota Jack
You might want to look at the COS message classes. On 5/18/05, Michael Mehrle [EMAIL PROTECTED] wrote: Simple question, but it's driving me nuts. I really don't want to get into the whole web service business - all I need is for a servlet to be the recipient of its own request. Or - in other

Re: Can a servlet receive its own request?

2005-05-18 Thread Dakota Jack
Those classes are browsers without a GUI. I do this sort of thing all the time. On 5/18/05, Dakota Jack [EMAIL PROTECTED] wrote: You might want to look at the COS message classes. On 5/18/05, Michael Mehrle [EMAIL PROTECTED] wrote: Simple question, but it's driving me nuts. I really don't

Re: Can a servlet receive its own request?

2005-05-18 Thread Michael Mehrle
: Wednesday, May 18, 2005 10:05 AM Subject: Re: Can a servlet receive its own request? If however, as I suspect might be the case, your servlet is going to actually be awaiting a reply from the outside server, then you should look at using Commons HTTPClient. I'm relatively sure it supports SSL

Re: Can a servlet receive its own request?

2005-05-18 Thread Will Hartung
From: Michael Mehrle [EMAIL PROTECTED] Sent: Wednesday, May 18, 2005 8:58 AM - Servlet issues https request to an outside server (via getServletContext().getRequestDispatcher(https://www.someoutsideserver/) ) - Outside server processes request and responds with POST response (also via

Re: Can a servlet receive its own request?

2005-05-18 Thread Robert r. Sanders
I've done something a little similar w/ the HTTPClient. What I ended up w/ was a Object that was run in the Servlet container but was not itself a servlet. Nit-picking. Anyway, you can do this, you just have to use other libraries (like the Commons HTTPClient). Michael Mehrle wrote: Thanks

Re: Can a servlet receive its own request?

2005-05-18 Thread Frank W. Zammetti
I don't think saying it's silly is really helpful, or even necessarily accurate... If the idea is that the request to the outside server is meant to to asynchronous, i.e., maybe it feeds a queue or something, then it's a reasonable model. It doesn't sound like that's what the OP meant, but if it

Re: Can a servlet receive its own request?

2005-05-18 Thread Michael Mehrle
receive its own request? I've done something a little similar w/ the HTTPClient. What I ended up w/ was a Object that was run in the Servlet container but was not itself a servlet. Nit-picking. Anyway, you can do this, you just have to use other libraries (like the Commons HTTPClient). Michael