users@glassfish.java.net

Re: Best practice to automatically forward to another directory/Web app?

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Thu, 08 Mar 2007 10:55:48 -0800

glassfish_at_javadesktop.org wrote On 03/08/07 07:49 AM,:

>I have one Web app (Web app A) set up as the default module at /.
>

When you say this, you mean that you've deployed "Web app A" to "/", but
you
have not actually declared it as the virtual server's
default-web-module, right?

>I want to redirect all requests to / to another Web app (Web app B) at /mywebapp. I could tell the index.html on A to do a simple redirect to /mywebapp, but I actually want to have all kinds of page requests to go to /mywebapp, such as /hello.jsp -> /mywebapp/hello.jsp. Is there any easy way to do that in Glassfish 2?
>
>

Why not declare "Web app B" as the default-web-module of the virtual
server on which it is deployed?
This way, the container will map any requests for "/*" to "/mywebapp/*".

Jan


>dailysun
>[Message sent by forum member 'dailysun' (dailysun)]
>
>http://forums.java.net/jive/thread.jspa?messageID=206868
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>