struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso" <musa...@gmail.com>
Subject Re: [S2] equivalent to S1's <html:base/>
Date Tue, 12 Aug 2008 20:15:20 GMT
You shouldn't need to use <base> at all. Just use the "url" tag to
build urls to any resource/urls you need, and it will take care of
adding the context to the url for you.

musachy

On 8/12/08, Pierre Thibaudeau <pierre.thibaudeau@gmail.com> wrote:
> The essence of my question rested specifically on the:
> %{somethingOrOther}...
>
> On one system where I run my application, the base path is
> http://www.website.com/
> On the other, it is http://localhost:8080/myapp/
>
> <html:base/> took care of that seamlessly.  I suppose I could use one given
> action as base reference:  <s:url action="home" />,
> but that particular example would force me to rewrite all the relative
> references (because the home action's base path is one hierarchical degree
> removed from the current base path). which is a potential solution, since
> that would be done once and for all (even though it would be tedious to have
> to do it).
>
> Before I embark on this, though, I would love to get people's advice on the
> wisest standard for a base path.  In particular, something which would be
> robust with respect to deployment on several Tomcat setups that have
> different path configurations.
>
> 2008/8/12 Musachy Barroso <musachy@gmail.com>
>
>> yes, that would work, or a lil bit more readable:
>>
>> <s:url id="baseUrl "value="%{somethingOrOther}"/>
>> <base href="${baseUrl}" />
>>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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


Mime
View raw message