This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes global properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "global properties file" Watch "global properties file" New topic
Author

global properties file

MaheshS Kumbhar
Ranch Hand

Joined: Sep 24, 2009
Posts: 188
I have a problem configuring global.properties file.
I have a following directory structure in my program

src
|
Properties-->global.properties
|
struts2-->package.properties
|
struts2.Register.Action--> RegisterAction class
|
struts2.Register.Model -->Person class
|
struts.xml file


WebRoot
|
WEB-INF
|
register.jsp


struts.xml file is as follow



Here register.jsp page is accessing key present in global.properties file using <s:text /> tag but failing with
WARNING: The first TextProvider in the ValueStack (struts2.Register.Action.RegisterAction) could not locate the message resource with key 'global'
WARNING: The default value expression 'global' was evaluated and did not match a property. The literal value 'global' will be used.

Can you please help in solving the problem with above scenario?

I am slow but sure
Shriram Pandit
Greenhorn

Joined: Apr 08, 2011
Posts: 11
I am also getting the same WARNINGs anybody please help
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: global properties file
 
Similar Threads
Problem With I18n feature of Struts2
struts2 properties file reload
struts2: howto correctly deligate actions on the struts.xml's include files
Struts2 CannotRenderException
"No configuration found for the specified action" error in struts2