You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michał Letyński <ml...@consol.pl> on 2007/05/29 12:35:50 UTC
s:submit type:image valid path
Hi.
<s:submit type="image" name="submit" src="/buttons/save.gif"/>
In my generated html path looks like this:
<input type="image" alt="save" src="/buttons/save.gif"
When i use html:submit
<input type="image" name="submit" src="/project_name/some/directory/here/buttons/save.gif"
Is it posible to get the real path as it is in html tag ?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: s:submit type:image valid path
Posted by Laurie Harper <la...@holoweb.net>.
Michał Letyński wrote:
> Hi.
> <s:submit type="image" name="submit" src="/buttons/save.gif"/>
>
> In my generated html path looks like this:
>
> <input type="image" alt="save" src="/buttons/save.gif"
>
> When i use html:submit
>
> <input type="image" name="submit"
> src="/project_name/some/directory/here/buttons/save.gif"
>
> Is it posible to get the real path as it is in html tag ?
Use s:url to build the image url, something like (untested):
<s:url id="image" value="/buttons/save.gif"/>
<s:submit type="image" src="%{#image}" ...
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org