struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Al Sutton <al.sut...@alsutton.com>
Subject Re: Changing the way Context Root and Namespaces are rendered in URLS.
Date Tue, 12 Aug 2008 18:13:55 GMT
What you're talking about is an application server issue.  An easy 
solution would be to name your war files/contexts to be your app name 
and then use a namespace of "".

Al.

Pandolf wrote:
> Hi everyone,
>
> I'm using Struts 2 to author Facebook applications and I have a bit of a
> problem. When using the struts "form" or "URL" tags, struts 2 of course
> wants to render URLs as follows:
>
> /<context root>/<namespace>/<action>
>
> Because I'm running applications through Facebook, the urls must be in the
> following format:
>
> /<my facebook app name>/<action>
>
> Is there any way, perhaps in struts.xml, to change the way URLs are rendered
> by struts? 
>
> Really what I need is to drop the context root and include my facebook app
> name. 
>
> The only solution I've come up with is to set the context root of my web app
> to be "/" and then put all actions for my facebook app in a namespace called
> "<my app name>". Unfortunately this clutters my namespace hierarchy and so
> I'm hoping there may be a better solution?
>
> Any thoughts?
>   


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


Mime
View raw message