You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by js...@epicedge.com on 2001/04/27 19:53:27 UTC

i18n...

I have a couple of questions.

I had a JSP in which I had approximately 40 bean:message tags for i18n.  
This page was taking 15 seconds to load.  If I had two requests for the 
page at the same time it would take 45 to 60 seconds.  Obviously this is 
not acceptable.  When I replaced the bean:message tags with the text, 
the response time goes to a respectable 3 to 5 seconds with multiple 
hits.  Therefore, I have to come up with another method of 
internationalization.

I am new to this so I am looking for suggestions.  I have to support 4 
languages.  My current thought is to detect the browser's settings and 
forward the request to the appropriate JSP that is specific to the 
language settings.  I'm not sure exactly where this should be done.  I 
would like it to be dynamic so that I can reuse FORM and ACTION beans 
for each related page.

Again, any suggestions would be appreciated.

------------------
Jason Smith
jsmith@EpicEdge.com


Re: i18n...

Posted by Cedric Dumoulin <ce...@lifl.fr>.

  If you look for another method of internationalization, you can check
Components framework :
  it provides basic i18n capabilities.

  The Components framework allows to write 'internationalized' Components (a
component = a jsp page). The idea is to have different versions of a
component (a jsp page), each version suited for a particular language. When
you include the component, system insert the appropriate version according
to locale and language. If no component is defined for a particular locale,
component for default locale is inserted. This behave like the java
localized properties, but for components.
  This mechanism was proposed as a solution for i18n pages containing lot of
text that don't suit well in a properties file. It is a complement to Struts
properties file mechanism :

   * use components i18n when you have a big page or component to translate,
     or when you need different layouts according to locale
   * use "Struts" properties file when you have just few sentences to
     translate.

In your case, you can use Components mechanism for your slow pages, and
still use Struts properties file for others pages.

    Cedric

Components sites :
  http://www.lifl.fr/~dumoulin/components/
  (mirror) : http://www.geocities.com/cedricdumoulin/components/


jsmith@epicedge.com wrote:

> I have a couple of questions.
>
> I had a JSP in which I had approximately 40 bean:message tags for i18n.
> This page was taking 15 seconds to load.  If I had two requests for the
> page at the same time it would take 45 to 60 seconds.  Obviously this is
> not acceptable.  When I replaced the bean:message tags with the text,
> the response time goes to a respectable 3 to 5 seconds with multiple
> hits.  Therefore, I have to come up with another method of
> internationalization.
>
> I am new to this so I am looking for suggestions.  I have to support 4
> languages.  My current thought is to detect the browser's settings and
> forward the request to the appropriate JSP that is specific to the
> language settings.  I'm not sure exactly where this should be done.  I
> would like it to be dynamic so that I can reuse FORM and ACTION beans
> for each related page.
>
> Again, any suggestions would be appreciated.
>
> ------------------
> Jason Smith
> jsmith@EpicEdge.com


Re: i18n...

Posted by Paul Tindall <pt...@houston.rr.com>.
Jason,

I looked through the email trail for this and didn't see any mention of
which servlet engine you are using.  Outside of checking your environment
and configuration as Martin suggests (which is probably the root cause), you
may want to take a look Resin (www.caucho.com).  It is super-fast and very
clean.  I've had many strange problems (non-Struts) disappear after
switching to it.

Regards,

Paul

----- Original Message -----
From: "Martin Cooper" <ma...@tumbleweed.com>
To: <st...@jakarta.apache.org>
Sent: Wednesday, May 02, 2001 10:46 PM
Subject: Re: i18n...


> This is very strange. We have some pages that have more than twice as many
> <bean:message> instances as you mention. I just did a quick test on our
> latest build, and it's really very fast. Certainly nothing that needs any
> performance enhancement.
>
> You might want to poke around in your environment and see if there's
> something going on in the container or the JVM that's causing the problem.
I
> don't think the issue is the <bean:message> tag itself.
>
> --
> Martin Cooper
>
>
> ----- Original Message -----
> From: <js...@epicedge.com>
> To: <st...@jakarta.apache.org>
> Sent: Friday, April 27, 2001 10:53 AM
> Subject: i18n...
>
>
> > I have a couple of questions.
> >
> > I had a JSP in which I had approximately 40 bean:message tags for i18n.
> > This page was taking 15 seconds to load.  If I had two requests for the
> > page at the same time it would take 45 to 60 seconds.  Obviously this is
> > not acceptable.  When I replaced the bean:message tags with the text,
> > the response time goes to a respectable 3 to 5 seconds with multiple
> > hits.  Therefore, I have to come up with another method of
> > internationalization.
> >
> > I am new to this so I am looking for suggestions.  I have to support 4
> > languages.  My current thought is to detect the browser's settings and
> > forward the request to the appropriate JSP that is specific to the
> > language settings.  I'm not sure exactly where this should be done.  I
> > would like it to be dynamic so that I can reuse FORM and ACTION beans
> > for each related page.
> >
> > Again, any suggestions would be appreciated.
> >
> > ------------------
> > Jason Smith
> > jsmith@EpicEdge.com
> >
>
>
>


Re: i18n...

Posted by Martin Cooper <ma...@tumbleweed.com>.
This is very strange. We have some pages that have more than twice as many
<bean:message> instances as you mention. I just did a quick test on our
latest build, and it's really very fast. Certainly nothing that needs any
performance enhancement.

You might want to poke around in your environment and see if there's
something going on in the container or the JVM that's causing the problem. I
don't think the issue is the <bean:message> tag itself.

--
Martin Cooper


----- Original Message -----
From: <js...@epicedge.com>
To: <st...@jakarta.apache.org>
Sent: Friday, April 27, 2001 10:53 AM
Subject: i18n...


> I have a couple of questions.
>
> I had a JSP in which I had approximately 40 bean:message tags for i18n.
> This page was taking 15 seconds to load.  If I had two requests for the
> page at the same time it would take 45 to 60 seconds.  Obviously this is
> not acceptable.  When I replaced the bean:message tags with the text,
> the response time goes to a respectable 3 to 5 seconds with multiple
> hits.  Therefore, I have to come up with another method of
> internationalization.
>
> I am new to this so I am looking for suggestions.  I have to support 4
> languages.  My current thought is to detect the browser's settings and
> forward the request to the appropriate JSP that is specific to the
> language settings.  I'm not sure exactly where this should be done.  I
> would like it to be dynamic so that I can reuse FORM and ACTION beans
> for each related page.
>
> Again, any suggestions would be appreciated.
>
> ------------------
> Jason Smith
> jsmith@EpicEdge.com
>