Re: Servlte-level Resource Files

2002-09-10 Thread Eddie Bush

James Mitchell wrote:

>It doesn't actually 'suck in' the data.  I've implemented a database call
>for getMessage() based on a few predetermined variables (current module,
>bundleKey, etc).
>
>This way you won't ever have to ask for 'reload' capabilities, because it is
>never 'loaded' to begin with.
>
Hey - that's slick!  Is it performant too?  How did you manage to get 
the current module?  I'll have to dig through your code when I get a 
chance ... sounds quite nice!

>James Mitchell
>Software Engineer\Struts Evangelist
>Struts-Atlanta, the "Open Minded Developer Network"
>http://www.open-tools.org/struts-atlanta
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Servlte-level Resource Files

2002-09-10 Thread Jason Rosen

James,

Sounds like you did some nice work with the DBMessageResources - I can't
wait to use it!

Jason

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 1:04 PM
To: Struts Users Mailing List
Subject: RE: Servlte-level Resource Files


It doesn't actually 'suck in' the data.  I've implemented a database call
for getMessage() based on a few predetermined variables (current module,
bundleKey, etc).

This way you won't ever have to ask for 'reload' capabilities, because it is
never 'loaded' to begin with.


James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta




> -Original Message-
> From: Eddie Bush [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 10, 2002 3:57 PM
> To: Struts Users Mailing List
> Subject: Re: Servlte-level Resource Files
>
>
> Sub-applications may have their own resources.  That's not quite as
> fine-grained as you are talking about, but it's a lot finer-grained than
> it used to be.  Also, James Mitchell has recently completed a
> DBMessageResources which will "suck in" your resources from a DB table
> (you could use basically any JDBC-capable DBMS to store them; that's an
> assumption based off the fact that he's using OJB).
>
> Regards,
>
> Eddie
>
> Billy Ng wrote:
>
> >Hi folks,
> >
> >I don't know if anybody is doing this.  I want to move the
> resoruces to the servlet level which means each servlet has its
> own resources instead of putting the entire app's subtitutes in
> ApplicationResources.properties.  If you have the mechanism like
> this, would you please give me some points for how to do it.
> >
> >Thanks!
> >
> >Billy Ng
> >
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



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

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




RE: Servlte-level Resource Files

2002-09-10 Thread James Mitchell

It doesn't actually 'suck in' the data.  I've implemented a database call
for getMessage() based on a few predetermined variables (current module,
bundleKey, etc).

This way you won't ever have to ask for 'reload' capabilities, because it is
never 'loaded' to begin with.


James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta




> -Original Message-
> From: Eddie Bush [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 10, 2002 3:57 PM
> To: Struts Users Mailing List
> Subject: Re: Servlte-level Resource Files
>
>
> Sub-applications may have their own resources.  That's not quite as
> fine-grained as you are talking about, but it's a lot finer-grained than
> it used to be.  Also, James Mitchell has recently completed a
> DBMessageResources which will "suck in" your resources from a DB table
> (you could use basically any JDBC-capable DBMS to store them; that's an
> assumption based off the fact that he's using OJB).
>
> Regards,
>
> Eddie
>
> Billy Ng wrote:
>
> >Hi folks,
> >
> >I don't know if anybody is doing this.  I want to move the
> resoruces to the servlet level which means each servlet has its
> own resources instead of putting the entire app's subtitutes in
> ApplicationResources.properties.  If you have the mechanism like
> this, would you please give me some points for how to do it.
> >
> >Thanks!
> >
> >Billy Ng
> >
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



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




Re: Servlte-level Resource Files

2002-09-10 Thread Eddie Bush

Sub-applications may have their own resources.  That's not quite as 
fine-grained as you are talking about, but it's a lot finer-grained than 
it used to be.  Also, James Mitchell has recently completed a 
DBMessageResources which will "suck in" your resources from a DB table 
(you could use basically any JDBC-capable DBMS to store them; that's an 
assumption based off the fact that he's using OJB).

Regards,

Eddie

Billy Ng wrote:

>Hi folks,
>
>I don't know if anybody is doing this.  I want to move the resoruces to the servlet 
>level which means each servlet has its own resources instead of putting the entire 
>app's subtitutes in ApplicationResources.properties.  If you have the mechanism like 
>this, would you please give me some points for how to do it.
>
>Thanks!
>
>Billy Ng
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Servlte-level Resource Files

2002-09-10 Thread Galbreath, Mark

I don't know why you would want to do this, but you have a few of options
(and probably more):

1.  declare the wanted resources as instance variable final Strings in each
servlet;

2.  load the resources into a separate java.util.Properties class with
groups of resources available in different returning static methods and have
the servlets call the appropriate method;

3.  put the resources in difference database tables as strings with each
key-value pair separated by some delimiter recognized by default by
java.util.Properties, and have the servlets get them via some type of data
access object which would read the records into a StringBuffer, call
toString(), load the string into a ByteArrayOutputStream that is chained to
a ByteArrayInputStream and call properties.load( inputStream).

Mark

-Original Message-
From: Billy Ng [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 3:15 PM
To: Struts Users Mailing List
Subject: Servlte-level Resource Files


Hi folks,

I don't know if anybody is doing this.  I want to move the resoruces to the
servlet level which means each servlet has its own resources instead of
putting the entire app's subtitutes in ApplicationResources.properties.  If
you have the mechanism like this, would you please give me some points for
how to do it.

Thanks!

Billy Ng

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




Servlte-level Resource Files

2002-09-10 Thread Billy Ng

Hi folks,

I don't know if anybody is doing this.  I want to move the resoruces to the servlet 
level which means each servlet has its own resources instead of putting the entire 
app's subtitutes in ApplicationResources.properties.  If you have the mechanism like 
this, would you please give me some points for how to do it.

Thanks!

Billy Ng