This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Grokking Bitcoin and have Kalle Rosenbaum on-line!
See this thread for details.
Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • 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
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Rookie question - what does this block of struts 2 configuration do?  RSS feed

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the said xml code:





3 questions:

1. What does this "package" block do at a whole? It looks to me that it's dividing/branching something into a separate module.

2.  How does all those "action" work? Where will they be invoked? I know what they are, they are well, "actions" that are marked in struts.xml with a name so they could be called somewhere, I just don't know the details.

3. There is NO interceptors coming into play in this scenario, right?

My apologies for the very rookie questions?
 
Saloon Keeper
Posts: 5399
143
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think most of that is covered here: https://struts.apache.org/getting-started/hello-world-using-struts2.html
 
Bartender
Posts: 9559
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim posted a good overview of how Struts works in general (your 2nd question).  I'll fill in some of the blanks.

Ted Modler wrote:
1. What does this "package" block do at a whole? It looks to me that it's dividing/branching something into a separate module.


A "package" in Struts lets you split up the configuration (and possibly declare a distinct web context "namespace").  See here

Ted Modler wrote:
3. There is NO interceptors coming into play in this scenario, right?


No.  There are interceptors declared in the default Struts configuration.  The package declaration in your example imports these settings (among others) by extending "struts-default".  See here
 
Ted Modler
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey thanks guys, IJR the extend default thing. Although I forgot how default config works but I know where to find out.

Also thanks for the hello world page:)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!