You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ron1 <ro...@gmx.net> on 2004/07/28 10:45:37 UTC

Re: advice needed: use taglib to render dynamic links to embeded objects

:-)

alu, artifex wrote:
> 
> it works just perfectly! using the <base> tag and having all images use 
> a relative path.
> i haven't figured out any disadvantages yet.
> 
> thanks, great solution!
> art
> 
> alu, artifex wrote:
> 
>>
>> mhm, sounds very promising - if i use pure html for all stylset-based 
>> links they would use the adress base
>> from the base tag, the taglib tags are rendering every url with a 
>> preceeding slash so the base tag would be
>> overriden.
>>
>> is it that simple? i'll give it a try and let you know.
>>
>> regards
>> art
>>
>> ron1 wrote:
>>
>>> thought of using the html:base element?
>>> you can then make all references to images and stylesheets static, 
>>> changing only the base to the current layout base...
>>>
>>> I don't know if using <html:image> or <html:link/rewrite> will 
>>> overrides this, so you may have to use pure html for those...
>>>
>>> Cheers,
>>> Ron
>>>
>>>
>>> alu, artifex wrote:
>>>
>>>> hi list,
>>>>
>>>> i'm working on a struts web application which should give the users 
>>>> the possibility to choose
>>>> the graphical layout of the application (images, sounds or general 
>>>> media objects) from a predefined
>>>> collection of "stylesets". if the user logs in his chosen styleset 
>>>> is read from a database and stored
>>>> in his session. now i only need to know what the best practice is to 
>>>> render the view components
>>>> using the styleset data from the users session.
>>>>
>>>> i don't want to use messageresources because imho it would be too 
>>>> much effort. so i decided to
>>>> put all the images in directories according to the stylesetname:
>>>>
>>>> i.e:
>>>> /stylesets/<stylesetname>/images/0001.png
>>>> ===>            /stylesets/default/images/0001.png
>>>>        /stylesets/minimalistic/images/0001.png
>>>>
>>>> now i'm searching for a way to render those images in my jsp page 
>>>> using the struts taglib.
>>>> can i use <html:rewrite> or even <html:img> to generate those urls? 
>>>> the name of the image is
>>>> static, only the directory name should be dynamic.
>>>>
>>>> thanks in advance
>>>> art
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>


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