Struts:
if you're going to wait until the Container is processing the URL then redirect the different/url to your specific Action
public class HelloWorld extends ActionSupport {
@Actions({
@Action("/different/url"),
@Action("/another/url")
})
public String execute() {
return SUCCESS;
}
}
http://cwiki.apache.org/WW/convention-plugin.html
Apache HTTP Server Redirects:
use JKMount to point the url in this case all references for /servlet/ are directed to ajp13 (AppServer) via
JkMount /*/servlet/ ajp13
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzaie/rzaiemod_jk.htm#jkmount
using mod-rewrite to 'rewrite' the destination URL:
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
#
# /abc/def/.htaccess -- per-dir config file for directory /abc/def
# Remember: /abc/def is the physical path of /xyz, i.e., the server
# has a 'Alias /xyz /abc/def' directive e.g.
#
RewriteEngine On
# let the server know that we were reached via /xyz and not
# via the physical path prefix /abc/def
RewriteBase /xyz
# now the rewriting rules
RewriteRule ^oldstuff\.html$ newstuff.html
In the above example, a request to
/xyz/oldstuff.html
gets correctly rewritten to
the physical file
/abc/def/newstuff.html.
HTH
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> Date: Fri, 5 Jun 2009 08:05:36 -0700
> From: glassfish_at_javadesktop.org
> To: users_at_glassfish.dev.java.net
> Subject: Re: docroot of web app / mod_jk
>
> Hi,
>
> thanks a lot for your reply. I understand this, and it seems, I'm not far from having everything running.
>
> The only thing I want to ask at this point is, where and how to setup a kind of auto-redirection? If a client types in www.my-domain-myapp1.com that it then redirects to www.my-domain-myapp1.com/myapp1
>
> Do you know, if GlassFish V3 solves this issue regarding the context root?
> It would be a nice to have, if the GF would determine automatically by the given virtualhost name where to find the application and to serve it from.
>
> I mean, if you give the url www.aaa.com it starts to serve from /applications/j2ee-modules/myapp1,
> or www.bbb.com it starts to serve from /applications/j2ee-modules/myapp2 without the need, to have the name of the context root appended to the url.
>
> Thanks and Regards,
> Dave.
> [Message sent by forum member 'seagate' (seagate)]
>
> http://forums.java.net/jive/thread.jspa?messageID=349383
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
_________________________________________________________________
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009