tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugen Kuleshov <>
Subject Re: request for comments about Multilinguage JSP
Date Thu, 17 Feb 2000 13:00:16 GMT
Assaf Arkin wrote:
> I totally agree. And also produce text from within Java code (Java 1.2
> supports that nicely).
> But if you need database or progamattic messages, you still end up
> having one JSP page supporting multiple languages.

  Common. Data related things is a Controller's and Model's business in
Model-View-Controller appllication model. There are one controller for
multiple languages and it is produced data depends from request. Then
View part must visualise this data. I can use servlets, XML/XSLP
transformers, JSP for implementing View. There are not only one way. But
if I use JSP I actually can't implement usefull View part for multiple
languages. There are couple ways:

1. Controller Servlet -> forwarding request to JSP -> view.jsp
   there I must check request in Controller servlet and then change
view.jsp name to view.en.jsp,, etc. It's JSP Model 2. Look
at jGuru's article at februar's

2. view.jsp extends controller servlet class
   there are no way to have multilanguage View. :(
> The point that was raised is whether multiple JSP pages, one for each
> language, makes sense. XSLT solves that. Java code (and JSP beans) solve
> the remaining issues.

  As I said, multiple JSP need's for designer (not for programmer who
implement data processing). Just look at this code (it's just

<!-- index.en.jsp -->
... there are JSP beans initialisation
<img src="promotion_banner_in_english.gif">
<%= jspBean.getVariable() %>

<!-- -->
... there are JSP beans initialisation
<h1>Guten tag!</h1>
<img src="promotion_banner_in_german.gif">
<%= jspBean.getVariable() %>

  Eugen Kuleshov.

View raw message