This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts Properties File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Properties File" Watch "Struts Properties File" New topic

Struts Properties File

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 10003


What's the use of the file in Struts 2?

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Ess

Joined: Oct 29, 2001
Posts: 9169

Here is an example, fully documented.

[How To Ask Questions On JavaRanch]
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 10003

The link is fine but I wanted to know why we need a file when we already have a struts.xml file?
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
Well, if you don't like it, try zero configuration.

SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
Don Brown

Joined: Apr 22, 2008
Posts: 25 is mostly a legacy feature that allows you to specify configuration settings, or as they are called in struts.xml, constants. I believe, at this point, is effectively deprecated, however, there are a few bugs open right now of settings that must go into this file and can't go into struts.xml.

Fun fact of the day: you can specify any setting you'd normally put in or struts.xml in web.xml as a filter init parameter for the Struts 2 filter.
I agree. Here's the link:
subject: Struts Properties File
It's not a secret anymore!