> -----Original Message----- > From: Eric Dahnke [mailto:[EMAIL PROTECTED] > Sent: Friday, July 16, 2004 11:13 AM > To: [EMAIL PROTECTED] > Subject: Xtags and rtexprvalue > > > > Hello, > > We're using xtags and need the ability pull in different xml > documents based > on locale. The tld says that the uri attribute accepts rtexprvalue. > > <% String isoLanguage = request.getLocale().getLanguage();%> > > <xtags:parse > uri="/siteCopySource/<%=isoLanguage%>/footerCopyright.xml"/> > > The above jsp code always produces > /siteCopySource//footerCopyright.xml and > not > /siteCopySource/en/footerCopyright.xml as I would hope. > > > Anyone have any ideas? Workaround?
At a guess, the browser is not setting the language, since you're pulling it out of the request. This is why struts uses application.properties as it's default message resource file rather then application-en.properties. You are going to have to do the same, or do something like: <% String isoLanguage = request.getLocale().getLanguage();%> <% isoLanguage = (isoLanguage.size() ==0 ? "en" : isoLanguage) %> or just the siteCopySource/ directory to be your default place for english. Or better yet set the language code in your action class that sets up the page, or a filter so you don't have scriptlets in your jsp pages, and don't have to worry about an empty language code. :) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]