Hello everybody,
Firstly, I'm a newbie in struts-menu so maybe my question is a
bit silly.
In my current application (made using struts), every jsp page
import another jsp pages that tailor the menu, every option has a image
and a text (link). The jsp pages aren't in the same directory, most of
them are under WEB-INF directory and only the index.jsp is in the
context root of the application. At the beginning I had problem when I
tried to reference the image, for the index.jsp the reference was
img/bullet.jpg, but for one page under WEB-INF/address was
../../img/bullet.jpg.
I resolved the problem using the <html:img> Struts tag in this
way (the next is a menu item)
<tr>
<td><html:img page="/img/flash.gif" width="13"
height="13"></td>
<td><html:link forward="newAddress"><font
color='#FFFFFF'><em><b>New</b></em></font></html:link></td>
</tr>
And this produce an absolute path to the file like this
<tr>
<td><img src="/titulars/img/flash.gif" height="13"
width="13"></td>
<td><a href="/titulars/address/NewAddress.do"><font
color='#FFFFFF'><em><b>New</b></em></font></a></td>
</tr>
Where /titulars is my web context.
Now I'm trying to migrate my menus to struts-menu and I
configured the menu item in this way
<Menu name="MenuPrueba" title="TITLE">
<Item name="indexMenu1" title="OPT_1"
toolTip="...."
forward="newAddress"/>
</Menu>
This works fine for my Struts forward, but I don't know how to resolve
the problem with the image and the diferent reference if the jsp is
under /WEB-INF or in the root context. I'm looking for the same thing
that the forward attribute does. The resultant URI will carry the
Context Path (if any), Module Prefix (if any), Session ID (if any), and
Servlet Mapping (path mapping or extension mapping).
Thank you for your time.
Best regards,
Roque Caballero
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
struts-menu-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/struts-menu-user