• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

javax.servlet.jsp. JspException: Cannot find message resources under key

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
javax.s ervlet.jsp. JspException: Cannot find message resources under key
org.apache.struts.action. MESSAGE

I am trying to run the sample banking application that comes with the O'reilly Jakarta Struts book. I am using Resin.

I got struts-blank to work. I deployed the banking.war and turned on resin, it autodeployed.

Here are the contents of my struts-config.xml

Please not the following line at the bottom:
<message-resources parameter="BankingMessageResources" null="false"/>



Here is the contents of the BankingMessageResources.properties which is located at: C:\resin-2.1.11\webapps\banking\WEB-INF\classes



There is a post on O'reilly, with someone who is having the same problem. I don't quite understand what he is saying:

I really like the book and it was really a great book for me to learn struts.

Though i have some question on the storefront-dev example code.

When i deployed it i always get this error:

javax.servlet.jsp.JspException: Cannot find message resources under key

org.apache.struts.action.MESSAGE

I tried removing some of the line errors in the index.jsp just to see if it will

work. It did but when i click a new link like viewdetail there it was again. The error part seems to be in the bean tag. it seems it cannot find the message-resources "StorefrontMessageResources". is there any change to be made in the struts-config.xml? anyway, im using the latest version of resin and jdk 1.4. I


Here is the code from index.jsp

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
What is this means?
it cannot find the message-resources "StorefrontMessageResources".
Are you using two property files one is StorefrontMessageResources anad the other one as bankingresources if so the u have to distinguish the files with a unique key , which u can do it in struts-config like this

<message-resources key="ONE" parameter="FILENAME"/>
<message-resources key="TWO" parameter="FILENAME"/>

and in your jsp's u can use it as follows

<bean:message bundle = "ONE" key="" />

I don't know to what extent it might help u
 
Ryan G Johnson
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i meant banking dev.


the code is right here:

http://examples.oreilly.com/jakarta/

banking.war

i am assuming its because the book is 3 years old and struts has changed. oreilly is usually pretty good.
 
Get me the mayor's office! I need to tell him about this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic