applicationresource.properties

2002-03-19 Thread Steven Dahlin

How do I know if an applicationresource.properties file can be read?  I have 
an applicationresource.properties file present in the WEB-INF/classes 
directory, but the messages are not being found.  Someone mentioned that the 
log files would have a clue but I cannot find any indications in any of the 
log files that the file was found.  What "specifically" should I be seeing.

Thanks,
Steve



_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




ApplicationResource.properties

2002-01-09 Thread Kris Thompson

Are there any plans to move the ApplicationResource.properties to be xml 
based?  I think log4j has the option to be .properties or xml which is a 
very nice.

Kris


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




Re: ApplicationResource.properties

2003-09-24 Thread Martin Gainty
I have a new error

org.apache.jasper.JasperException: /BookView.jsp(5,0) Unable to load class
html

Here is Bookview.jsp
<%@ page language="java" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"; prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"; prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"; prefix="logic"
%>





 




 Book View



Any ideas what would cause html class load failure?

Thanks,
-M

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



RE: ApplicationResource.properties

2003-09-24 Thread Chen, Gin
This has to do with your web.xml.
Make sure that you have all the taglibs imported and defined.
-Tim

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 24, 2003 5:57 PM
To: Struts Users Mailing List
Subject: Re: ApplicationResource.properties


I have a new error

org.apache.jasper.JasperException: /BookView.jsp(5,0) Unable to load class
html

Here is Bookview.jsp
<%@ page language="java" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"; prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"; prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"; prefix="logic"
%>





 




 Book View



Any ideas what would cause html class load failure?

Thanks,
-M

-
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]



RE: applicationresource.properties

2002-03-19 Thread lindsay . hamoudi

I'm seeing:

2002-03-18 16:28:09 - /struts-SACT: action: init
2002-03-18 16:28:09 - /struts-SACT: action: Loading application resources
from resource ApplicationResources
2002-03-18 16:28:09 - /struts-SACT: action: Initializing configuration from
resource path /WEB-INF/struts-config.xml
2002-03-18 16:28:11 - /struts-SACT: action: Process servletName=action,
urlPattern=*.do
2002-03-18 16:28:11 - /struts-SACT: action: Mapping for servlet 'action' =
'*.do'

I don't know if the log file says this whether it is successful or not in
loading the file.

You may need to "up" the debug level from within your web.xml file.  See
below... (this will increase the amount of detail in your server's log file)


   
   
  action
  org.apache.struts.action.ActionServlet
  
 application
 ApplicationResources
  
  
 config
 /WEB-INF/struts-config.xml
  
  
 debug
 6
  
 Bla bla bla

Also check that you are referencing the file by it's correct name.  I
noticed you said "applicationresource.properties" in your message.
Therefore if it's stored in the /classes directory (not a subdirectory),
then the relevant web.xml excerpt should be


 application
 applicationresource


If this fails, then there may be an error in the file.

Hope this helps,

Lindsay

 -Original Message-
From:   Steven Dahlin [mailto:[EMAIL PROTECTED]] 
Sent:   19 March 2002 15:52
To: [EMAIL PROTECTED]
Subject:applicationresource.properties

How do I know if an applicationresource.properties file can be read?  I have

an applicationresource.properties file present in the WEB-INF/classes 
directory, but the messages are not being found.  Someone mentioned that the

log files would have a clue but I cannot find any indications in any of the 
log files that the file was found.  What "specifically" should I be seeing.

Thanks,
Steve



_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
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]>




Splitting ApplicationResource.properties

2002-01-21 Thread Becky Moyer

Hello all...
   I can't seem to find the answer to my question in the archive, the 
javadoc, or the source, so I was hoping someone could figure this one out.

   I have a class extending ActionServlet to read struts-config.xml files 
from places other then WEB-INF/ in order to split apart the different 
aspects of my webapp.  I would also like to be able to split up my 
resource.properties files.  I can find these files in my ActionServlet, but 
I can't figure out how to read them in so that they will be available for 
 tags.  I've tried doing a props.load and a 
System.setProperties(props), and after I did that I saw that Struts stores 
those messages using its own Properties object...I'm just not sure how I can 
get the new properties in without losing the old properties, since it looks 
like I have to create a new MessageResource object in the ActionServlet to 
add in a new properties file.

  I'm going to keep staring at the code and the javadoc, but does someone 
have any ideas as to what I need to do with the properties to make them 
available to bean:message??   I feel like I am missing something staring me 
in the face!


   Thanks in advance,
   Becky

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




ApplicationResource.properties causing JasperException

2002-08-14 Thread Morycz, Felicia V

