For the first question, you don't want to parse the XML file in a taglib.
It would be much more efficient to store the parsed XML file in the session
and then access it with ${sessiojnAttributeName}.
To your second question, I am assuming that you have message keys in the XML
file. If you are using stripes, you can just use a <s:message> tag.
Otherwise, you can use a <jsp:message> tag. Hope that helps.
-- Rick
On May 29, 2011 2:12 PM, "Alexander Knyazev" <alexk...@gmail.com> wrote:
> Hi everybody!
> May be my question is not directly related to stripes, but answer may be
> useful to all stripes developers.
> Here is the problem:
> I have menu.xml, I parse it when application starts. Then I modify copies
of
> it according to user and store modified xml-menus int session. I use
dom4j,
> but JSTL xml taglibs cannot work with it, there are some strange
exceptions
> occur, but when I use for example
>
> <c:import url="someXML.xml" var="xml"/>
> <x:parse xml="${xml}" varDom="dom"/>
>
> then I can normally work with it, but it doesn't solve my problem,
> because as I said, I have dynamic versions of Xml-menus in each
> session and don't want to parse xml each request.
>
> Any suggestions?
>
> Also one more question, when I loop through xml elements and output
> some attributes, how can I use resource bundle to translate them?
>
> Thanks
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users