I've got a question about the i18n TagLib implementation that I cannot find
any documentation on.  

I have a JSP that makes use of jsp:includes as well as the i18n taglib.
Each of the jsp:included files also use the i18n taglib.  The problem that I
am having is that the i18n taglib instance delcared in the "outer" JSP seems
to get "flushed" after the jsp:included file (which also contains a i18n
taglib) is executed.  The thing I don't get is that, although I'm using the
same taglib in both JSPs, I am calling them by different prefixes, which
should mean different namespaces.  And if the jsp:include page only cares
about the taglibs that have been declared within it's code, why is it
flushing out it's parent's taglib declarations?

Here's the code for the outer page (you should be able to use any taglib)
----------------------------------------------------------------------------
---------------------------------------------------------------------
####################### OUTER PAGE ############################
##
## The 2nd gettingstarted.headertext instance does not display unless I
remove the jsp:include
##
###################################################
<%@ taglib uri="/WEB-INF/i18n.tld" prefix="i18n" %>
<i18n:bundle baseName="macroplay.properties.i18n.cc.page.help.help_nav"
             localeAttribute="userLocale"/>

This key displays: <i18n:message key="gettingstarted.headertext"/>

<jsp:include page="/cc/page/help/help_nav.jsp" flush="true"/>

This key does not: <i18n:message key="gettingstarted.headertext"/>

####################### /OUTER PAGE ############################



Here's the code for the jsp:include page
----------------------------------------------------------------------------
---------------------------------------------------------------------
####################### JSP:INCLUDE PAGE ############################
## The 2nd gettingstarted.headertext instance does not display unless I
remove the jsp:include
###################################################
<%@ taglib uri="/WEB-INF/i18n.tld" prefix="testComponent" %>
<i18n:bundle baseName="macroplay.properties.i18n.cc.page.help.testComponent"
             localeAttribute="userLocale"/>

Here's some text: <testComponent:message key="text"/>

####################### /JSP:INCLUDE PAGE ############################
----------------------------------------------------------------------------
---------------------------------------------------------------------


Platform: WLS 5.1, SP9
OS: Windows NT, Windows 2000 and/or RedHat Linux

Any explanation is much appreciated.

thanks,
cfraser
----
C h r i s t o p h e r  A .  F r a s e r
Director, Technology - macroplay.com
[EMAIL PROTECTED]

http://www.macroplay.com

Reply via email to