Hi All,
I've a question about usage of the tag "<i18n:bundle baseName= ..."
I'm using model 2 architecture, i.e. request comes to servlet, servlet does
the process and creates the bean and forwards it to JSP. Finally, jsp sends
the response to the client.
Also, I'm using the i18n tags in the jsp. I'm doing something like this:
<%@ page language="java" %>
<jsp:useBean id="controller" scope="request"
class="apps.test.LoginController" ></jsp:useBean>
<%@ taglib uri="http://jakarta.apache.org/taglibs" prefix="i18n" %>
<i18n:bundle baseName="apps.test.text.resources.LoginRB" locale="<%=
controller.getLocale() %>" />
<% response.setContentType("text/html;charset=" + controller.getCharset());
%>
I went through the i18n taglib documentation and found that tag
"<i18n:bundle baseName=.." sets the content type based on the locale we pass
as argument.
But, I don't want that to happen.
I want to set the content-type that is returned by my databean. So, am
calling the response.setContentType() right after the tag "<i18n:bundle
baseName=...".
My question, is that OK... Meaning, does the response.setContentType()
method overwrite the content-type set by the tag "<i18n:bundle
baseName=...".
Thanks in advance...
-Ratnakar