On 03/12/2004 12:23 PM Keith Hyland wrote:
I'm looking at internationalizing a series of pages, which cover different character sets.

I've been planning to store the content type value in a properties files along wit hthe rest of the internationalized text, but I've run into some problems.

I have been experiementing with

<jsp:directive.page contentType="..." />
<@ page contentType="..." />

but none of them seem to be able to take a variable value for contentType,

e.g.
<c:set>
    <fmt:message key="contentType"/>
</c:set>
<%@ page contentType="${pageContentType}" %>

or

<jsp:directive.page contentType="<jsp:expression>contentType</jsp:expression>" />

Neither of them support EL, or sxpressions in the statement.

Are there any plans to make these tags EL enabled?

In the meantime I guess I'll have to look at filters.

If you are using TC5, there is more flexibility for configuring the content-type and character-set, especially with JSTL standard taglibs.


Regarding dynamic variables for JSP directives, it doesn't sound very plausible.

You can map content-type to locales in your web.xml, and you can set it with <fmt:> tags, so I would say you'd be better off examining these methods first.

I guess it also depends on how you are going to set the locale in the first place - is it a user choice or browser-setting dependent, or an application definition?

Adam
--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to