• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Difference between application and message-resources

 
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to struts and I would like to know what is the difference between the following two parameters....


in the web.xml......


<init-param>
<param-name>application</param-name>
<param-value>test.struts.MessageResources</param-value>
</init-param>




in the struts-config.xml.....


<message-resources parameter="test.struts.MessageResources" null="false"/>



Do we need to use both parameters? Or can we use one and leave the other out?
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ronnie,

I don't believe that you have to have both entries. In the struts application that my team is working on, we only have the struts-config.xml entry.

Best of Luck,

Nate
 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay. I appreciate that information. I'll play around with my example and see if I could remove the entry from the web.xml.

By the way...what is the purpose of having the application paramter in the web.xml?
 
Nathan Hook
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My guess is that the servlet that has that init parameter is looking for a parameter called Application and then that servlet loads the resource file.

Only a guess though.

Best of Luck,

Nate
 
Whatever you say buddy! And I believe this tiny ad too:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic