Ted ,
Regarding your reply i hate typing in the same name again and again...
> <forward name="help" path="/help/index.jsp"/>
> <forward name="helpBid" path="/issues.jsp"/>
> <forward name="helpDonate" path="/issues.jsp"/>
> <forward name="helpFacts" path="/issues.jsp"/>
For example you have typed issues.jsp a lot of times. I want to know if
there is a way to utilize the web.xml file.
The following is an excerpt from the web-app_2_2.dtd. Is there anyway i can
use this with struts. For example when struts throws an 404 error (page not
found) the below code can kick into play..........
<!--
The error-page element contains a mapping between an error code
or exception type to the path of a resource in the web application
-->
<!ELEMENT error-page ((error-code | exception-type), location)>
<!--
The error-code contains an HTTP error code, ex: 404
-->
<!ELEMENT error-code (#PCDATA)>
<!--
The exception type contains a fully qualified class name of a
Java exception type.
-->
<!ELEMENT exception-type (#PCDATA)>
<!--
The location element contains the location of the resource in the
web application
-->
<!ELEMENT location (#PCDATA)>
cheers,
Amar..
-----Original Message-----
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 4:08 PM
To: [EMAIL PROTECTED]
Subject: Re: forward in struts-config.xml file
> syntax : <forward name="advanced" path=""/>
What I do is put in the actual name for the forward, and then point the
path to an "under construction page" where I also list any beta-testing
issues.
As the pages come online, you simply need to update the configuration
file -- all the forward links remain the same.
So I have a sections in my struts-config that looks like this:
<forward name="help" path="/help/index.jsp"/>
<forward name="helpBid" path="/issues.jsp"/>
<forward name="helpDonate" path="/issues.jsp"/>
<forward name="helpFacts" path="/issues.jsp"/>
and so forth. (Issues is my "under construction" page.)
The forward and action names should actually be considered part of the
requirements process. If you've built a "straw man" version of the
application, you can usually define them all from that.
I haven't gotten there myself yet, but I have heard of people having
well over a 100 action classes in a Struts applications.
"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..
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/