You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michael Delamere <ho...@michael-delamere.de> on 2002/11/05 15:53:30 UTC

Extending the struts config

Eddie,

you said once (if I remeber correctly), that you extended the
struts-config.xml to accommodate your own configuration settings.  

I would appreciate it if you took a minute or two in answering my
questions :-) :

Did this involve a lot of overhead?  

Are you having to change the dtd? - which would require you to update
every time you installed a new struts-version.

Is there an easy way to retrieve the values from you action?

I would be equally happy if you directed me to a good documentation that
might be of some help.

Thanks in advance,

Regards,

Michael




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic select menu in JSP

Posted by John Owen <jo...@hotmail.com>.
Add a Collection to your form bean. Add getter and setter methods to the
form bean. Add code to your action class (usually a prepare-type action) to
look up the data (or call the appropriate facade/delegate method) and
populate the collection on the form. Modify your resultant jsp to use the
Collection in an <html:options> tag within an <html:select> tag. Check the
docs on the struts site for specific details or reply with more specific
questions.
----- Original Message -----
From: "Mark Ayad" <ma...@javamark.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, November 05, 2002 10:01 AM
Subject: Dynamic select menu in JSP


> I would like to know the best method to populate a form in a JSP page with
> dynamic select menu, where the number of options in the select depends on
a
> query to the database. Specifically where is best to place the
functionality
> ?
>
> <html:select property="singleSelect" size="10">
> <html:option value="Single 0">Single 0</html:option>
> <html:option value="Single 1">Single 1</html:option>
> .......
> .......
> <html:option value="Single n">Single n</html:option>
> .......
> </html:select>
>
> Previous to Struts I would have looped aropund a  resultsset.
>
> What do people use ?
>
>
> Regards
>
> Mark
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic select menu in JSP **sigh**

Posted by John Owen <jo...@hotmail.com>.
I don't know what <html:optionsCollection> is, but for your purposes, I
would use <html:options> backed by a Collection as I mentioned earlier.

John
----- Original Message -----
From: "Mark Ayad" <ma...@javamark.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, November 05, 2002 11:02 AM
Subject: Re: Dynamic select menu in JSP **sigh**


> Not worried.
>
> But something I'm planning for the future should help everyone with API's
> jar versions and examples. A little project I'm dreaming up. I'm sure If
ask
> ask for a show of hand I'll get this project off the ground.
>
> Still I've made progress.
>
> Not sure what's the difference with:
>
> <html:optionsCollection
>
> <html:options
>
> But if I dig I might find out.
>
> ----- Original Message -----
> From: "John Owen" <jo...@hotmail.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Tuesday, November 05, 2002 5:47 PM
> Subject: Re: Dynamic select menu in JSP
>
>
> > Don't worry, Mark. If there were an adequate example in the Struts docs,
> you
> > would have a better idea how to start and what questions to ask.
However,
> > you have to use this list or scour the internet for examples.
> > ----- Original Message -----
> > From: "Mark Ayad" <ma...@javamark.com>
> > To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > Sent: Tuesday, November 05, 2002 10:39 AM
> > Subject: Re: Dynamic select menu in JSP
> >
> >
> > > **gasp**
> > >
> > > Sure, but its knowing the right question to ask first .
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "Eddie Bush" <ek...@swbell.net>
> > > To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > > Sent: Tuesday, November 05, 2002 6:27 PM
> > > Subject: Re: Dynamic select menu in JSP
> > >
> > >
> > > > *sigh*
> > > >
> > > > There have been a number of topics going on about doing such things
> > > > lately.  Obviously, using the <html:option> tag is less than ideal.
> > > >  Have you looked at <html:options/> yet?  I think you'll find a much
> > > > better implementation possible using it instead of <html:option/>.
> > > >
> > > > STMA (Search the Mail Archive) - most notably the last 7 days.
You're
> > > > guaranteed to find a message that gives explicit usage instructions.
> A
> > > > hint:  populate the property that represents your options in an
> action.
> > > >  If that doesn't make sense now, it will once you do some research
on
> > > > how to use <html:options/>.  If it doesn't, just let us know.
> > > >
> > > > Mark Ayad wrote:
> > > >
> > > > >I would like to know the best method to populate a form in a JSP
page
> > > with
> > > > >dynamic select menu, where the number of options in the select
> depends
> > on
> > > a
> > > > >query to the database. Specifically where is best to place the
> > > functionality
> > > > >?
> > > > >
> > > > ><html:select property="singleSelect" size="10">
> > > > ><html:option value="Single 0">Single 0</html:option>
> > > > ><html:option value="Single 1">Single 1</html:option>
> > > > >.......
> > > > >.......
> > > > ><html:option value="Single n">Single n</html:option>
> > > > >.......
> > > > ></html:select>
> > > > >
> > > > >Previous to Struts I would have looped aropund a  resultsset.
> > > > >
> > > > >What do people use ?
> > > > >
> > > > >
> > > > >Regards
> > > > >
> > > > >Mark
> > > > >
> > > >
> > > > --
> > > > Eddie Bush
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > > >
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic select menu in JSP **sigh**

Posted by Mark Ayad <ma...@javamark.com>.
Not worried.

But something I'm planning for the future should help everyone with API's
jar versions and examples. A little project I'm dreaming up. I'm sure If ask
ask for a show of hand I'll get this project off the ground.

Still I've made progress.

Not sure what's the difference with:

<html:optionsCollection

<html:options

But if I dig I might find out.

----- Original Message -----
From: "John Owen" <jo...@hotmail.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, November 05, 2002 5:47 PM
Subject: Re: Dynamic select menu in JSP


> Don't worry, Mark. If there were an adequate example in the Struts docs,
you
> would have a better idea how to start and what questions to ask. However,
> you have to use this list or scour the internet for examples.
> ----- Original Message -----
> From: "Mark Ayad" <ma...@javamark.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Tuesday, November 05, 2002 10:39 AM
> Subject: Re: Dynamic select menu in JSP
>
>
> > **gasp**
> >
> > Sure, but its knowing the right question to ask first .
> >
> >
> >
> > ----- Original Message -----
> > From: "Eddie Bush" <ek...@swbell.net>
> > To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > Sent: Tuesday, November 05, 2002 6:27 PM
> > Subject: Re: Dynamic select menu in JSP
> >
> >
> > > *sigh*
> > >
> > > There have been a number of topics going on about doing such things
> > > lately.  Obviously, using the <html:option> tag is less than ideal.
> > >  Have you looked at <html:options/> yet?  I think you'll find a much
> > > better implementation possible using it instead of <html:option/>.
> > >
> > > STMA (Search the Mail Archive) - most notably the last 7 days.  You're
> > > guaranteed to find a message that gives explicit usage instructions.
A
> > > hint:  populate the property that represents your options in an
action.
> > >  If that doesn't make sense now, it will once you do some research on
> > > how to use <html:options/>.  If it doesn't, just let us know.
> > >
> > > Mark Ayad wrote:
> > >
> > > >I would like to know the best method to populate a form in a JSP page
> > with
> > > >dynamic select menu, where the number of options in the select
depends
> on
> > a
> > > >query to the database. Specifically where is best to place the
> > functionality
> > > >?
> > > >
> > > ><html:select property="singleSelect" size="10">
> > > ><html:option value="Single 0">Single 0</html:option>
> > > ><html:option value="Single 1">Single 1</html:option>
> > > >.......
> > > >.......
> > > ><html:option value="Single n">Single n</html:option>
> > > >.......
> > > ></html:select>
> > > >
> > > >Previous to Struts I would have looped aropund a  resultsset.
> > > >
> > > >What do people use ?
> > > >
> > > >
> > > >Regards
> > > >
> > > >Mark
> > > >
> > >
> > > --
> > > Eddie Bush
> > >
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic select menu in JSP

Posted by John Owen <jo...@hotmail.com>.
Don't worry, Mark. If there were an adequate example in the Struts docs, you
would have a better idea how to start and what questions to ask. However,
you have to use this list or scour the internet for examples.
----- Original Message -----
From: "Mark Ayad" <ma...@javamark.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, November 05, 2002 10:39 AM
Subject: Re: Dynamic select menu in JSP


> **gasp**
>
> Sure, but its knowing the right question to ask first .
>
>
>
> ----- Original Message -----
> From: "Eddie Bush" <ek...@swbell.net>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Tuesday, November 05, 2002 6:27 PM
> Subject: Re: Dynamic select menu in JSP
>
>
> > *sigh*
> >
> > There have been a number of topics going on about doing such things
> > lately.  Obviously, using the <html:option> tag is less than ideal.
> >  Have you looked at <html:options/> yet?  I think you'll find a much
> > better implementation possible using it instead of <html:option/>.
> >
> > STMA (Search the Mail Archive) - most notably the last 7 days.  You're
> > guaranteed to find a message that gives explicit usage instructions.  A
> > hint:  populate the property that represents your options in an action.
> >  If that doesn't make sense now, it will once you do some research on
> > how to use <html:options/>.  If it doesn't, just let us know.
> >
> > Mark Ayad wrote:
> >
> > >I would like to know the best method to populate a form in a JSP page
> with
> > >dynamic select menu, where the number of options in the select depends
on
> a
> > >query to the database. Specifically where is best to place the
> functionality
> > >?
> > >
> > ><html:select property="singleSelect" size="10">
> > ><html:option value="Single 0">Single 0</html:option>
> > ><html:option value="Single 1">Single 1</html:option>
> > >.......
> > >.......
> > ><html:option value="Single n">Single n</html:option>
> > >.......
> > ></html:select>
> > >
> > >Previous to Struts I would have looped aropund a  resultsset.
> > >
> > >What do people use ?
> > >
> > >
> > >Regards
> > >
> > >Mark
> > >
> >
> > --
> > Eddie Bush
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic select menu in JSP

Posted by Mark Ayad <ma...@javamark.com>.
Eddie Don't do my research um - I got a PhD in Molecular Physics and
Nanotechnology for doing some very good research. Oh and then there was Bell
Labs.

Oh never used Google whats that ?

With 52,000 mails and a very poor interface, a.k.a you can't even order by
date ?
I'll know not to post so fast in future for fear of being made an example of
by Eddie.

However if the framework is so simple why is there 52,000 mail comparable
with Tomcat ?


