I am not sure about several resource files. I have try to create other servlet and 
"match" it to
other file, initialize this file. But then what? It will stay in the memory and do 
nothing? Then
how about reload function? You need rewrite it too (run super.reload(), destroy your 
local info,
init your local info). It is not difficult if one file. For second one and new 
servlet????

Thanks,
Maya

Ken Beyer wrote:

> I'm also seeing that it's way too much now (a message resource per jsp).
>
> I found the following to be helpful...
> 
>http://jakarta.apache.org/struts/api/org/apache/struts/util/package-summary.html#doc.Messages
>
> I'm thinking of at least starting off with separating the images from text,
> and maybe breaking the text down into packages later on.  Is it correct that
> I should override ActionServlet, and pass in additional init-param's similar
> to the "application" one?, i.e.
>
>     <init-param>
>         <param-name>imageresource</param-name>
>         <param-value>com.mycompany.mypkg.ImageResources</param-value>
>     </init-param>
>
> and then make sure that I load it (by overriding init()) and calling a
> private void initImageResources() + super init(), and similarly for the destroy.
>
> Also, I need to set locale to true in the web.xml (Action servlet section), and
> make sure I use "getMessage(Locale, String, ...)" pretty faithfully, right?
> Otherwise I'd always get the application's default language.
>
> Thx-
> Ken
>
> Maya Muchnik wrote:
>
> > To have a separate property file for each JSP - it is too much. All the rest - a 
>good
> > idea.
> > I am creating my servlet that extends ActionServlet and does two things: expending
> > destroy and init functions. The reason - I have to initialize some paramaters that 
>I
> > will use in xxxAction through application attributes.
> >
> > Other thing you need to remember that all xxx_xx.properties files do not need to 
>have
> > all messages that in the xxx.properties file. Only what is different.
> >
> > Maya
> >

Reply via email to