Re: Is struts really loading the resources?

2001-07-08 Thread Bob Byron

I am running under JBuilder 5.  It uses the 3.2.1
version of Tomcat.  But I have had the worst time
getting the resources to be visible while trying
to run inside the environment.  I would greatly 
appreciate an example of the simplest project
file that would make the system work.

Bob Byron
RAD Systems, Inc.
www.radit.com
(972)516-4256

- Original Message - 
From: Craig R. McClanahan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 07, 2001 11:37 PM
Subject: Re: Is struts really loading the resources?


What servlet container are you using?  Some containers have horrendous
bugs related to loading resource files via the web app class loader.

Craig McClanahan

On Wed, 27 Jun 2001, Bob Byron wrote:

 I am new to struts and trying to get down some of the
 basics.  I am trying to use the command: 
 bean:message key=header.title/
 
 When I do, I get the following exception:
 javax.servlet.jsp.JspException: Missing message for
 key header.title
 
 I have verified that my ApplicationResources file does
 contain:
 header.title=MY TEST
 
 Checking the log earlier, I find the following
 confirmation that the ApplicationResources properties
 were loaded, or were they:
 2001-06-27 09:20:31 - path=/test :action: Loading
 application resources from resource
 ApplicationResources
 
 The previous log entry mentions nothing about the
 resource file being found and loaded successfully.  Am
 I missing something?  How do I know that they
 properties file was definately loaded?  How can I view
 the properties that are currently available?  I am
 just not sure what avenue of debugging to pursue at
 this point.
 
 Thank You,
 Bob Byron
 
 
 
 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/





Re: Is struts really loading the resources?

2001-07-07 Thread Craig R. McClanahan

What servlet container are you using?  Some containers have horrendous
bugs related to loading resource files via the web app class loader.

Craig McClanahan

On Wed, 27 Jun 2001, Bob Byron wrote:

 I am new to struts and trying to get down some of the
 basics.  I am trying to use the command: 
 bean:message key=header.title/
 
 When I do, I get the following exception:
 javax.servlet.jsp.JspException: Missing message for
 key header.title
 
 I have verified that my ApplicationResources file does
 contain:
 header.title=MY TEST
 
 Checking the log earlier, I find the following
 confirmation that the ApplicationResources properties
 were loaded, or were they:
 2001-06-27 09:20:31 - path=/test :action: Loading
 application resources from resource
 ApplicationResources
 
 The previous log entry mentions nothing about the
 resource file being found and loaded successfully.  Am
 I missing something?  How do I know that they
 properties file was definately loaded?  How can I view
 the properties that are currently available?  I am
 just not sure what avenue of debugging to pursue at
 this point.
 
 Thank You,
 Bob Byron
 
 
 
 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/
 




RE: Is struts really loading the resources?

2001-06-28 Thread Niall Pemberton

ActionServlet does not actually load the messages when it starts up. It just
uses whatever MessageResources factory it is configured for to create a
MessageResources - Struts have provided default concrete implementations of
these classes (PropertyMessageResources and PropertyMessageResourcesFactory)
and PropertyMessageResources does not actually load the messages until the
first getMessage() is issued.

You could create your own version of PropertyMessageResources with debugging
messages and configure Struts to use it (add a factory parameter to the
web.xml file pointing to your MessageResourcesFactory).

Also, your properties file should be in your test\WEB-INF\classes
directory (or sub-directory depending on the package name)


hope this helps

Niall


 -Original Message-
 From: Bob Byron [mailto:[EMAIL PROTECTED]]
 Sent: 27 June 2001 18:43
 To: [EMAIL PROTECTED]
 Subject: RE: Is struts really loading the resources?


 I have verified that, and it is:
 init-param
   param-nameapplication/param-name
   param-valueApplicationResources/param-value
 /init-param

 As I read it, that should go to the base directory
 where all classes are stored, and not traverse down to
 a specific package.  In other words, I have placed
 ApplicationResources.properties at the same level as
 the test directory that I mentioned earlier.
 Really, I would like to know if there is a place in
 the code that I can debug and print out the exact file
 name that the system is attempting to open.  Is there
 any way to have Win2000 display a log of files as it
 opens them?

 Bob


 --- Jason Rosenblum [EMAIL PROTECTED] wrote:
  make sure your web.xml file points to the
  ApplicationResources file that you're using.
  the entry looks like this:
