Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » HTTP request after server startup
HTTP request after server startup [message #827281] Fri, 23 March 2012 05:16 Go to next message
Brett Randall is currently offline Brett RandallFriend
Messages: 17
Registered: July 2009
Junior Member
It appears to me like WTP may be sending a (test?) HTTP request to my server after launch is complete. I'm using Tomcat with Eclipse Web Developer Tools version 3.3.1.v201107072200-7O7IFhREMiB5vNoYqf01XHTvUndyz-yx-9kUyXXL
Build id: 20100921193530. My questions are:

* Is it true that WTP sends a test/probe HTTP request to the server after launch?
* Is this documented anywhere?
* Is there any configuration associated with this, can it be disabled?

Thanks
Brett
Re: HTTP request after server startup [message #827413 is a reply to message #827281] Fri, 23 March 2012 09:48 Go to previous messageGo to next message
Bob Sadarka is currently offline Bob SadarkaFriend
Messages: 40
Registered: February 2012
Member
Brett Randall wrote on Fri, 23 March 2012 01:16
It appears to me like WTP may be sending a (test?) HTTP request to my server after launch is complete. I'm using Tomcat with Eclipse Web Developer Tools version 3.3.1.v201107072200-7O7IFhREMiB5vNoYqf01XHTvUndyz-yx-9kUyXXL
Build id: 20100921193530. My questions are:

* Is it true that WTP sends a test/probe HTTP request to the server after launch?
* Is this documented anywhere?
* Is there any configuration associated with this, can it be disabled?

Thanks
Brett



What's your evidence show that WTP is sending a HTTP test request? as far as I know, there is no automatic HTTP request after the server is launched.
Re: HTTP request after server startup [message #827591 is a reply to message #827281] Fri, 23 March 2012 14:37 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 3/23/2012 1:16 AM, Brett Randall wrote:
> It appears to me like WTP may be sending a (test?) HTTP request to my
> server after launch is complete. I'm using Tomcat with Eclipse Web
> Developer Tools version
> 3.3.1.v201107072200-7O7IFhREMiB5vNoYqf01XHTvUndyz-yx-9kUyXXL
> Build id: 20100921193530. My questions are:
>
> * Is it true that WTP sends a test/probe HTTP request to the server
> after launch?
> * Is this documented anywhere?
> * Is there any configuration associated with this, can it be disabled?
>
> Thanks
> Brett

There is a "ping" test that makes a request to the server to see if a
connection can be established. This is how WTP determines if Tomcat has
reached the "Started" state.

Cheers,
Larry
Re: HTTP request after server startup [message #828037 is a reply to message #827413] Sat, 24 March 2012 05:12 Go to previous messageGo to next message
Brett Randall is currently offline Brett RandallFriend
Messages: 17
Registered: July 2009
Junior Member
Apologies, I left those observations out in my original post:

* I have some new-Session logging in my app, which is being triggered on startup from Eclipse with no local or remote web browser connections.
* I can trap the connection with a breakpoint.
* The connection has User-Agent request header Java/1.6.0_30, and netstat on the machine shows it comes from the Eclipse JVM to the Tomcat JVM.

Brett
Re: HTTP request after server startup [message #828062 is a reply to message #827591] Sat, 24 March 2012 06:05 Go to previous messageGo to next message
Brett Randall is currently offline Brett RandallFriend
Messages: 17
Registered: July 2009
Junior Member
Thanks Larry.

My interest here is when testing a webapp, and one is interested in observing behaviour on the very first request to the application, and having control over that request - parameters etc.

I take it that the request is currently a hard-coded GET to http ://<hostname>:<port>/ ? Would it be feasible to open this to end-user configuration? I appreciate that it might be difficult to allow it to be turned-off altogether, as to your point WTP won't know when the server has finished loading. But my tests for Tomcat at least suggest that I can send a request such as GET /foo/bar and expect a 404, and the 404 will only be delivered once the server is fully-started.

So if I was able to configure/customise the ping URL, and perhaps convince WTP to accept a 404 (not sure what it does with status codes now), then this would help with the above requirement. Aside: the current test-request does follow 301 redirects.

Does this have a chance of gaining support as an enhancement request?

Best
Brett
Re: HTTP request after server startup [message #838079 is a reply to message #828062] Fri, 06 April 2012 14:36 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 3/24/2012 2:05 AM, Brett Randall wrote:
> Thanks Larry.
>
> My interest here is when testing a webapp, and one is interested in
> observing behaviour on the very first request to the application, and
> having control over that request - parameters etc.
>
> I take it that the request is currently a hard-coded GET to http
> ://<hostname>:<port>/ ? Would it be feasible to open this to end-user
> configuration? I appreciate that it might be difficult to allow it to be
> turned-off altogether, as to your point WTP won't know when the server
> has finished loading. But my tests for Tomcat at least suggest that I
> can send a request such as GET /foo/bar and expect a 404, and the 404
> will only be delivered once the server is fully-started.
>
> So if I was able to configure/customise the ping URL, and perhaps
> convince WTP to accept a 404 (not sure what it does with status codes
> now), then this would help with the above requirement. Aside: the
> current test-request does follow 301 redirects.
>
> Does this have a chance of gaining support as an enhancement request?
>
> Best
> Brett

Sorry to take so long to respond. I believe the current behavior is to
simply wait for a connection. I don't think it currently checks the
response in any way. You are welcome to enter a Bugzilla enhancement
request. Since my cycles available for WTP these days are pretty
limited, it would very likely need a patch to get the feature added.
Default behavior would be the same as the current behavior.

Cheers,
Larry
Re: HTTP request after server startup [message #846470 is a reply to message #827281] Mon, 16 April 2012 04:54 Go to previous message
Brett Randall is currently offline Brett RandallFriend
Messages: 17
Registered: July 2009
Junior Member
Thanks, logged-as issue 376836 .
Previous Topic:Correct Pattern for contributing Outline Page
Next Topic:Unmarshall Error
Goto Forum:
  


Current Time: Thu Apr 18 02:24:20 GMT 2024

Powered by FUDForum. Page generated in 0.02215 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top