struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Wannemacher <w...@wantii.com>
Subject Re: domains and aplication name mapping
Date Mon, 05 Oct 2009 13:10:08 GMT
I'm not sure you're aware, but IIRC, if your application is named
'ROOT' (i.e. ROOT.war), then the application server will serve it up
without appending the appcontext name onto the URL. After that, I
agree with Nils, it is a reverse proxy issue. You would probably get
more feedback on the user@struts.apache.org mailing list, since many
users have probably dealt with this very issue.

-Wes

On Mon, Oct 5, 2009 at 5:49 AM, Nicola de Saint-Aubert
<nsaintaubert@lavanguardia.es> wrote:
> Hi,
>
>
>
> Basically, struts 2 considers url as the following:
>
> http://domain/appContextName/packageNameSpace/actionOrMethodName.
>
>
>
> Now consider the following scheme:
>
> Internet  -> /public name spacing/ -> Apache -> /private name spacing/ ->
> Jboss.
>
> In your public namespacing , you may want your "domain/appContexName" part
> of the url be only some www.pepe.com <http://www.pepe.com/> , while in your
> private one /pepe:8080/pepeWeb.
>
> Thus (for SEO reasons .)  you might need a different "domain/appContextName"
> in your public and private namespacing which implies defining a mapping on
> them that allows the UrlHelper to construct public nameSpacing while the
> Controler still working on the private Namespacing.
>
>
>
> As what we know, Struts 2 does allow a lot of url assembling tecnics, but
> does not address with the "adomain/appContextName" part of the url.
>
> But we may consider implementing a simple patch on that point:
>
> -          the entry point would be the UrlHelper, change the line getting
> the ContextName for a mapping module that transform private name spacing to
> private name spacing, so that all tags (form, urlassembler.) will construct
> the right public url.
>
> -          In the proper struts.xml (or in another xml), configuring the
> mapping (something like <appContext private="pepeWeb" public=www.pepe.com
> <http://www.pepe.com/> />).
>
>
>
> We would be gratefull to tell us if there already exists a legal solution to
> our problem or if we do have to implement the patch.
>
>
>
> Best regards,
>
>
>
> Nicolas
>
>
>
>
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message