----- Original Message -----
From: "Eddie Bush" <ek...@swbell.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, November 06, 2002 12:42 AM
Subject: Re: Dynamic select menu in JSP


> Try "Struts html:option" - works super.  I actually did try it :-)  I
> didn't get as good of a return as I expected though :-/  I'm sure I
> could refine it better and get a better return, but, as I was just doing
> it to ensure I was getting back relevant data, I didn't investigate it
> thoroughly.
>
> The point is valid though :-) Far too few people actually take the time
> to do any research on their question before asking.  Chances are, if you
> have a problem, someone has already run into it and likely solved it as
> well.  The first thing I do when I hit a "rough spot" is look around -
> Google is my first stop.  I'll try a few (anywhere from 3-5) different
> permutations of relevant keywords (doing things such as removing that
> troublesome colon) and see what I get.  Most of the time that's ...
> plenty :-)  There are times it does not suffice.
>
> John Owen wrote:
>
> >When you put "html:option" in the search box it doesn't work. At least,
it
> >never has for me. The ':' screws it up and searching on "option" or "html
> >option" is not viable. I'm going to reiterate that if the Struts docs had
> >good examples of implementation, a lot of repetitive questions could be
> >avoided. I would gladly update the documentation if I had the time.
> >
> >John
> >
>
> --
> Eddie Bush
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic select menu in JSP

Posted by "V. Cekvenich" <vi...@users.sourceforge.net>.
Regarding menus, I use struts - menu from sourceforge.
You can see struts menu runing at baseBeans.com live.
.V

John Owen wrote:
> I just tried "Struts html:option","Struts html:options","html:options" and
> "html:option" in the mail archive for struts-user and neither search
> returned results.
> 
> John
> ----- Original Message -----
> From: "Eddie Bush" <ek...@swbell.net>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Tuesday, November 05, 2002 5:42 PM
> Subject: Re: Dynamic select menu in JSP
> 
> 
> 
>>Try "Struts html:option" - works super.  I actually did try it :-)  I
>>didn't get as good of a return as I expected though :-/  I'm sure I
>>could refine it better and get a better return, but, as I was just doing
>>it to ensure I was getting back relevant data, I didn't investigate it
>>thoroughly.
>>
>>The point is valid though :-) Far too few people actually take the time
>>to do any research on their question before asking.  Chances are, if you
>>have a problem, someone has already run into it and likely solved it as
>>well.  The first thing I do when I hit a "rough spot" is look around -
>>Google is my first stop.  I'll try a few (anywhere from 3-5) different
>>permutations of relevant keywords (doing things such as removing that
>>troublesome colon) and see what I get.  Most of the time that's ...
>>plenty :-)  There are times it does not suffice.
>>
>>John Owen wrote:
>>
>>
>>>When you put "html:option" in the search box it doesn't work. At least,
>>
> it
> 
>>>never has for me. The ':' screws it up and searching on "option" or "html
>>>option" is not viable. I'm going to reiterate that if the Struts docs had
>>>good examples of implementation, a lot of repetitive questions could be
>>>avoided. I would gladly update the documentation if I had the time.
>>>
>>>John
>>>
>>
>>--
>>Eddie Bush
>>
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
> 
> <ma...@jakarta.apache.org>
> 
>>For additional commands, e-mail:
> 
> <ma...@jakarta.apache.org>
> 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic select menu in JSP

Posted by John Owen <jo...@hotmail.com>.
I just tried "Struts html:option","Struts html:options","html:options" and
"html:option" in the mail archive for struts-user and neither search
returned results.

John
----- Original Message -----
From: "Eddie Bush" <ek...@swbell.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, November 05, 2002 5:42 PM
Subject: Re: Dynamic select menu in JSP


> Try "Struts html:option" - works super.  I actually did try it :-)  I
> didn't get as good of a return as I expected though :-/  I'm sure I
> could refine it better and get a better return, but, as I was just doing
> it to ensure I was getting back relevant data, I didn't investigate it
> thoroughly.
>
> The point is valid though :-) Far too few people actually take the time
> to do any research on their question before asking.  Chances are, if you
> have a problem, someone has already run into it and likely solved it as
> well.  The first thing I do when I hit a "rough spot" is look around -
> Google is my first stop.  I'll try a few (anywhere from 3-5) different
> permutations of relevant keywords (doing things such as removing that
> troublesome colon) and see what I get.  Most of the time that's ...
> plenty :-)  There are times it does not suffice.
>
> John Owen wrote:
>
> >When you put "html:option" in the search box it doesn't work. At least,
it
> >never has for me. The ':' screws it up and searching on "option" or "html
> >option" is not viable. I'm going to reiterate that if the Struts docs had
> >good examples of implementation, a lot of repetitive questions could be
> >avoided. I would gladly update the documentation if I had the time.
> >
> >John
> >
>
> --
> Eddie Bush
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic select menu in JSP

Posted by "V. Cekvenich" <vi...@users.sourceforge.net>.
Thanks. I did not even think of that.
.V

Eddie Bush wrote:
> Try "Struts html:option" - works super.  I actually did try it :-)  I 
> didn't get as good of a return as I expected though :-/  I'm sure I 
> could refine it better and get a better return, but, as I was just doing 
> it to ensure I was getting back relevant data, I didn't investigate it 
> thoroughly.
> 
> The point is valid though :-) Far too few people actually take the time 
> to do any research on their question before asking.  Chances are, if you 
> have a problem, someone has already run into it and likely solved it as 
> well.  The first thing I do when I hit a "rough spot" is look around - 
> Google is my first stop.  I'll try a few (anywhere from 3-5) different 
> permutations of relevant keywords (doing things such as removing that 
> troublesome colon) and see what I get.  Most of the time that's ... 
> plenty :-)  There are times it does not suffice.
> 
> John Owen wrote:
> 
>> When you put "html:option" in the search box it doesn't work. At 
>> least, it
>> never has for me. The ':' screws it up and searching on "option" or "html
>> option" is not viable. I'm going to reiterate that if the Struts docs had
>> good examples of implementation, a lot of repetitive questions could be
>> avoided. I would gladly update the documentation if I had the time.
>>
>> John
>>
> 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic select menu in JSP

Posted by Eddie Bush <ek...@swbell.net>.
Try "Struts html:option" - works super.  I actually did try it :-)  I 
didn't get as good of a return as I expected though :-/  I'm sure I 
could refine it better and get a better return, but, as I was just doing 
it to ensure I was getting back relevant data, I didn't investigate it 
thoroughly.

The point is valid though :-) Far too few people actually take the time 
to do any research on their question before asking.  Chances are, if you 
have a problem, someone has already run into it and likely solved it as 
well.  The first thing I do when I hit a "rough spot" is look around - 
Google is my first stop.  I'll try a few (anywhere from 3-5) different 
permutations of relevant keywords (doing things such as removing that 
troublesome colon) and see what I get.  Most of the time that's ... 
plenty :-)  There are times it does not suffice.

John Owen wrote:

>When you put "html:option" in the search box it doesn't work. At least, it
>never has for me. The ':' screws it up and searching on "option" or "html
>option" is not viable. I'm going to reiterate that if the Struts docs had
>good examples of implementation, a lot of repetitive questions could be
>avoided. I would gladly update the documentation if I had the time.
>
>John
>

-- 
Eddie Bush





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic select menu in JSP

Posted by John Owen <jo...@hotmail.com>.
When you put "html:option" in the search box it doesn't work. At least, it
never has for me. The ':' screws it up and searching on "option" or "html
option" is not viable. I'm going to reiterate that if the Struts docs had
good examples of implementation, a lot of repetitive questions could be
avoided. I would gladly update the documentation if I had the time.

John
----- Original Message -----
From: "Eddie Bush" <ek...@swbell.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, November 05, 2002 4:59 PM
Subject: Re: Dynamic select menu in JSP


> That's a very valid point.  Did you, in the course of asking to be put
> on the list, actually read:
>
> http://www.tuxedo.org/~esr/faqs/smart-questions.html
>
> ... or just look for the link that said "sign me up!" ? :-)  Not trying
> to be difficult - I'm just honestly curious ;-)  I would be willing to
> wager (and I'm not a betting man) that if you searched for html:option
> you'd find several suggestions to "use html:options instead" - and some
> of even those likely have explicit details as well :-)
>
> I'm not in the habit of holding grudges, so don't feel *too bad*.
>  You're far from the first to ask a repetitive question, and I doubt
> you'll be the last.  It would be nice if folks exercised their
> STFW-related brain cells though :-)
>
> (Sorry - not trying to single you out - this particular question is
> occassionally asked and answered as many as three times in a single day
> though - I can't remember the last week that passed without at least a
> single query on it.)
>
> Peace ;-)
>
> Mark Ayad wrote:
>
> >**gasp**
> >
> >Sure, but its knowing the right question to ask first .
> >
>
> --
> Eddie Bush
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic select menu in JSP

Posted by Eddie Bush <ek...@swbell.net>.
That's a very valid point.  Did you, in the course of asking to be put 
on the list, actually read:

http://www.tuxedo.org/~esr/faqs/smart-questions.html

... or just look for the link that said "sign me up!" ? :-)  Not trying 
to be difficult - I'm just honestly curious ;-)  I would be willing to 
wager (and I'm not a betting man) that if you searched for html:option 
you'd find several suggestions to "use html:options instead" - and some 
of even those likely have explicit details as well :-)

I'm not in the habit of holding grudges, so don't feel *too bad*. 
 You're far from the first to ask a repetitive question, and I doubt 
you'll be the last.  It would be nice if folks exercised their 
STFW-related brain cells though :-)

(Sorry - not trying to single you out - this particular question is 
occassionally asked and answered as many as three times in a single day 
though - I can't remember the last week that passed without at least a 
single query on it.)

Peace ;-)

Mark Ayad wrote:

>**gasp**
>
>Sure, but its knowing the right question to ask first .
>

-- 
Eddie Bush




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic select menu in JSP

Posted by Mark Ayad <ma...@javamark.com>.
**gasp**

Sure, but its knowing the right question to ask first .



----- Original Message -----
From: "Eddie Bush" <ek...@swbell.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, November 05, 2002 6:27 PM
Subject: Re: Dynamic select menu in JSP


> *sigh*
>
> There have been a number of topics going on about doing such things
> lately.  Obviously, using the <html:option> tag is less than ideal.
>  Have you looked at <html:options/> yet?  I think you'll find a much
> better implementation possible using it instead of <html:option/>.
>
> STMA (Search the Mail Archive) - most notably the last 7 days.  You're
> guaranteed to find a message that gives explicit usage instructions.  A
> hint:  populate the property that represents your options in an action.
>  If that doesn't make sense now, it will once you do some research on
> how to use <html:options/>.  If it doesn't, just let us know.
>
> Mark Ayad wrote:
>
> >I would like to know the best method to populate a form in a JSP page
with
> >dynamic select menu, where the number of options in the select depends on
a
> >query to the database. Specifically where is best to place the
functionality
> >?
> >
> ><html:select property="singleSelect" size="10">
> ><html:option value="Single 0">Single 0</html:option>
> ><html:option value="Single 1">Single 1</html:option>
> >.......
> >.......
> ><html:option value="Single n">Single n</html:option>
> >.......
> ></html:select>
> >
> >Previous to Struts I would have looped aropund a  resultsset.
> >
> >What do people use ?
> >
> >
> >Regards
> >
> >Mark
> >
>
> --
> Eddie Bush
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic select menu in JSP

Posted by Eddie Bush <ek...@swbell.net>.
*sigh*

There have been a number of topics going on about doing such things 
lately.  Obviously, using the <html:option> tag is less than ideal. 
 Have you looked at <html:options/> yet?  I think you'll find a much 
better implementation possible using it instead of <html:option/>.

STMA (Search the Mail Archive) - most notably the last 7 days.  You're 
guaranteed to find a message that gives explicit usage instructions.  A 
hint:  populate the property that represents your options in an action. 
 If that doesn't make sense now, it will once you do some research on 
how to use <html:options/>.  If it doesn't, just let us know.

Mark Ayad wrote:

>I would like to know the best method to populate a form in a JSP page with
>dynamic select menu, where the number of options in the select depends on a
>query to the database. Specifically where is best to place the functionality
>?
>
><html:select property="singleSelect" size="10">
><html:option value="Single 0">Single 0</html:option>
><html:option value="Single 1">Single 1</html:option>
>.......
>.......
><html:option value="Single n">Single n</html:option>
>.......
></html:select>
>
>Previous to Struts I would have looped aropund a  resultsset.
>
>What do people use ?
>
>
>Regards
>
>Mark
>

-- 
Eddie Bush





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic select menu in JSP

Posted by Mark Ayad <ma...@javamark.com>.
Thanks John

----- Original Message -----
From: "John Owen" <jo...@hotmail.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, November 05, 2002 5:06 PM
Subject: Re: Dynamic select menu in JSP


> Here's an example of the jsp code :
>
>       <html:select property="defaultEmployee">
>         <html:options property="employeeValues"
> labelProperty="employeeLabels"/>
>       </html:select>
>
> defaultEmployee is a String representing the 'selected' value,
> employeeValues is a Collection that contains the values for each option,
> employeeLabels is a Collection that contains the labels displayed in the
> drop-down. These variables are all defined in the form bean used by the
jsp
> defined in the action mapping in your struts-config.xml. The Collections
are
> populated in an action class that is used to prepare the form before the
> user sees the jsp page.
>
> John
> ----- Original Message -----
> From: "Mark Ayad" <ma...@javamark.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Tuesday, November 05, 2002 10:01 AM
> Subject: Dynamic select menu in JSP
>
>
> > I would like to know the best method to populate a form in a JSP page
with
> > dynamic select menu, where the number of options in the select depends
on
> a
> > query to the database. Specifically where is best to place the
> functionality
> > ?
> >
> > <html:select property="singleSelect" size="10">
> > <html:option value="Single 0">Single 0</html:option>
> > <html:option value="Single 1">Single 1</html:option>
> > .......
> > .......
> > <html:option value="Single n">Single n</html:option>
> > .......
> > </html:select>
> >
> > Previous to Struts I would have looped aropund a  resultsset.
> >
> > What do people use ?
> >
> >
> > Regards
> >
> > Mark
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic select menu in JSP

Posted by John Owen <jo...@hotmail.com>.
Here's an example of the jsp code :

      <html:select property="defaultEmployee">
        <html:options property="employeeValues"
labelProperty="employeeLabels"/>
      </html:select>

defaultEmployee is a String representing the 'selected' value,
employeeValues is a Collection that contains the values for each option,
employeeLabels is a Collection that contains the labels displayed in the
drop-down. These variables are all defined in the form bean used by the jsp
defined in the action mapping in your struts-config.xml. The Collections are
populated in an action class that is used to prepare the form before the
user sees the jsp page.

John
----- Original Message -----
From: "Mark Ayad" <ma...@javamark.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, November 05, 2002 10:01 AM
Subject: Dynamic select menu in JSP


> I would like to know the best method to populate a form in a JSP page with
> dynamic select menu, where the number of options in the select depends on
a
> query to the database. Specifically where is best to place the
functionality
> ?
>
> <html:select property="singleSelect" size="10">
> <html:option value="Single 0">Single 0</html:option>
> <html:option value="Single 1">Single 1</html:option>
> .......
> .......
> <html:option value="Single n">Single n</html:option>
> .......
> </html:select>
>
> Previous to Struts I would have looped aropund a  resultsset.
>
> What do people use ?
>
>
> Regards
>
> Mark
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Dynamic select menu in JSP

Posted by Mark Ayad <ma...@javamark.com>.
I would like to know the best method to populate a form in a JSP page with
dynamic select menu, where the number of options in the select depends on a
query to the database. Specifically where is best to place the functionality
?

<html:select property="singleSelect" size="10">
<html:option value="Single 0">Single 0</html:option>
<html:option value="Single 1">Single 1</html:option>
.......
.......
<html:option value="Single n">Single n</html:option>
.......
</html:select>

Previous to Struts I would have looped aropund a  resultsset.

What do people use ?


Regards

Mark





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Extending the struts config

Posted by Joe Germuska <Jo...@Germuska.com>.
At 4:14 PM +0100 2002/11/05, Michael Delamere wrote:
>Well, I tried adding a parameter to my action mapping and SAX
>complained!  (Must be declared etc...)

I believe that the warnings are still issued, but Struts works 
anyway.  Here's the CVS log for ActionServlet:

>revision 1.118
>date: 2002/07/24 05:28:04;  author: craigmcc;  state: Exp;  lines: +17 -5
>Remove the dependence in our configuration beans on default values that are
>established in the DTD, which were requiring us to do a validating parse.
>Re-enable the "validating" init parameter, which defaults to performing a
>validating parse but allows disabling it.

So it may be that you need to disable the validating parse in the web.xml file.

Joe


-- 
--
* Joe Germuska    { joe@germuska.com }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble.... As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
	--Sam Goody, 1956

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Extending the struts config

Posted by Michael Delamere <ho...@michael-delamere.de>.
Well, I tried adding a parameter to my action mapping and SAX
complained!  (Must be declared etc...)

Thanks for your tips - I will take them into account when making my
final decision on how I will go about doing it!

Regards,

Michael


-----Original Message-----
From: Joe Germuska [mailto:Joe@Germuska.com] 
Sent: Dienstag, 5. November 2002 16:04
To: Struts Users Mailing List
Subject: Re: Extending the struts config

For a couple of months now Struts has not required a *valid* 
struts-config.xml file, which is very helpful.  In a general sense 
you can subclass the various configuration classes (like 
ActionMapping) and set arbitrary properties on them in struts-config 
(with <set-property>).  It may be cleanest to use a property like 
that to pass in a uri reference to another config file -- I find that 
struts-config.xml gets too big anyway.

Eddie may have more specific experience with actually changing the 
DTD for struts-config.xml but there are ways around it.

Joe


At 3:53 PM +0100 2002/11/05, Michael Delamere wrote:
>Eddie,
>
>you said once (if I remeber correctly), that you extended the
>struts-config.xml to accommodate your own configuration settings. 
>
>I would appreciate it if you took a minute or two in answering my
>questions :-) :
>
>Did this involve a lot of overhead? 
>
>Are you having to change the dtd? - which would require you to update
>every time you installed a new struts-version.
>
>Is there an easy way to retrieve the values from you action?
>
>I would be equally happy if you directed me to a good documentation
that
>might be of some help.
>
>Thanks in advance,
>
>Regards,
>
>Michael
>
>
>
>
>--
>To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
>For additional commands, e-mail:
<ma...@jakarta.apache.org>


-- 
--
* Joe Germuska    { joe@germuska.com }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble.... As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
	--Sam Goody, 1956

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Extending the struts config

Posted by Joe Germuska <Jo...@Germuska.com>.
For a couple of months now Struts has not required a *valid* 
struts-config.xml file, which is very helpful.  In a general sense 
you can subclass the various configuration classes (like 
ActionMapping) and set arbitrary properties on them in struts-config 
(with <set-property>).  It may be cleanest to use a property like 
that to pass in a uri reference to another config file -- I find that 
struts-config.xml gets too big anyway.

Eddie may have more specific experience with actually changing the 
DTD for struts-config.xml but there are ways around it.

Joe


At 3:53 PM +0100 2002/11/05, Michael Delamere wrote:
>Eddie,
>
>you said once (if I remeber correctly), that you extended the
>struts-config.xml to accommodate your own configuration settings. 
>
>I would appreciate it if you took a minute or two in answering my
>questions :-) :
>
>Did this involve a lot of overhead? 
>
>Are you having to change the dtd? - which would require you to update
>every time you installed a new struts-version.
>
>Is there an easy way to retrieve the values from you action?
>
>I would be equally happy if you directed me to a good documentation that
>might be of some help.
>
>Thanks in advance,
>
>Regards,
>
>Michael
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>


-- 
--
* Joe Germuska    { joe@germuska.com }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble.... As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
	--Sam Goody, 1956

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Extending the struts config

Posted by Michael Delamere <ho...@michael-delamere.de>.
Hi,

wow - that´s just the kind of answer I was looking for!  I´ve been long
enough in this list to know who to ask if I want a long and thorough answer
;-) !!  Thanks very much!

Ok, so obviously I didn´t remember every detail, but I knew it was something
along those lines.

I think that your approach is a good one and I will certainly have a go at
it!  My requirements are infact also pretty view-centric so I think the
plugin idea is quite sufficient.

> commons-digester is supercalafragilisticexpealedociously cool.

Ok.... sounds good to me ;-) !  I will certainly give it a go.  Now if there
is one thing I have learnt, then it is this:  It´s just a matter of getting
your head down and learning the stuff!  I don´t believe in something being
too hard (in terms of programming anyway :-) ), it´s just a question of
wether it makes sense or not.  I remembered that you had mentioned doing
something similar and was hoping that you would share your experience - so,
thanks for that!

>  I can't imagine a simpler approach to making your
> configuration declarative (versus programatic - ack - do you really want
> to change code to change your config?  Not me!)

Couldn´t agree with you more!

> Look at the PlugIn implementations available in Struts and
> then if you still have questions I can shoot you a skelleton.

I´ll take your word for it :-) ...

Regards,

Michael


----- Original Message -----
From: "Eddie Bush" <ek...@swbell.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, November 05, 2002 10:37 PM
Subject: Re: Extending the struts config


> Michael Delamere wrote:
>
> >Eddie,
> >
> >you said once (if I remeber correctly), that you extended the
> >struts-config.xml to accommodate your own configuration settings.
> >
> Incorrect.  I used a seperate XML config and used digester to
> parse/instantiate things.
>
> >I would appreciate it if you took a minute or two in answering my
> >questions :-) :
> >
> >Did this involve a lot of overhead?
> >
> org.apache.commons.digester - see that package description.  It's *cake*!
>
> >Are you having to change the dtd? - which would require you to update
> >every time you installed a new struts-version.
> >
> Nope.  ... and that's why I tacked mine on instead of making it core.
>  Remember, I'm "XML- and DTD-stupid (TM)".
>
> >Is there an easy way to retrieve the values from you action?
> >
> Well, assuming you poke whatever you create into some reasonable scope
> (application!), and utilizing some reasonable scheme (so different
> modules don't trample each other), you have access to it wherever you
like.
>
> >I would be equally happy if you directed me to a good documentation that
> >might be of some help.
> >
> See org.apache.struts.action.PlugIn for how you'll do your
> initialization.  There are several digester examples in the Struts
> code-base.  Look at the PlugIn implementations available in Struts and
> then if you still have questions I can shoot you a skelleton.  In fact,
> I think I posted one to the list some time back.  I've been intending to
> add an example to the User Guide too - will try to do that sometime soon.
>
> >Thanks in advance,
> >
> >Regards,
> >
> >Michael
> >
> Anytime ;-)
>
> commons-digester is supercalafragilisticexpealedociously cool.  If
> you're looking at adding some custom "thing" to Struts, I highly
> recommend it.  I can't imagine a simpler approach to making your
> configuration declarative (versus programatic - ack - do you really want
> to change code to change your config?  Not me!)  The rules you setup can
> be a bit difficult to understand at first, but, with some requisite
> amount of tinkering (doesn't take a lot) you'll figure it out fast.  If
> you do hit problems just yell.
>
> Game Plan:
>
> 1 - Conceive an XML representation of the structure you wish to create
> (structure = composition of objects - ApplicationConfig contains
> ActionConfig etc).
> 2 - Generate a set of rules for digester that will do what you want with
> the structure you've conceived.
> 3 - Write an implementation of the o.a.s.a.PlugIn interface that will
> actually load things and put them into scope.
> 4 - Include your PlugIn implementation in your struts-config.xml
> 5 - Sit back and radiate pride for having built an add-on component that
> can be included in each module.
>
> Notes:
>     - *could* take one config file for the entire application
>     - *should* (probably) allow one config file per module (using a
> scheme akin to what Struts does - or something else that guarantees
> uniqueness)
>     - There's really no rule here - do what makes sense for *your*
> application
>
> My approach was to just programatically setup the rules in the PlugIn by
> calling various digester.addXXX methods (you'll see).  You can also use
> plugable rulesets.  For what I'm doing I just didn't see the advantage.
>  My stuff was pretty view-centric (and Struts-centric, at that), so I
> don't really envision it ever being useful outside of Struts - or a
> servlet container, for that matter.
>
> If what you're doing is web-centric, but not Struts-centric, you may
> wish to use a ContextListener instead of a PlugIn implementation.  If
> what you're doing requires some information from the Struts config (as
> mine did), then you'll most certainly find a PlugIn implementation a
> cleaner solution.
>
> I did not provide a DTD for my XML config.  You may wish to.  Digester
> supports this (though I can't speak to how easy it is to implement - my
> guess is that part is easy too).
>
> Good Luck!  Yell back if you have problems.
>
> --
> Eddie Bush
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Extending the struts config

Posted by Eddie Bush <ek...@swbell.net>.
You betcha man ;-)

Michael Delamere wrote:

>Thank you!
>

-- 
Eddie Bush





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Extending the struts config

Posted by Michael Delamere <ho...@michael-delamere.de>.
Thank you!

----- Original Message -----
From: "Craig R. McClanahan" <cr...@apache.org>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, November 06, 2002 12:16 AM
Subject: Re: Extending the struts config


>
>
> On Tue, 5 Nov 2002, Eddie Bush wrote:
>
> > Date: Tue, 05 Nov 2002 15:37:54 -0600
> > From: Eddie Bush <ek...@swbell.net>
> > Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> > To: Struts Users Mailing List <st...@jakarta.apache.org>
> > Subject: Re: Extending the struts config
> >
> > Michael Delamere wrote:
> >
> > >Eddie,
> > >
> > >you said once (if I remeber correctly), that you extended the
> > >struts-config.xml to accommodate your own configuration settings.
> > >
> > Incorrect.  I used a seperate XML config and used digester to
> > parse/instantiate things.
> >
>
> With the latest nightly builds (i.e. since 1.1b2) you actually *can* do
> this.  You have to set the servlet init parameter "validating" to false,
> because otherwise your extended struts-config.xml file will not pass DTD
> validation (which is on by default).
>
> You'll still need to parse the struts-config.xml file yourself in order to
> read the extra elements; the standard parse will simply ignore them.
> Digester is useful for that.
>
> Craig
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Extending the struts config

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 5 Nov 2002, Eddie Bush wrote:

> Date: Tue, 05 Nov 2002 15:37:54 -0600
> From: Eddie Bush <ek...@swbell.net>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: Struts Users Mailing List <st...@jakarta.apache.org>
> Subject: Re: Extending the struts config
>
> Michael Delamere wrote:
>
> >Eddie,
> >
> >you said once (if I remeber correctly), that you extended the
> >struts-config.xml to accommodate your own configuration settings.
> >
> Incorrect.  I used a seperate XML config and used digester to
> parse/instantiate things.
>

With the latest nightly builds (i.e. since 1.1b2) you actually *can* do
this.  You have to set the servlet init parameter "validating" to false,
because otherwise your extended struts-config.xml file will not pass DTD
validation (which is on by default).

You'll still need to parse the struts-config.xml file yourself in order to
read the extra elements; the standard parse will simply ignore them.
Digester is useful for that.

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Extending the struts config

Posted by Eddie Bush <ek...@swbell.net>.
Michael Delamere wrote:

>Eddie,
>
>you said once (if I remeber correctly), that you extended the
>struts-config.xml to accommodate your own configuration settings.  
>
Incorrect.  I used a seperate XML config and used digester to 
parse/instantiate things.

>I would appreciate it if you took a minute or two in answering my
>questions :-) :
>
>Did this involve a lot of overhead?  
>
org.apache.commons.digester - see that package description.  It's *cake*!

>Are you having to change the dtd? - which would require you to update
>every time you installed a new struts-version.
>
Nope.  ... and that's why I tacked mine on instead of making it core. 
 Remember, I'm "XML- and DTD-stupid (TM)".

>Is there an easy way to retrieve the values from you action?
>
Well, assuming you poke whatever you create into some reasonable scope 
(application!), and utilizing some reasonable scheme (so different 
modules don't trample each other), you have access to it wherever you like.

>I would be equally happy if you directed me to a good documentation that
>might be of some help.
>
See org.apache.struts.action.PlugIn for how you'll do your 
initialization.  There are several digester examples in the Struts 
code-base.  Look at the PlugIn implementations available in Struts and 
then if you still have questions I can shoot you a skelleton.  In fact, 
I think I posted one to the list some time back.  I've been intending to 
add an example to the User Guide too - will try to do that sometime soon.

>Thanks in advance,
>
>Regards,
>
>Michael
>
Anytime ;-)

commons-digester is supercalafragilisticexpealedociously cool.  If 
you're looking at adding some custom "thing" to Struts, I highly 
recommend it.  I can't imagine a simpler approach to making your 
configuration declarative (versus programatic - ack - do you really want 
to change code to change your config?  Not me!)  The rules you setup can 
be a bit difficult to understand at first, but, with some requisite 
amount of tinkering (doesn't take a lot) you'll figure it out fast.  If 
you do hit problems just yell.

Game Plan:

1 - Conceive an XML representation of the structure you wish to create 
(structure = composition of objects - ApplicationConfig contains 
ActionConfig etc).
2 - Generate a set of rules for digester that will do what you want with 
the structure you've conceived.
3 - Write an implementation of the o.a.s.a.PlugIn interface that will 
actually load things and put them into scope.
4 - Include your PlugIn implementation in your struts-config.xml
5 - Sit back and radiate pride for having built an add-on component that 
can be included in each module.

Notes:
    - *could* take one config file for the entire application
    - *should* (probably) allow one config file per module (using a 
scheme akin to what Struts does - or something else that guarantees 
uniqueness)
    - There's really no rule here - do what makes sense for *your* 
application

My approach was to just programatically setup the rules in the PlugIn by 
calling various digester.addXXX methods (you'll see).  You can also use 
plugable rulesets.  For what I'm doing I just didn't see the advantage. 
 My stuff was pretty view-centric (and Struts-centric, at that), so I 
don't really envision it ever being useful outside of Struts - or a 
servlet container, for that matter.

If what you're doing is web-centric, but not Struts-centric, you may 
wish to use a ContextListener instead of a PlugIn implementation.  If 
what you're doing requires some information from the Struts config (as 
mine did), then you'll most certainly find a PlugIn implementation a 
cleaner solution.

I did not provide a DTD for my XML config.  You may wish to.  Digester 
supports this (though I can't speak to how easy it is to implement - my 
guess is that part is easy too).

Good Luck!  Yell back if you have problems.

-- 
Eddie Bush





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>