Title: RE: Display JSPs based on language/country/variant

You can support this by using tiles. This framework supports a concept called definition that can be localized. It also supports forwarding struts actions to these definitions.

Write an action that forwards the request to a definition corresponding to the requested jsp. If there is no definition just forward to the requested jsp. The limitation is that all your jsps should be accessed through this action. So, instead of using xxx.jsp, you would use /jspForward.do?jsp=type.jsp.

You need to provide definitions for each jsp in the jspForward action as

        <action path="/jspForward"
            type="ForwardJspAction">
          <forward name="xxx.jsp" path="xxxDefinition"/>
      </action>

This is just my understanding and not sure if this is the intended usage, you will get more information at http://www.geocities.com/cedricdumoulin/tiles/.

-Padma


-----Original Message-----
From: Jolly, Gautam [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 25, 2001 5:03 PM
To: '[EMAIL PROTECTED] '
Subject: Display JSPs based on language/country/variant


Requirement - suppose the servlet-container is asked to present 'abc.jsp',
it should serve the very first jsp that meets the following lookup sequence:
abc_<req_language>_<req_country>_<req_variant>.jsp
abc_<req_language>_<req_country>.jsp
abc_<req_language>.jsp
abc_<def_language>_<def_country>_<def_variant>.jsp
abc_<def_language>_<def_country>.jsp
abc_<def_language>.jsp
abc.jsp
 
Is it possible to do it declaratively in tomcat (or any other container), or
is this something that needs to be coded ??
Any help is appreciated.
 
Gautam
 
 

Reply via email to