• 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

bean:message tag not working

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I'm running struts on VAJ4.0. I'm having one problem which whenever I'm using <bean:message> in the jsp, the page cannot the loaded, but it works fine after I removed the tag. Do you have any idea in solving this problem?
Thanks
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make sure you have the "ApplicationResources.properties" file in the WEB-INF directory of your web application.
If you don't have one you can copy a model file from "struts-example.war".
If you have the file in correct directory,make sure it is referenced properly in struts-config.xml.
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sbezawada,
JavaRanch has a naming policy which is strictly enforced. Please read the policy and change your display name if you wish to continue posting here.
You can change your name
here
 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Be sure to import the bean tag-library in your JSP.
 
Saloon Keeper
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The actual location of the ApplicationResource.properties file is in your webapp's classpath - under WEB-INF/classes if it's a freestanding file or in a jar file in WEB-INF/lib.
The complete pathname (freestanding file version) is synthesized from:

where <path-to-app-resources> is taken from the web.xml file underneath the <servlet> stanza for the ActionServlet:

To see everything in its proper context, look at the sample at http://localhost/strutsdemo/src/web.xml
Just for the sake of completeness, BTW, the sample Application Resources file is /tomcat3/webapps/strutsdemo/WEB-INF/classes/com/mousetech/strutsdemo/ApplicationResources.properties
Or, for Windows fans:
C:\tomcat3\webapps\strutsdemo\WEB-INF\classes\com\mousetech\strutsdemo\ApplicationResources.properties
And, as always, upper/lower case in the filenames is critical (Even though Windows doesn't think so, Java does).
[ August 02, 2002: Message edited by: Tim Holloway ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic