Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Greenhorn
Posts: 10
  • 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: 4417
108
  • 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: 9481
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: 10
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!