This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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: 4744
117
  • 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: 9521
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!