• 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
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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: 5221
143
  • 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: 9551
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:)
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!