This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes getInitParameter confusion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "getInitParameter confusion" Watch "getInitParameter confusion" New topic
Author

getInitParameter confusion

Chris Pat
Ranch Hand

Joined: Aug 27, 2005
Posts: 156
Hello
What is the correct syntax in the struts-config.xml
and the syntax in the Action, to establish/retreive an
initialization parameter for the default application. I have
tried:
web.xml
<context-param>
<param-name>totalSamples</param-name>
<param-value>3</param-value>
</context-param>

action
String textNum =totalSamples =
servlet.getInitParameter("totalSamples");

What is the correct way? tia.
 
Don't get me started about those stupid light bulbs.
 
subject: getInitParameter confusion