init-param
param-nameapplication/param-name
 
 
 param-valuecom.cnet.app.intranet.app.psr.ApplicationResources/p
 aram-value
  /init-param
 
  ~Jason
 
  -Original Message-
  From: Bob Byron [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, June 27, 2001 10:24 AM
  To: [EMAIL PROTECTED]
  Subject: RE: Is struts really loading the resources?
 
 
  Yes, I did.  It has it in there.
 
  Bob
  --- Marcel  Andres [EMAIL PROTECTED] wrote:
   Bob,
  
   Did you make sure, that your jsp-page has the
   following entry, so it can use the
   bean:message-tag:
  
   %@ page language=java %
   %@ taglib uri=/WEB-INF/struts-bean.tld
   prefix=bean %
  
   Marcel
  
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, June 27, 2001 5:17 PM
   To: [EMAIL PROTECTED]
   Subject: Is struts really loading the resources?
  
  
   I am new to struts and trying to get down some of
   the
   basics.  I am trying to use the command:
   bean:message key=header.title/
  
   When I do, I get the following exception:
   javax.servlet.jsp.JspException: Missing message
  for
   key header.title
  
   I have verified that my ApplicationResources file
   does
   contain:
   header.title=MY TEST
  
   Checking the log earlier, I find the following
   confirmation that the ApplicationResources
   properties
   were loaded, or were they:
   2001-06-27 09:20:31 - path=/test :action:
  Loading
   application resources from resource
   ApplicationResources
  
   The previous log entry mentions nothing about the
   resource file being found and loaded successfully.
 
   Am
   I missing something?  How do I know that they
   properties file was definately loaded?  How can I
   view
   the properties that are currently available?  I am
   just not sure what avenue of debugging to pursue
  at
   this point.
  
   Thank You,
   Bob Byron
  
  
  
   __
   Do You Yahoo!?
   Get personalized email addresses from Yahoo! Mail
   http://personal.mail.yahoo.com/
 
 
  __
  Do You Yahoo!?
  Get personalized email addresses from Yahoo! Mail
  http://personal.mail.yahoo.com/


 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/





RE: Is struts really loading the resources?

2001-06-27 Thread Marcel Andres

Bob,

Did you make sure, that your jsp-page has the following entry, so it can use the 
bean:message-tag:

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %

Marcel


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 5:17 PM
To: [EMAIL PROTECTED]
Subject: Is struts really loading the resources?


I am new to struts and trying to get down some of the
basics.  I am trying to use the command: 
bean:message key=header.title/

When I do, I get the following exception:
javax.servlet.jsp.JspException: Missing message for
key header.title

I have verified that my ApplicationResources file does
contain:
header.title=MY TEST

Checking the log earlier, I find the following
confirmation that the ApplicationResources properties
were loaded, or were they:
2001-06-27 09:20:31 - path=/test :action: Loading
application resources from resource
ApplicationResources

The previous log entry mentions nothing about the
resource file being found and loaded successfully.  Am
I missing something?  How do I know that they
properties file was definately loaded?  How can I view
the properties that are currently available?  I am
just not sure what avenue of debugging to pursue at
this point.

Thank You,
Bob Byron



__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: Is struts really loading the resources?

2001-06-27 Thread Bob Byron

Yes, I did.  It has it in there.

Bob
--- Marcel  Andres [EMAIL PROTECTED] wrote:
 Bob,
 
 Did you make sure, that your jsp-page has the
 following entry, so it can use the
 bean:message-tag:
 
 %@ page language=java %
 %@ taglib uri=/WEB-INF/struts-bean.tld
 prefix=bean %
 
 Marcel
 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 27, 2001 5:17 PM
 To: [EMAIL PROTECTED]
 Subject: Is struts really loading the resources?
 
 
 I am new to struts and trying to get down some of
 the
 basics.  I am trying to use the command: 
 bean:message key=header.title/
 
 When I do, I get the following exception:
 javax.servlet.jsp.JspException: Missing message for
 key header.title
 
 I have verified that my ApplicationResources file
 does
 contain:
 header.title=MY TEST
 
 Checking the log earlier, I find the following
 confirmation that the ApplicationResources
 properties
 were loaded, or were they:
 2001-06-27 09:20:31 - path=/test :action: Loading
 application resources from resource
 ApplicationResources
 
 The previous log entry mentions nothing about the
 resource file being found and loaded successfully. 
 Am
 I missing something?  How do I know that they
 properties file was definately loaded?  How can I
 view
 the properties that are currently available?  I am
 just not sure what avenue of debugging to pursue at
 this point.
 
 Thank You,
 Bob Byron
 
 
 
 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: Is struts really loading the resources?

2001-06-27 Thread Jason Rosenblum

make sure your web.xml file points to the ApplicationResources file that you're using.
the entry looks like this:
  init-param
  param-nameapplication/param-name
  param-valuecom.cnet.app.intranet.app.psr.ApplicationResources/param-value
/init-param
 
~Jason

-Original Message-
From: Bob Byron [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 10:24 AM
To: [EMAIL PROTECTED]
Subject: RE: Is struts really loading the resources?


Yes, I did.  It has it in there.

Bob
--- Marcel  Andres [EMAIL PROTECTED] wrote:
 Bob,
 
 Did you make sure, that your jsp-page has the
 following entry, so it can use the
 bean:message-tag:
 
 %@ page language=java %
 %@ taglib uri=/WEB-INF/struts-bean.tld
 prefix=bean %
 
 Marcel
 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 27, 2001 5:17 PM
 To: [EMAIL PROTECTED]
 Subject: Is struts really loading the resources?
 
 
 I am new to struts and trying to get down some of
 the
 basics.  I am trying to use the command: 
 bean:message key=header.title/
 
 When I do, I get the following exception:
 javax.servlet.jsp.JspException: Missing message for
 key header.title
 
 I have verified that my ApplicationResources file
 does
 contain:
 header.title=MY TEST
 
 Checking the log earlier, I find the following
 confirmation that the ApplicationResources
 properties
 were loaded, or were they:
 2001-06-27 09:20:31 - path=/test :action: Loading
 application resources from resource
 ApplicationResources
 
 The previous log entry mentions nothing about the
 resource file being found and loaded successfully. 
 Am
 I missing something?  How do I know that they
 properties file was definately loaded?  How can I
 view
 the properties that are currently available?  I am
 just not sure what avenue of debugging to pursue at
 this point.
 
 Thank You,
 Bob Byron
 
 
 
 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: Is struts really loading the resources?

2001-06-27 Thread Bob Byron

I am still having any trouble.  I have literally
placed the ApplicationResources.properties file
everywhere and it is not being loaded, or if it is,
then the properties are not being interpreted
correctly - either way, it is not working yet.  Is
there any way to display the explicit file name that
the system is trying to open?  Is there any way to
dump all of the properties that have been loaded?  I
would like to be able to more accurately verify what
is going on here.  I am running this under JBuilder 5,
which is another possible source of an issue.

Thank You,
Bob Byron

--- Geddes, Mark (ANTS) [EMAIL PROTECTED]
wrote:
 This message appears even if the properties file is
 not present.
 In your example, ApplicationResources.properties
 should exist in the top
 level of the classes directory of your web-app, ie.
 web-inf/classes/ApplicationResources.properties
 
 
 
 -Original Message-
 From: Bob Byron [mailto:[EMAIL PROTECTED]]
 Sent: 27 June 2001 16:17
 To: [EMAIL PROTECTED]
 Subject: Is struts really loading the resources?
 
 
 I am new to struts and trying to get down some of
 the
 basics.  I am trying to use the command: 
 bean:message key=header.title/
 
 When I do, I get the following exception:
 javax.servlet.jsp.JspException: Missing message for
 key header.title
 
 I have verified that my ApplicationResources file
 does
 contain:
 header.title=MY TEST
 
 Checking the log earlier, I find the following
 confirmation that the ApplicationResources
 properties
 were loaded, or were they:
 2001-06-27 09:20:31 - path=/test :action: Loading
 application resources from resource
 ApplicationResources
 
 The previous log entry mentions nothing about the
 resource file being found and loaded successfully. 
 Am
 I missing something?  How do I know that they
 properties file was definately loaded?  How can I
 view
 the properties that are currently available?  I am
 just not sure what avenue of debugging to pursue at
 this point.
 
 Thank You,
 Bob Byron
 
 
 
 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/
 
 
 

***
 This email message contains confidential information
 for the above addressee only.  If you are not the
 intended addressee you must not disclose or use the
 information in any manner whatsoever.
 
 Any opinion or views contained in this email message
 are those of the sender, do not represent those of
 the Company in any way and reliance should not be
 placed upon its contents.
 
 Unless otherwise stated this email message is not
 intended to be contractually binding.  Where an
 Agreement exists between our respective companies
 and there is conflict between the contents of this
 email message and the Agreement then the terms of
 that Agreement shall prevail.
 
 Abbey National Treasury Services plc. Registered in
 England. Registered Office:  Abbey House, Baker
 Street, London NW1 6XL.  Company Registration No:
 2338548.  Regulated by the SFA

***


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: Is struts really loading the resources?

2001-06-27 Thread Bob Byron

I have verified that, and it is:
init-param
  param-nameapplication/param-name
  param-valueApplicationResources/param-value
/init-param

As I read it, that should go to the base directory
where all classes are stored, and not traverse down to
a specific package.  In other words, I have placed
ApplicationResources.properties at the same level as
the test directory that I mentioned earlier. 
Really, I would like to know if there is a place in
the code that I can debug and print out the exact file
name that the system is attempting to open.  Is there
any way to have Win2000 display a log of files as it
opens them?

Bob


--- Jason Rosenblum [EMAIL PROTECTED] wrote:
 make sure your web.xml file points to the
 ApplicationResources file that you're using.
 the entry looks like this:
   init-param
   param-nameapplication/param-name
  

param-valuecom.cnet.app.intranet.app.psr.ApplicationResources/param-value
 /init-param
  
 ~Jason
 
 -Original Message-
 From: Bob Byron [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 27, 2001 10:24 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Is struts really loading the resources?
 
 
 Yes, I did.  It has it in there.
 
 Bob
 --- Marcel  Andres [EMAIL PROTECTED] wrote:
  Bob,
  
  Did you make sure, that your jsp-page has the
  following entry, so it can use the
  bean:message-tag:
  
  %@ page language=java %
  %@ taglib uri=/WEB-INF/struts-bean.tld
  prefix=bean %
  
  Marcel
  
  
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, June 27, 2001 5:17 PM
  To: [EMAIL PROTECTED]
  Subject: Is struts really loading the resources?
  
  
  I am new to struts and trying to get down some of
  the
  basics.  I am trying to use the command: 
  bean:message key=header.title/
  
  When I do, I get the following exception:
  javax.servlet.jsp.JspException: Missing message
 for
  key header.title
  
  I have verified that my ApplicationResources file
  does
  contain:
  header.title=MY TEST
  
  Checking the log earlier, I find the following
  confirmation that the ApplicationResources
  properties
  were loaded, or were they:
  2001-06-27 09:20:31 - path=/test :action:
 Loading
  application resources from resource
  ApplicationResources
  
  The previous log entry mentions nothing about the
  resource file being found and loaded successfully.
 
  Am
  I missing something?  How do I know that they
  properties file was definately loaded?  How can I
  view
  the properties that are currently available?  I am
  just not sure what avenue of debugging to pursue
 at
  this point.
  
  Thank You,
  Bob Byron
  
  
  
  __
  Do You Yahoo!?
  Get personalized email addresses from Yahoo! Mail
  http://personal.mail.yahoo.com/
 
 
 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: Is struts really loading the resources?

2001-06-27 Thread Peter Alfors

You could subclass the ActionServlet and over-ride the initApplication() method.
This is the method that loads the file.
You could then display the file, and its contents if you wanted.  (maybe use a
debug setting to specify if you want this to happen?)
Or, you could write a simple class that pulls the value Action.MESSAGES_KEY out
of the session.
If it exists, then you could cycle through it and display its contents.

Pete


Bob Byron wrote:

 I have verified that, and it is:
 init-param
   param-nameapplication/param-name
   param-valueApplicationResources/param-value
 /init-param

 As I read it, that should go to the base directory
 where all classes are stored, and not traverse down to
 a specific package.  In other words, I have placed
 ApplicationResources.properties at the same level as
 the test directory that I mentioned earlier.
 Really, I would like to know if there is a place in
 the code that I can debug and print out the exact file
 name that the system is attempting to open.  Is there
 any way to have Win2000 display a log of files as it
 opens them?

 Bob

 --- Jason Rosenblum [EMAIL PROTECTED] wrote:
  make sure your web.xml file points to the
  ApplicationResources file that you're using.
  the entry looks like this:
init-param
param-nameapplication/param-name
 
 
 param-valuecom.cnet.app.intranet.app.psr.ApplicationResources/param-value
  /init-param
 
  ~Jason
 
  -Original Message-
  From: Bob Byron [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, June 27, 2001 10:24 AM
  To: [EMAIL PROTECTED]
  Subject: RE: Is struts really loading the resources?
 
 
  Yes, I did.  It has it in there.
 
  Bob
  --- Marcel  Andres [EMAIL PROTECTED] wrote:
   Bob,
  
   Did you make sure, that your jsp-page has the
   following entry, so it can use the
   bean:message-tag:
  
   %@ page language=java %
   %@ taglib uri=/WEB-INF/struts-bean.tld
   prefix=bean %
  
   Marcel
  
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, June 27, 2001 5:17 PM
   To: [EMAIL PROTECTED]
   Subject: Is struts really loading the resources?
  
  
   I am new to struts and trying to get down some of
   the
   basics.  I am trying to use the command:
   bean:message key=header.title/
  
   When I do, I get the following exception:
   javax.servlet.jsp.JspException: Missing message
  for
   key header.title
  
   I have verified that my ApplicationResources file
   does
   contain:
   header.title=MY TEST
  
   Checking the log earlier, I find the following
   confirmation that the ApplicationResources
   properties
   were loaded, or were they:
   2001-06-27 09:20:31 - path=/test :action:
  Loading
   application resources from resource
   ApplicationResources
  
   The previous log entry mentions nothing about the
   resource file being found and loaded successfully.
 
   Am
   I missing something?  How do I know that they
   properties file was definately loaded?  How can I
   view
   the properties that are currently available?  I am
   just not sure what avenue of debugging to pursue
  at
   this point.
  
   Thank You,
   Bob Byron
  
  
  
   __
   Do You Yahoo!?
   Get personalized email addresses from Yahoo! Mail
   http://personal.mail.yahoo.com/
 
 
  __
  Do You Yahoo!?
  Get personalized email addresses from Yahoo! Mail
  http://personal.mail.yahoo.com/

 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard