Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hierarchical Organization of Struts Modules  RSS feed

Urso Wieske
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<p>I have conceptually organized my web application in two layers. Actually, it's a tree structure whose root (layer one) is associated with the default Struts Module (struts-config-default.xml) and the children of the root (on the second layer) are associated with corresponding Struts Modules (let's day mod1 , mod2, mod3 and mod4).</p>

(struts-config-default refix=/)
/ / \ \
/mod1 /mod2 /mod3 /mod4

<p>The problem is that a module is selfcontained and independent.</p>

<p>What I want based on my tree organization is to define a global exception in my top level module (the default struts module). This global exception declaration applies to all descendant modules mod1 to mod4. AND I DO NOT want to declare a global exception in mod1 to mod4! (After all, what's the point of having redundant declarations which do the samething: handle a system error).
Apparently this approach is not possible because there is no way to tell Struts about the relationship "Parent-Child (i.e. default module - child module mod1 relationship).</p>

<p>A module does not know anything about other modules. They are independent from each other. I 'm in favour for this struts module principle.
But this principle has obviously a downside too.</p>

<p>I have tried to use contextRelative attribute in global exception tag to let Struts know that it should divert to the global-exception in the default module, but this tag does not know anything about the attribute contextRelative.</p>

<p color="#FF0000">Question: does any one has a working solution for this approach?</font>
Urso Wieske</p>
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!