Discussions

Web tier: servlets, JSP, Web frameworks: Dynamic page directives.. IS IT POSSIBLE??

  1. Dynamic page directives.. IS IT POSSIBLE?? (2 messages)

    Hi ..

    I'm writing a JSP/Servlet/EJB app where I18N is needed.
    To specify the appropriate character sets in your JSPs you need to have:

    <%@ page contentType="text/html; charset=ISO-8859-5" %>

    where you specify the charset.
    Now, how can I make this dynamc?? I want the charset to change when the user logs in and chooses a default languge from a combo box.

    I tried to write a custom tag, but I caanot reference the tag INSIDE the page directive.

    Any ideas???

    zeron aintablian
  2. See Eval tag on http://www.servletsuite.com/jsp.htm
    You may execute (evaluate) any JSP code from String
  3. can't you write a JSP tag that sets the locale using the HttpServletResponse object?

    just an idea...

    there's a setLocale(java.util.Locale locale) method in HttpServletResponse...