1.  I made changes in my ApplicationResource.properties file that caused a
JasperException stating that is could not find a property.  I restored from
my backup and the problem is fixed, but can you share some known pitfalls in
modifying a property file?  I seem to remember something about an extra line
or lack thereof at the bottom of the file?

2.  I searched the archives, because I've seen this problem discussed here
before.  Is there any discussions about improving the searching capabilities
of the archive so that we do not ask the same questions repeatedly?

Thanks, Felicia Morycz



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




Re: Splitting ApplicationResource.properties

2002-01-21 Thread Ted Husted

There's some recent work going on in the nightly build that might
interest you. 

http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg04354.html


Becky Moyer wrote:
> 
> Hello all...
>I can't seem to find the answer to my question in the archive, the
> javadoc, or the source, so I was hoping someone could figure this one out.
> 
>I have a class extending ActionServlet to read struts-config.xml files
> from places other then WEB-INF/ in order to split apart the different
> aspects of my webapp.  I would also like to be able to split up my
> resource.properties files.  I can find these files in my ActionServlet, but
> I can't figure out how to read them in so that they will be available for
>  tags.  I've tried doing a props.load and a
> System.setProperties(props), and after I did that I saw that Struts stores
> those messages using its own Properties object...I'm just not sure how I can
> get the new properties in without losing the old properties, since it looks
> like I have to create a new MessageResource object in the ActionServlet to
> add in a new properties file.
> 
>   I'm going to keep staring at the code and the javadoc, but does someone
> have any ideas as to what I need to do with the properties to make them
> available to bean:message??   I feel like I am missing something staring me
> in the face!
> 
>Thanks in advance,
>Becky
> 
> _
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




Re: Splitting ApplicationResource.properties

2002-01-21 Thread Becky Moyer

So, from Martin Cooper's post at
http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg04548.html, I 
gather that while there is an "apparent assumption that each application has 
a single source of message resources" "in both Struts 1.0.x and the latest 
code", I can infer there is a way around it??

The new "subapp" concept looks pretty cool.  But does that mean you can 
install subapps on the fly, while your servlet engine is running?

  My ActionServlet has a set of pages that allow developers to upload an 
almost-war file (that has a struts-config.xml but no web.xml file) and it's 
read in and available immediately, all classes are loaded in... things are 
put in set places.  This allows new sections of the site to be added without 
reloading tomcat.

  Anyway, back to the topic at hand, I am still confused.  With Struts 1.0, 
can I add new messages without restarting (as I can add ActionMappings, etc, 
without restarting)?  I have been trying to look at the Struts code to see 
how it's done now, and I am just not seeing a way I can add my messages.

  Thanks for your reply,
   Becky

Original Message Follows
From: Ted Husted <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Splitting ApplicationResource.properties
Date: Mon, 21 Jan 2002 15:01:21 -0500

There's some recent work going on in the nightly build that might
interest you.

http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg04354.html


Becky Moyer wrote:
 >
 > Hello all...
 >I can't seem to find the answer to my question in the archive, the
 > javadoc, or the source, so I was hoping someone could figure this one 
out.
 >
 >I have a class extending ActionServlet to read struts-config.xml files
 > from places other then WEB-INF/ in order to split apart the different
 > aspects of my webapp.  I would also like to be able to split up my
 > resource.properties files.  I can find these files in my ActionServlet, 
but
 > I can't figure out how to read them in so that they will be available for
 >  tags.  I've tried doing a props.load and a
 > System.setProperties(props), and after I did that I saw that Struts 
stores
 > those messages using its own Properties object...I'm just not sure how I 
can
 > get the new properties in without losing the old properties, since it 
looks
 > like I have to create a new MessageResource object in the ActionServlet 
to
 > add in a new properties file.
 >
 >   I'm going to keep staring at the code and the javadoc, but does someone
 > have any ideas as to what I need to do with the properties to make them
 > available to bean:message??   I feel like I am missing something staring 
me
 > in the face!
 >
 >Thanks in advance,
 >Becky
 >
 > _
 > Send and receive Hotmail on your mobile device: http://mobile.msn.com
 >
 > --
 > 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]>



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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




RE: Splitting ApplicationResource.properties

2002-01-21 Thread Martin, Margaret

Becky,
Attached is an extension of ActionServlet that I wrote which loads multiple
resource bundles based on a properties file that specifies everything to
load. This may not be exactly what you want, but it might give you some good
ideas -

Hope it helps -
Margaret



