tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vernon Smith" <vwu98...@lycos.com>
Subject Re: Performance issues
Date Mon, 19 Jan 2004 19:33:30 GMT

>I have few FAQs and some other docs, which completely
>translated in other language without using resource
>bundle.

How do you approach the implementation: using condition checking on locale in a JSP file,
or using a JSP file per locale?

>
>> It is not a good practice of using a condition
>> statement in JSP for involving locale related 
>> content.
>
>Agree, but this can be easily avoided by using
>parameters in resource bundle (think about
>MessageFormat)
>

Here is another example illustrating a problem/difficulty of using the fmt tag.

The English text on our session timeout page is the following:

You haven't inactivate with this application for more than <%=session.getMaxInactiveInterval()%>
seconds. You will be brought to <a href="<%=request.getContextPath()%>/signon.jsp"
>the sign on page</a> in five seconds. 

If I use resource bundle, I need to chop these two sentences into several sections. A problem
rises right away. No all languages express the same idea in the same order. 

Sure, they can be resolved by using MessageFormat. Firstly, reading an additonal message file,
I/O operation always has impact on performance. There are a few of the implementation methods.
One method is to use scriptlet, having Java code on the JSP file. That is not a good practice.
Using a custom tag is another method. To generate a message in the custom tag body. But, that
requests some extra coding; and it has some degree of performance overhead. Or, using MVC,
to build the message in a controller and send it to the JSP; also extra coding.

In short, the resource bundle approach, in my opinion doesn't cut for more sophisticated usage
scenario.  


____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message