You are using struts so, instead of calling a jsp page for the response, call an action class that sets an appropriate "months" in the request scope and forwards to your jsp page and then just call the correct "months" from request scope in the jsp page.

At 12:47 PM 6/16/2004, [EMAIL PROTECTED] wrote:
My apologies for being unclear...
Yes the Bean has one method called getMonths()...
and in this method I will return the appropriate months based on the
locale.

It is just that getting/passing the Locale to the getMonths() in a JSP is
not really elegant.

JSP code:
And wondering if there are other options... - Glenn mike 16/06/2004 03:25 PM Please respond to "Struts Users Mailing List" To: "Struts Users Mailing List" , [EMAIL PROTECTED] cc: Subject: Re: ServletContextListener At 12:13 PM 6/16/2004, [EMAIL PROTECTED] wrote: >Greetings, > >I have created a ServletContextListener that sets a Bean in the >application scope. >This Bean contains 2 list of Months... and these lists contain >LabelValueBeans. > >My uncertainty is on the best way to get my JSP to use the appropriate >List depending on the locale. > >JSP code: >Option One: Do I pass as a parameter to the months method the Locale? Any >other suggestions would be appreciated. :) - Glenn What "months method"? I assume you mean that your bean has some method called getMonths()? If so, there is clearly a problem making the method getMonths(Locale locale) with a bean. If you have only two locales, then you might want to do the otherwise dumb thing and use two methods which are chosen depending on the locale, e.g.: if(locale == ?) { bean.getMonthLocaleA(); } else { bean.getMonthLocaleB(); } This helpful? Michael --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to