File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes javax.servlet.jsp. JspException: Cannot find message resources under key Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "javax.servlet.jsp. JspException: Cannot find message resources under key" Watch "javax.servlet.jsp. JspException: Cannot find message resources under key" New topic
Author

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

Ryan G Johnson
Ranch Hand

Joined: Nov 11, 2004
Posts: 33
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

shahin Khan
Greenhorn

Joined: Mar 04, 2005
Posts: 17
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

Joined: Nov 11, 2004
Posts: 33
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: javax.servlet.jsp. JspException: Cannot find message resources under key
 
Similar Threads
validation
SEVERE: No action instance for path /xxxx ould be created java.lang.ClassCastExcepti
ClassCastException in struts - urgent! :(
Struts IE render problem
Getting Values from a window to parent page