-Original Message-
From: Becky Moyer [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 3:30 PM
To: [EMAIL PROTECTED]
Subject: Re: Splitting ApplicationResource.properties


So, from Martin Cooper's post at
http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg04548.html, I

gather that while there is an "apparent assumption that each application has

a single source of message resources" "in both Struts 1.0.x and the latest 
code", I can infer there is a way around it??

The new "subapp" concept looks pretty cool.  But does that mean you can 
install subapps on the fly, while your servlet engine is running?

  My ActionServlet has a set of pages that allow developers to upload an 
almost-war file (that has a struts-config.xml but no web.xml file) and it's 
read in and available immediately, all classes are loaded in... things are 
put in set places.  This allows new sections of the site to be added without

reloading tomcat.

  Anyway, back to the topic at hand, I am still confused.  With Struts 1.0, 
can I add new messages without restarting (as I can add ActionMappings, etc,

without restarting)?  I have been trying to look at the Struts code to see 
how it's done now, and I am just not seeing a way I can add my messages.

  Thanks for your reply,
   Becky

Original Message Follows
From: Ted Husted <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Splitting ApplicationResource.properties
Date: Mon, 21 Jan 2002 15:01:21 -0500

There's some recent work going on in the nightly build that might
interest you.

http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg04354.html


Becky Moyer wrote:
 >
 > Hello all...
 >I can't seem to find the answer to my question in the archive, the
 > javadoc, or the source, so I was hoping someone could figure this one 
out.
 >
 >I have a class extending ActionServlet to read struts-config.xml files
 > from places other then WEB-INF/ in order to split apart the different
 > aspects of my webapp.  I would also like to be able to split up my
 > resource.properties files.  I can find these files in my ActionServlet, 
but
 > I can't figure out how to read them in so that they will be available for
 >  tags.  I've tried doing a props.load and a
 > System.setProperties(props), and after I did that I saw that Struts 
stores
 > those messages using its own Properties object...I'm just not sure how I 
can
 > get the new properties in without losing the old properties, since it 
looks
 > like I have to create a new MessageResource object in the ActionServlet 
to
 > add in a new properties file.
 >
 >   I'm going to keep staring at the code and the javadoc, but does someone
 > have any ideas as to what I need to do with the properties to make them
 > available to bean:message??   I feel like I am missing something staring 
me
 > in the face!
 >
 >Thanks in advance,
 >Becky
 >
 > _
 > Send and receive Hotmail on your mobile device: http://mobile.msn.com
 >
 > --
 > 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]>



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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




MultiBundleActionServlet.java
Description: Binary data

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


Re: Splitting ApplicationResource.properties

2002-01-21 Thread Mark Galbreath

Wow!  A list that permits attachments - cool beans!  Thanks for the code!

Mark

- Original Message -
From: "Martin, Margaret" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, January 21, 2002 4:41 PM
Subject: RE: Splitting ApplicationResource.properties


> Becky,
> Attached is an extension of ActionServlet that I wrote which loads
multiple
> resource bundles based on a properties file that specifies everything to
> load. This may not be exactly what you want, but it might give you some
good
> ideas -
>
> Hope it helps -
> Margaret
>
>
>
> -Original Message-
> From: Becky Moyer [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 21, 2002 3:30 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Splitting ApplicationResource.properties
>
>
> So, from Martin Cooper's post at
> http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg04548.html,
I
>
> gather that while there is an "apparent assumption that each application
has
>
> a single source of message resources" "in both Struts 1.0.x and the latest
> code", I can infer there is a way around it??
>
> The new "subapp" concept looks pretty cool.  But does that mean you can
> install subapps on the fly, while your servlet engine is running?
>
>   My ActionServlet has a set of pages that allow developers to upload an
> almost-war file (that has a struts-config.xml but no web.xml file) and
it's
> read in and available immediately, all classes are loaded in... things are
> put in set places.  This allows new sections of the site to be added
without
>
> reloading tomcat.
>
>   Anyway, back to the topic at hand, I am still confused.  With Struts
1.0,
> can I add new messages without restarting (as I can add ActionMappings,
etc,
>
> without restarting)?  I have been trying to look at the Struts code to see
> how it's done now, and I am just not seeing a way I can add my messages.
>
>   Thanks for your reply,
>Becky
>
> Original Message Follows
> From: Ted Husted <[EMAIL PROTECTED]>
> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: Splitting ApplicationResource.properties
> Date: Mon, 21 Jan 2002 15:01:21 -0500
>
> There's some recent work going on in the nightly build that might
> interest you.
>
> http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg04354.html
>
>
> Becky Moyer wrote:
>  >
>  > Hello all...
>  >I can't seem to find the answer to my question in the archive, the
>  > javadoc, or the source, so I was hoping someone could figure this one
> out.
>  >
>  >I have a class extending ActionServlet to read struts-config.xml
files
>  > from places other then WEB-INF/ in order to split apart the different
>  > aspects of my webapp.  I would also like to be able to split up my
>  > resource.properties files.  I can find these files in my ActionServlet,
> but
>  > I can't figure out how to read them in so that they will be available
for
>  >  tags.  I've tried doing a props.load and a
>  > System.setProperties(props), and after I did that I saw that Struts
> stores
>  > those messages using its own Properties object...I'm just not sure how
I
> can
>  > get the new properties in without losing the old properties, since it
> looks
>  > like I have to create a new MessageResource object in the ActionServlet
> to
>  > add in a new properties file.
>  >
>  >   I'm going to keep staring at the code and the javadoc, but does
someone
>  > have any ideas as to what I need to do with the properties to make them
>  > available to bean:message??   I feel like I am missing something
staring
> me
>  > in the face!
>  >
>  >Thanks in advance,
>  >Becky
>  >
>  > _
>  > Send and receive Hotmail on your mobile device: http://mobile.msn.com
>  >
>  > --
>  > 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]>
>
>
>
> _
> Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp.
>
>
> --
> 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: Splitting ApplicationResource.properties

2002-01-21 Thread Becky Moyer

Margaret,
   Thanks for the code!  That helps a lot.  I have to look through the 
Struts code with the sample you sent me in mind.

   Thanks again...
   Becky


Original Message Follows
From: "Martin, Margaret" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: Splitting ApplicationResource.properties
Date: Mon, 21 Jan 2002 15:41:59 -0600

Becky,
Attached is an extension of ActionServlet that I wrote which loads multiple
resource bundles based on a properties file that specifies everything to
load. This may not be exactly what you want, but it might give you some good
ideas -

Hope it helps -
Margaret



-Original Message-
From: Becky Moyer [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 3:30 PM
To: [EMAIL PROTECTED]
Subject: Re: Splitting ApplicationResource.properties


So, from Martin Cooper's post at
http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg04548.html, I

gather that while there is an "apparent assumption that each application has

a single source of message resources" "in both Struts 1.0.x and the latest
code", I can infer there is a way around it??

The new "subapp" concept looks pretty cool.  But does that mean you can
install subapps on the fly, while your servlet engine is running?

   My ActionServlet has a set of pages that allow developers to upload an
almost-war file (that has a struts-config.xml but no web.xml file) and it's
read in and available immediately, all classes are loaded in... things are
put in set places.  This allows new sections of the site to be added without

reloading tomcat.

   Anyway, back to the topic at hand, I am still confused.  With Struts 1.0,
can I add new messages without restarting (as I can add ActionMappings, etc,

without restarting)?  I have been trying to look at the Struts code to see
how it's done now, and I am just not seeing a way I can add my messages.

   Thanks for your reply,
Becky

Original Message Follows
From: Ted Husted <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Splitting ApplicationResource.properties
Date: Mon, 21 Jan 2002 15:01:21 -0500

There's some recent work going on in the nightly build that might
interest you.

http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg04354.html


Becky Moyer wrote:
  >
  > Hello all...
  >I can't seem to find the answer to my question in the archive, the
  > javadoc, or the source, so I was hoping someone could figure this one
out.
  >
  >I have a class extending ActionServlet to read struts-config.xml 
files
  > from places other then WEB-INF/ in order to split apart the different
  > aspects of my webapp.  I would also like to be able to split up my
  > resource.properties files.  I can find these files in my ActionServlet,
but
  > I can't figure out how to read them in so that they will be available 
for
  >  tags.  I've tried doing a props.load and a
  > System.setProperties(props), and after I did that I saw that Struts
stores
  > those messages using its own Properties object...I'm just not sure how I
can
  > get the new properties in without losing the old properties, since it
looks
  > like I have to create a new MessageResource object in the ActionServlet
to
  > add in a new properties file.
  >
  >   I'm going to keep staring at the code and the javadoc, but does 
someone
  > have any ideas as to what I need to do with the properties to make them
  > available to bean:message??   I feel like I am missing something staring
me
  > in the face!
  >
  >Thanks in advance,
  >Becky
  >
  > _
  > Send and receive Hotmail on your mobile device: http://mobile.msn.com
  >
  > --
  > 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]>



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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

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


_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




RE: Splitting ApplicationResource.properties

2002-01-22 Thread Becky Moyer

So, if I understand what everyone is telling me...

There is no way in Struts 1.0 to grab the existing MessageResources object 
and add new messages.

