On Thu, 29 Mar 2001, Nanduri, Amarnath wrote:

> 
> Hi everybody,
> 
>            I am faced with a unique situation. I have at present 45 Action
> classes in my project. In the future this number may climb to more than 100
> ( yeah it is a huge project). We just completed requirements and want to
> make sure that struts can really handle such a heavy load (flow). For some
> of the forwards in the struts_config.xml file there is not yet a defined
> stage as to where to take the user to. For that reason the path is set to an
> empty string. 
> 
> syntax :  <forward name="advanced"              path=""/>
> 
> During the demo i noticed that i get a 404 error when trying to reach this
> page (which is as it should be). I want to keep an indefined state page to
> these. My problem is that i don't want to write the 'undefined.jsp' in each
> and every forward (i confess i am lazy, besides it is dull and monotonous).
> I want to know if there is a flag i can set in the struts-config.xml which
> defines a global undefined state (similar to the 'unknown' attribute for an
> action class). Please note that the forward names are different (in
> different actions). So i can't use a single global forward. 
> 
> Now if one of you gurus out there can find me a  solution i would greatly
> appreciate it.
> 
> cheers,
> Amar..
> 

Constructive laziness is a virtue (not a character flaw) :-)

There's nothing in Struts itself to define a "default" forward, but here
is how I would approach your problem.

* Type the paths as you showed in your example above

* Use the "find and replace" facility of my text editor or IDE to
  replace all occurrences of {path=""} with {path="/undefined.jsp"}
  or whatever is appropriate.



Reply via email to