dev@glassfish.java.net

Re: http://localhost:4848/testwebapp returns 200 immediately and 404

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Wed, 08 Apr 2009 20:49:23 -0700

Not sure, Jan.

This seems related to admin-console being deployed at the "root"
context of __asadmin virtual server.

If I understand org.glassfish.api.container.Adapter correctly, only
the requests to host:4848/admin ("/admin" is the context-root of
AdminConsoleAdapter) should result in a call to its service method. So, I
am not quite sure why host:4848/testwebapp be routed to it.

If it is indeed getting routed there, and that's per design,
maybe this adapter should extract the URI and if it does not match "/" or
"/admin", it should return null?

-Kedar

Jan Luehe wrote:
> On 04/ 8/09 11:05 AM, Amy Roh wrote:
>> When I have a test webapp installed, the web container makes sure it
>> does not load the test webapp on __asadmin virtual server (4848)
>> because we treat asadmin virtual server as special and do not load
>> webapps on it.
>>
>> However, after starting the server, the first access to
>> http://localhost:4848/testwebapp always returns 200 immediately and
>> shows the GlassFish Administration Console page (loading the admin
>> console).
>>
>> "GlassFish Administration Console
>>
>> GlassFish Administration Console - Installation in Progress...
>> The browser will refresh automatically, or you may press reload on
>> your browser.
>>
>> Loading of the GlassFish Admin Console is in progress..."
>>
>> After a few seconds later, it then goes to 404 as the testwebapp isn't
>> available on asadmin virtual server - 404 is expected. If you access
>> the page for the 2nd time, you get 404 as expected.
>>
>> It seems that access to 4848 port triggers admin console loading
>> immediately regardless if the resource is available or not. Where is
>> this handled?
>
> I would start looking in
> com/sun/enterprise/v3/admin/adapter/AdminConsoleAdapter#service
>
> Jan
>
>>
>> Thanks,
>> Amy
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>