To do this, I *think* that I'll have to extend MessageResources with my own 
version of PropertyMessageResources that has some sort of an add method 
which maybe lets me add new messages one at a time, or maybe lets me add a 
whole Properties object.

Then I'll have to do a getServletContext().setAttribute(Action.MESSAGES_KEY, 
application); to place the entire collection of messages back where any 
 tag can get at them.

Essentially, I would prefer not to have to use the bundle property of the 
message tag.

Am I on the right track?

Thanks,
Becky

Original Message Follows
From: Jeff Oberlander <[EMAIL PROTECTED]>
To: 'Becky Moyer' <[EMAIL PROTECTED]>
Subject: RE: Splitting ApplicationResource.properties
Date: Mon, 21 Jan 2002 15:22:15 -0800

Becky, it seems (although I haven't tried this) that you can do it through a
combination of:

1) using the bundle attribute of message -
http://jakarta.apache.org/struts/struts-bean.html#message

2) Initializing a different MessagesResource object:
 public static MessageResources messages =

MessageResources.getMessageResources("com.mycompany.mypackage.Messages");
(from
http://jakarta.apache.org/struts/api-1.0/org/apache/struts/util/package-summ
ary.html#doc.Messages)




-Original Message-
From: Becky Moyer [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 2:04 PM
To: [EMAIL PROTECTED]
Subject: RE: Splitting ApplicationResource.properties


Margaret,
Thanks for the code!  That helps a lot.  I have to look through the
Struts code with the sample you sent me in mind.

Thanks again...
Becky


Original Message Follows
From: "Martin, Margaret" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: Splitting ApplicationResource.properties
Date: Mon, 21 Jan 2002 15:41:59 -0600

Becky,
Attached is an extension of ActionServlet that I wrote which loads multiple
resource bundles based on a properties file that specifies everything to
load. This may not be exactly what you want, but it might give you some good
ideas -

Hope it helps -
Margaret



-Original Message-
From: Becky Moyer [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 3:30 PM
To: [EMAIL PROTECTED]
Subject: Re: Splitting ApplicationResource.properties


So, from Martin Cooper's post at
http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg04548.html, I

gather that while there is an "apparent assumption that each application has

a single source of message resources" "in both Struts 1.0.x and the latest
code", I can infer there is a way around it??

The new "subapp" concept looks pretty cool.  But does that mean you can
install subapps on the fly, while your servlet engine is running?

My ActionServlet has a set of pages that allow developers to upload an
almost-war file (that has a struts-config.xml but no web.xml file) and it's
read in and available immediately, all classes are loaded in... things are
put in set places.  This allows new sections of the site to be added without

reloading tomcat.

Anyway, back to the topic at hand, I am still confused.  With Struts 
1.0,
can I add new messages without restarting (as I can add ActionMappings, etc,

without restarting)?  I have been trying to look at the Struts code to see
how it's done now, and I am just not seeing a way I can add my messages.

Thanks for your reply,
 Becky

Original Message Follows
From: Ted Husted <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Splitting ApplicationResource.properties
Date: Mon, 21 Jan 2002 15:01:21 -0500

There's some recent work going on in the nightly build that might
interest you.

http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg04354.html


Becky Moyer wrote:
   >
   > Hello all...
   >I can't seem to find the answer to my question in the archive, the
   > javadoc, or the source, so I was hoping someone could figure this one
out.
   >
   >I have a class extending ActionServlet to read struts-config.xml
files
   > from places other then WEB-INF/ in order to split apart the different
   > aspects of my webapp.  I would also like to be able to split up my
   > resource.properties files.  I can find these files in my ActionServlet,
but
   > I can't figure out how to read them in so that they will be available
for
   >  tags.  I've tried doing a props.load and a
   > System.setProperties(props), and after I did that I saw that Struts
stores
   > t

Re: Solved: Splitting ApplicationResource.properties

2002-01-24 Thread Keith Bacon

> got me past all my confusion was printing out the relevent
> classes and writing all sorts of notes all over. Then I
>  slapped my forehead and said "Duh!", and put the code
> together this morning.
That's where I've been going wrong - I left out the going "Duh" step.
Thanks Becky.
My office is full of slapping & duhing & productivity has increased.


--- Becky Moyer <[EMAIL PROTECTED]> wrote:
> Just so everyone knows, thanks for all your input.  It helped out.  What got 
> me past all my confusion was printing out the relevent classes and writing 
> all sorts of notes all over. Then I slapped my forehead and said "Duh!", and 
> put the code together this morning.
> 
> Here's what I did.  I made my own MessageResource class and added a method 
> called forceLoad(File). (I used a File because I was lazy and my method to 
> find all of my .properties files already returned a Vector of Files.  I 
> could have used filenames or anything else).
> 
> Then, in my actionServlet, I added the following:
> protected void initApplication()
> {
>   super.initApplication();
>   initOtherProperties();
> }
> 
> where the method initOtherProperties does
> MessageResources mr = getServletContext().getAttribute(Action.MESSAGE_KEY);
> and iterates over my vector of Fields, passing each to
> ((MyMessageResources)mr).forceLoad(File);
> 
> So it loads all properties into the same bundle and the properties are now 
> available anywhere without using the bundle attribute of the bean:message 
> tag.
> 
> My custom MessageResources class is below; I also had to make a factory to 
> load this, and I set my factory in web.xml using the factory init-param.
> 
> The only thing that I doubt is quite right is my determination of locale 
> from filename...I think that it works, but if someone knows of a more 
> graceful way to do it, I'd welcome the advice.  I have only tested it with 
> US English.
> 
> Thanks again!
> Becky
> 
> PS - sorry the formatting is all weird, lost it when I pasted to the email 
> editor.
> 
> package com.my.struts.util;
> 
> import org.apache.struts.util.*;
> import org.apache.log4j.Category;
> import java.io.File;
> import java.io.FileInputStream;
> import java.io.InputStream;
> import java.io.IOException;
> import java.util.Properties;
> import java.util.Enumeration;
> 
> public class MyPropertyMessageResources extends PropertyMessageResources
> {
> 
>   private static final Category log = 
> Category.getInstance("MyProperyMessageResources");
> 
>   public MyPropertyMessageResources(MessageResourcesFactory factory,
>  String config)
>   {
> super(factory, config);
>   }
> 
>   public MyPropertyMessageResources(MessageResourcesFactory factory,
>  String config,
>  boolean returnNull)
>   {
> super(factory, config, returnNull);
>   }
> 
>   public void forceLoad(File propsFile)
>   {
> //make a new properties object from the input stream
> Properties props = new Properties();
> InputStream is = null;
> try
>   {
>  is = new FileInputStream(propsFile);
>  if (is == null)
>    {
>  return;
>    }
>  
>  props.load(is);
>  if (props.size() < 1)
>    return;
>  is.close();
>   }
> catch (IOException ex)
>   {
>  log.error("Exception reading properties file " + propsFile.getName(), ex);
>   }
> 
> 
> //here i need to figure out what the localeKey should be
> String filename = propsFile.getName();
> String localeKey = this.getLocale(filename);
> if (localeKey.equals(""))
>   localeKey=defaultLocale.getLanguage();
> log.debug("LocaleKey = (" + localeKey + ")");
> //add the properties to the HashMap messages one at a time
> synchronized (messages)
>   {
>  Enumeration names = props.keys();
>  while (names.hasMoreElements())
>    {
>  String key = (String) names.nextElement();
>  log.debug("loading the following key: " + messageKey(localeKey, key) + 
> " with value " + props.getProperty(key));
>  messages.put(messageKey(localeKey, key), props.getProperty(key));
>    }
>   }
> return;
>   }
> 
>   protected String getLocale(String filename)
>   {
> String locale = "";
> int startChar = 0;
> int endChar = 0;
> for (int i=0; i < filename.length(); i++)
>   {
>  if (filename.charAt(i) == '_')
>    startChar=i;
>  if (filename.charAt(i) == '.')
>    endChar=i-1;
>   }
> if (startChar!=0)
>   locale = filename.substring(startChar, endChar);
> 
> return locale;
>   }
> 
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


__
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

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

How to convert ApplicationResource.properties to a table

2003-08-28 Thread Brunda Banavar (IT)
Hi
I have to convert the existing ApplicationResource.properties text file to a 
simple database table. Can you please guide how can i achieve this ? Appreciate the 
help.



Thanks 
Brunda Banavar 
IT  BordersGroupInc 




RE: How to convert ApplicationResource.properties to a table

2003-08-28 Thread Yuan, Saul (TOR-ML)
You can use the import wizard that comes with most of the database tools
(Access, SQL Manager, Msql Front etc) to import a text file into your
database, be sure to use "=" as the delimiter.


Saul


> -Original Message-
> From: Brunda Banavar (IT) [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 28, 2003 3:51 PM
> To: [EMAIL PROTECTED]
> Subject: How to convert ApplicationResource.properties to a table
> 
> 
> 
> 
> 
> Hi
> I have to convert the existing ApplicationResource.properties
text
> file
> to a simple database table. Can you please guide how can i achieve
this ?
> Appreciate the help.
> 
> 
> 
> Thanks
> Brunda Banavar
> IT  BordersGroupInc
> 
> 
> 


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



Use messages from ApplicationResource.properties for an e-mail

2003-03-25 Thread Raible, Matt
I have a requirement to send a notification e-mail when an item in my app is
deleted.  I was hoping to use a string (post-substitution) from
ApplicationResource.properties to do this, but alas, it does not work like I
hoped.  Is this possible without loading it as a ResourceBundle and calling
getString()?

// deletedBy and appURL are set previously as String variables

new ActionMessage("cr.deleted.msg", deletedBy, appURL).toString()

results in...

[EMAIL PROTECTED]

Thanks,

Matt



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



Re: Use messages from ApplicationResource.properties for an e-mail

2003-03-25 Thread David Graham
Why don't you want to load it as a ResourceBundle?

David


From: "Raible, Matt" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: Use messages from ApplicationResource.properties for an e-mail
Date: Tue, 25 Mar 2003 14:20:31 -0700
I have a requirement to send a notification e-mail when an item in my app 
is
deleted.  I was hoping to use a string (post-substitution) from
ApplicationResource.properties to do this, but alas, it does not work like 
I
hoped.  Is this possible without loading it as a ResourceBundle and calling
getString()?

// deletedBy and appURL are set previously as String variables

new ActionMessage("cr.deleted.msg", deletedBy, appURL).toString()

results in...

[EMAIL PROTECTED]

Thanks,

Matt



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


_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

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


Re: Use messages from ApplicationResource.properties for an e-mail

2003-03-25 Thread Phil Steitz
Raible, Matt wrote:
I have a requirement to send a notification e-mail when an item in my app is
deleted.  I was hoping to use a string (post-substitution) from
ApplicationResource.properties to do this, but alas, it does not work like I
hoped.  Is this possible without loading it as a ResourceBundle and calling
getString()?
The struts MessageResources class encapsulates the ResourceBundle and 
will perform the substitution.  Use:

MessageResources messages =
MessageResources.getMessageResources("ApplicationResources");
String msgText =
messages.getMessage("cr.deleted.msg", deletedBy, appURL);

// deletedBy and appURL are set previously as String variables

new ActionMessage("cr.deleted.msg", deletedBy, appURL).toString()

results in...

[EMAIL PROTECTED]

Thanks,

Matt



-
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]


RE: Use messages from ApplicationResource.properties for an e-mail

2003-03-25 Thread Mick . Knutson
Is there a way to force the Locale?
I have a requirement, for  user, say in en_US locale, to send an email that will have 
standard notes to a user that is in, say Germany (de or de_CH). So I need to se the 
locale only when I try to get the message, not change it fr the user.

 
  _  

Thank You
 
Mick Knutson
 
Sr. Designer - Project Trust
aUBS AG, Financial - Zürich
Office: +41 (0)1/234.42.75
Internal: 48194
Mobile: 079.726.14.26
  _  



-Original Message-
From: Phil Steitz [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 6:05 AM
To: Struts Users Mailing List
Subject: Re: Use messages from ApplicationResource.properties for an
e-mail


Raible, Matt wrote:
> I have a requirement to send a notification e-mail when an item in my app is
> deleted.  I was hoping to use a string (post-substitution) from
> ApplicationResource.properties to do this, but alas, it does not work like I
> hoped.  Is this possible without loading it as a ResourceBundle and calling
> getString()?

The struts MessageResources class encapsulates the ResourceBundle and 
will perform the substitution.  Use:

MessageResources messages =
MessageResources.getMessageResources("ApplicationResources");

String msgText =
messages.getMessage("cr.deleted.msg", deletedBy, appURL);


> 
> // deletedBy and appURL are set previously as String variables
> 
> new ActionMessage("cr.deleted.msg", deletedBy, appURL).toString()

> 
> results in...
> 
> [EMAIL PROTECTED]
> 
> Thanks,
> 
> Matt
> 
> 
> 
> -
> 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]


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


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



Re: Use messages from ApplicationResource.properties for an e-mail

2003-03-25 Thread Phil Steitz
[EMAIL PROTECTED] wrote:
Is there a way to force the Locale?
I have a requirement, for  user, say in en_US locale, to send an email that will have 
standard notes to a user that is in, say Germany (de or de_CH).

So I need to se the locale only when I try to get the message, not 
change it fr the user.

See 
http://jakarta.apache.org/struts/api/org/apache/struts/util/MessageResources.html 
getMessage can take a locale as its first argument, if this is what you 
mean.

 
  _  

Thank You
 
Mick Knutson
 
Sr. Designer - Project Trust
aUBS AG, Financial - Zürich
Office: +41 (0)1/234.42.75
Internal: 48194
Mobile: 079.726.14.26
  _  



-Original Message-
From: Phil Steitz [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 6:05 AM
To: Struts Users Mailing List
Subject: Re: Use messages from ApplicationResource.properties for an
e-mail
Raible, Matt wrote:

I have a requirement to send a notification e-mail when an item in my app is
deleted.  I was hoping to use a string (post-substitution) from
ApplicationResource.properties to do this, but alas, it does not work like I
hoped.  Is this possible without loading it as a ResourceBundle and calling
getString()?


The struts MessageResources class encapsulates the ResourceBundle and 
will perform the substitution.  Use:

MessageResources messages =
MessageResources.getMessageResources("ApplicationResources");
String msgText =
messages.getMessage("cr.deleted.msg", deletedBy, appURL);


// deletedBy and appURL are set previously as String variables

new ActionMessage("cr.deleted.msg", deletedBy, appURL).toString()


results in...

[EMAIL PROTECTED]

Thanks,

Matt



-
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]
Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.

-
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]


RE: Use messages from ApplicationResource.properties for an e-mail

2003-03-25 Thread Mick . Knutson
perfect. 

 
  _  

Thank You
 
Mick Knutson
 
Sr. Designer - Project Trust
aUBS AG, Financial - Zürich
Office: +41 (0)1/234.42.75
Internal: 48194
Mobile: 079.726.14.26
  _  



-Original Message-
From: Phil Steitz [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 7:26 AM
To: Struts Users Mailing List
Subject: Re: Use messages from ApplicationResource.properties for an
e-mail


[EMAIL PROTECTED] wrote:
> Is there a way to force the Locale?
> I have a requirement, for  user, say in en_US locale, to send an email that will 
> have 

standard notes to a user that is in, say Germany (de or de_CH).

So I need to se the locale only when I try to get the message, not 
change it fr the user.
> 

See 
http://jakarta.apache.org/struts/api/org/apache/struts/util/MessageResources.html 
getMessage can take a locale as its first argument, if this is what you 
mean.

>  
>   _  
> 
> Thank You
>  
> Mick Knutson
>  
> Sr. Designer - Project Trust
> aUBS AG, Financial - Zürich
> Office: +41 (0)1/234.42.75
> Internal: 48194
> Mobile: 079.726.14.26
>   _  
> 
> 
> 
> -Original Message-
> From: Phil Steitz [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 26, 2003 6:05 AM
> To: Struts Users Mailing List
> Subject: Re: Use messages from ApplicationResource.properties for an
> e-mail
> 
> 
> Raible, Matt wrote:
> 
>>I have a requirement to send a notification e-mail when an item in my app is
>>deleted.  I was hoping to use a string (post-substitution) from
>>ApplicationResource.properties to do this, but alas, it does not work like I
>>hoped.  Is this possible without loading it as a ResourceBundle and calling
>>getString()?
> 
> 
> The struts MessageResources class encapsulates the ResourceBundle and 
> will perform the substitution.  Use:
> 
> MessageResources messages =
>   MessageResources.getMessageResources("ApplicationResources");
> 
> String msgText =
>   messages.getMessage("cr.deleted.msg", deletedBy, appURL);
> 
> 
> 
>>// deletedBy and appURL are set previously as String variables
>>
>>new ActionMessage("cr.deleted.msg", deletedBy, appURL).toString()
> 
> 
>>results in...
>>
>>[EMAIL PROTECTED]
>>
>>Thanks,
>>
>>Matt
>>
>>
>>
>>-
>>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]
> 
> 
> Visit our website at http://www.ubswarburg.com
> 
> This message contains confidential information and is intended only 
> for the individual named.  If you are not the named addressee you 
> should not disseminate, distribute or copy this e-mail.  Please 
> notify the sender immediately by e-mail if you have received this 
> e-mail by mistake and delete this e-mail from your system.
> 
> E-mail transmission cannot be guaranteed to be secure or error-free 
> as information could be intercepted, corrupted, lost, destroyed, 
> arrive late or incomplete, or contain viruses.  The sender therefore 
> does not accept liability for any errors or omissions in the contents 
> of this message which arise as a result of e-mail transmission.  If 
> verification is required please request a hard-copy version.  This 
> message is provided for informational purposes and should not be 
> construed as a solicitation or offer to buy or sell any securities or 
> related financial instruments.
> 
> 
> -
> 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]


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail