Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hierarchical Organization of Struts Modules

 
Urso Wieske
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi<br>
<br>
<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>

<pre>
(struts-config-default refix=/)
|
|
/ / \ \
/mod1 /mod2 /mod3 /mod4
</pre>

<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>
<br>
<p>Thanks,<br>
Urso Wieske</p>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic