RE: Splitting up struts-config.xml

2001-05-19 Thread Mikkel Bruun

 WE ran in to similar problem a couple of months ago (just not with struts,
another mvc framework)...

We simply recodede our xml properties loading method to grab it from a
central http url...
So now all delopers would have to work on ONE xml, which was placed
centrally, and managed by Visual Source Safe...

Thats how we avoided having to merge several config files...

Mikkel

-Original Message-
From: Doug Way
To: [EMAIL PROTECTED]
Sent: 19-05-2001 01:11
Subject: Splitting up struts-config.xml


I'm working as part of a team on a large-ish web application using
struts.

There are several of us currently working on the struts/jsp side of
things, and there's now quite a bit of stuff (action mappings, etc.) in
the struts-config.xml file, so each of us has to change this file fairly
often, and we're often in conflict with each other.  (I guess part of
the problem is that we're using a source code management tool
(SourceOffSite) with a pessimistic check-in/check-out system, without
automated merging.)

Anyway, is there some way to split up the contents of struts-config.xml,
so that it's not one huge file?  (Maybe with includes, or something
similar?)

- Doug Way
  [EMAIL PROTECTED]



RE: PLEASE, I NEED TO UNSUBSCRIBE!!!! HOW?!?!!?!?!?!?

2001-05-19 Thread Giz

One wonders how they manage to subscribe in the first place?  I doubt that
someone
who's unable to hunt down the unsubscribe instructions for this mail list
ever
being able to actualy use struts!

Perhaps ol Bill thought this was a list having to do with the type of struts
that can be attached to his pickup.

-Original Message-
From: Anthony Martin [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 18, 2001 4:30 PM
To: '[EMAIL PROTECTED]'
Subject: RE: PLEASE, I NEED TO UNSUBSCRIBE HOW?!?!!?!?!?!?


Why do people get so frantic when they can't figure out how to unsubscribe?
I wonder if this ever happens in their non-internet lives:

PLEASE, NEED TO DRINK, HOW TO OPEN THIS CAN OF BEER?!?!!?!?!
PLEASE, NEED TO DRINK, HOW TO OPEN THIS CAN OF BEER?!?!!?!?!
PLEASE, NEED TO DRINK, HOW TO OPEN THIS CAN OF BEER?!?!!?!?!
PLEASE, NEED TO DRINK, HOW TO OPEN THIS CAN OF BEER?!?!!?!?!
PLEASE, NEED TO DRINK, HOW TO OPEN THIS CAN OF BEER?!?!!?!?!
PLEASE, NEED TO DRINK, HOW TO OPEN THIS CAN OF BEER?!?!!?!?!
PLEASE, NEED TO DRINK, HOW TO OPEN THIS CAN OF BEER?!?!!?!?!
PLEASE, NEED TO DRINK, HOW TO OPEN THIS CAN OF BEER?!?!!?!?!


Anthony

-Original Message-
From: Perez, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 18, 2001 1:34 PM
To: '[EMAIL PROTECTED]'
Subject: RE: PLEASE, I NEED TO UNSUBSCRIBE HOW?!?!!?!?!?!?


finally.. thank you, David Larson, the only decent human being on this list.

> -Original Message-
> From: David Larson [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, May 18, 2001 11:48 AM
> To:   [EMAIL PROTECTED]
> Subject:  RE: PLEASE, I NEED TO UNSUBSCRIBE HOW?!?!!?!?!?!?
>
> To remove your address from the list, send a message to:
><[EMAIL PROTECTED]>
>
> -Original Message-
> From: Perez, Bill [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 18, 2001 1:27 PM
> To: '[EMAIL PROTECTED]'
> Subject: PLEASE, I NEED TO UNSUBSCRIBE HOW?!?!!?!?!?!?
>
>
> PLEASE, I NEED TO UNSUBSCRIBE HOW?!?!!?!?!?!?
> PLEASE, I NEED TO UNSUBSCRIBE HOW?!?!!?!?!?!?
> PLEASE, I NEED TO UNSUBSCRIBE HOW?!?!!?!?!?!?
> PLEASE, I NEED TO UNSUBSCRIBE HOW?!?!!?!?!?!?
> PLEASE, I NEED TO UNSUBSCRIBE HOW?!?!!?!?!?!?
> PLEASE, I NEED TO UNSUBSCRIBE HOW?!?!!?!?!?!?
> PLEASE, I NEED TO UNSUBSCRIBE HOW?!?!!?!?!?!?
>
>
> > -Original Message-
> > From:   Sundaram Ramasamy [SMTP:[EMAIL PROTECTED]]
> > Sent:   Friday, May 11, 2001 1:48 PM
> > To: [EMAIL PROTECTED]
> > Subject:Windows NT authentication for web site.
> >
> >
> > For my company web site, I want to use NT user name and password for
> > authentication.  to get the user name and password, I want to use html
> > form.
> >
> > Can any one help me on this. How I can implement this, any tips or
> samples
> > codes.
> >
> >
> > Thanks
> > Sundaram.




jo! + struts

2001-05-19 Thread Hendrik Schreiber

Hi,

maybe it's of interest to someone.

Because I fixed some bugs, jo! now seems to work quite nicely
with struts.

To install, create the dir %JO_HOME%/webapp/host/ (if it does not
already exist) and drop the wars from the struts webapps
directory in there. Then start jo!

That should be it.

For those of you, who have never heard of jo! before: jo!  is an
open source and free webserver implementing servlet api 2.2 and
jsp 1.1. You can get it at http://www.tagtraum.com/

If there are any problems with struts, please let me know
directly => [EMAIL PROTECTED]

Cheers,

-hendrik
- - - - - - - - - - - - - - - - - - - - - - - - - - -
  tagtraum industries  http://www.tagtraum.com/
  jo! small&smart 2.2 servletengine
  Java Server & Servlets   The web-application book
  The WebApp Frameworkhttp://www.webapp.de/





RE: PLEASE, I NEED TO UNSUBSCRIBE!!!! HOW?!?!!?!?!?!?

2001-05-19 Thread Rick Mouritzen

If a subscriber does not save the "Welcome to struts-user..." e-mail, s/he
loses the information about how to unsubscribe.  The
http://jakarta.apache.org/struts website DOES NOT have the unsubscribe
information; it only has a mailto link for subscribing.

Also, the mailing list archive link is under "Resources".  I would suggest
placing the subscribing, unsubscribe, and mail-archive information all in
one place - preferably on or linked to from the Struts home page.

-Original Message-
From: Giz [mailto:[EMAIL PROTECTED]]
Sent: Saturday, May 19, 2001 2:35 AM
To: [EMAIL PROTECTED]
Subject: RE: PLEASE, I NEED TO UNSUBSCRIBE HOW?!?!!?!?!?!?


One wonders how they manage to subscribe in the first place?  I doubt that
someone
who's unable to hunt down the unsubscribe instructions for this mail list
ever
being able to actualy use struts!

Perhaps ol Bill thought this was a list having to do with the type of struts
that can be attached to his pickup.





Re: PLEASE, I NEED TO UNSUBSCRIBE!!!! HOW?!?!!?!?!?!?

2001-05-19 Thread Martin Cooper

Actually, all of the Jakarta mailing lists, with subscribe, unsubscribe and
archive links, are in one place:

http://jakarta.apache.org/site/mail2.html

A link to there might make sense.

--
Martin Cooper

- Original Message -
From: "Rick Mouritzen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 19, 2001 11:27 AM
Subject: RE: PLEASE, I NEED TO UNSUBSCRIBE HOW?!?!!?!?!?!?


> If a subscriber does not save the "Welcome to struts-user..." e-mail, s/he
> loses the information about how to unsubscribe.  The
> http://jakarta.apache.org/struts website DOES NOT have the unsubscribe
> information; it only has a mailto link for subscribing.
>
> Also, the mailing list archive link is under "Resources".  I would suggest
> placing the subscribing, unsubscribe, and mail-archive information all in
> one place - preferably on or linked to from the Struts home page.
>
> -Original Message-
> From: Giz [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, May 19, 2001 2:35 AM
> To: [EMAIL PROTECTED]
> Subject: RE: PLEASE, I NEED TO UNSUBSCRIBE HOW?!?!!?!?!?!?
>
>
> One wonders how they manage to subscribe in the first place?  I doubt that
> someone
> who's unable to hunt down the unsubscribe instructions for this mail list
> ever
> being able to actualy use struts!
>
> Perhaps ol Bill thought this was a list having to do with the type of
struts
> that can be attached to his pickup.
>
>





RE: Suggestion:Taking the Servlet out of Action and ActionForm

2001-05-19 Thread Michael Binette

Niall (and anyone else who has done something similar),

I have been looking into doing a similar thing as you have done,
sub-classing Action and creating an abstract execute method or as you have
done, an abstract processForm method.  The main reason was to eliminate the
handling of HttpServletRequest, HttpServletResponse, current action, next
action, etc.

What types of things are you using the Transport object for?  Do you have
one generic Transport object for your entire app?  You mention that your
"Action" classes do not reference any Servlet methods.  How do you handle
putting or getting things from request scope or session scope such as a
logged in user object?

When you have a form that takes user input, do you use the same Action class
for setting up that form as well as for the submit action of that form?  We
have run into a lot of cases where I have one action class to setup a form,
such as a User Edit Profile screen.  Then, I use a second action class to
save the User.  This gives me something like EditUser.do and SaveUser.do,
both going to separate Action classes.

It seems like there are a lot of cases where you have two actions "view" and
"submit".  I was thinking about handling those two scenarios in my
sub-classed Action class, calling processView or processSubmit
automatically.  Have you done anything like that or does it sound
reasonable?

--
Thanks,
Michael Binette


-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 6:06 PM
To: [EMAIL PROTECTED]
Subject: RE: Suggestion:Taking the Servlet out of Action and ActionForm


Mikkel

OK I agree, its never so black & white and your user example looks fine to
me.

I'm wondering about your "inner" controller - sounds like some great
integrated framework, in which case I agree its probably a level of
abstraction I wouldn't want to go to. But what about lots of small
controllers which tie together your logic outside the action.

Anyway, I was probably misleading in saying "thats what we've done". What I
have actually done is this:

We have sub-classed Action and created some abstract standard classes, our
database action does something like this:

1) Get a database connection
2) Create a "Transport" object and store the ActionMapping,
HttpServletRequest, HttpServletResponse & Connection.
3) Set the default "nextAction" to "success"

4) call a processForm(ActionForm, Transport) method (implemented as an
abstract method) catching and handling exceptions.

5) Check the Transport object for error messages. If there are errors create
ActionErrors and save and if a "nextAction" returned by the Transport object
use it otherwise set the nextAction to "failure".
6) Close the Connection
7) Find the mapping for "nextAction" and forward to it.

All out actions then inherit from this ActionFramework class overriding the
processForm(ActionForm, Transport) method. This means that our "Action"
classes have no references to the servlet world, meaning we can test them
independantly.

Now I know straight away you are going to say that I am storing the
ActionMapping, HttpServletRequest & HttpServletResponse in my Transport
object - so far I haven't used them anywhere, it was just in case I ever
needed to. Also if I ever do I will try to hide this in a new method in the
Transport object.

What do you think?

Niall

> -Original Message-
> From: Mikkel Bruun [mailto:[EMAIL PROTECTED]]
> Sent: 17 May 2001 20:58
> To: 'Niall Pemberton '; '[EMAIL PROTECTED] '
> Subject: RE: Suggestion:Taking the Servlet out of Action and ActionForm
>
>
> Hi Niall,
>
>  I not sure I agree with you, although you have som good points.
>
> When looking at the MVC pattern we can easily identify two of the
> elements,
> namely the view (jsp) and the model (usually persistent object)...
> However, where is our controller??? As you point out, in the
> struts context
> the controller would be (partly) the Action, and probably some kind of
> Facade pattern towards the Model...
>
> However, in the classic sense of the MVC, the Controller should
> be reusable
> between many applications, and the Action dependence to the Servlet API
> doesn't (strictly speaking) make this possible.
>
> The solution to this is ofcourse to build a "inner" Controller, with close
> ties to the Model, such as an Facade or a (none Servlet specific) Command.
> However, I Feel that this just introduces another level of
> abstraction, and
> this abstraction should/could be made by the Action
>
> To give you a clue of the granularity of my Actions I give you
> the following
> example, please comment and tell if you think I have to much Model in it,
> and if, how to avoid it.
> This is probably not the best example, but here it comes...
>
> My Current Project deals with financing...Users has to LogOn to the System
>
> Model : User
> Controller: LogOnAction
>
> The Action makes use of an UserModelFacade. The UserModelFacade has a
> getUser(String uname, String pw) metho

Re: java script & struts + scriptlet

2001-05-19 Thread Martin Cooper

An attribute value can be a string literal or the result of an expression,
but you can't embed an expression within a string. You need to put the
string inside the expression (as you effectively do in your workaround). Try
this:

'>



--
Martin Cooper


- Original Message -
From: "Nguyen Thanh Phong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 6:29 PM
Subject: Re: java script & struts + scriptlet


> Hi Laurent,
>
> I was using the following but it doesn't work either
>
>  key="button.order"/>
>
> The error I got is :
>
>
C:\beaWeblogic\wlserver\config\sdcdomain\applications\smartV1_2\WEB-INF\_tmp
>
_war_netcom_netcom_smartV1_2\jsp_servlet\_ebiz\_mall\_gsquickorder.java:1127
> : unclosed string literal
> probably occurred due to an error in /ebiz/mall/gsQuickOrder.jsp line 220:
> 
>
> Tracing to the java file, I have:
>
> _html_button0.setOnclick(weblogic.utils.StringUtils.valueOf("return
> informInventoryLack(<%= orderItemData.getId()
> ile://[ /ebiz/mall/gsQuickOrder.jsp; Line: 220]
>
> I have found a work arround:
>
> <%
> String test = "return informInventoryLack"+orderItemData.getId() +
")";
> %>
>  key="button.order"/>
>
> Is there more elegant solution?
>
> Phong.
>
> - Original Message -
> From: Laurent Cornelis <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, May 16, 2001 4:04 PM
> Subject: Re: java script & struts + scriptlet
>
>
> > >  > > key="button.order"/>
> >
> > Maybe could you try this (without the /> at the end of the scriplet) :
> >
> >  > key="button.order"/>
> >
> > Let me know if it works
> >
> > Laurent
> >
> >
>
>





RE: Suggestion:Taking the Servlet out of Action and ActionForm

2001-05-19 Thread Hicks, James

I see one problem with Niall's Transport object.  The Transport has a
reference to a Connection object.  This could cause severe scalability
issues in the future.  Let's say for instance you are using a connection
pool with an initial 5 connections and a max of 20.  If your Action.perform
method does a lot of processing and you have a high traffic sight you could
run out of connections very fast.  

The way I would recommend is using a Singleton to get a database Connection
from the pool, this way you could release it when you don't need it.  

For example, your Action.perform(..) is responsible for getting info from a
database, and drawing a graph to visually display the data.  Let's say there
are 5 million records returned from the query.  The records hold data to
determine how many hours an employee has worked this month.  You want to
create comparison reports for each employee, department and location.  For
the purpose of the example, the reports would take over 3 hours.  With
Niall's implementation, you would have to keep that database connection
around for the entire time.  If you had direct access to the pool, you could
release the connection after the query was finished.  This would allow
someone else to use the connection.

Now in real life, you probably wouldn't grab all 5 million records at once.
Even if you did do over 100 queries on the database, if you were releasing
the Connection when it wasn't used and getting another when needed, the
overall application speed would be a lot faster than if you were to keep the
connection around.

Just My Opinion
James Hicks

-Original Message-
From: Michael Binette [mailto:[EMAIL PROTECTED]]
Sent: Saturday, May 19, 2001 2:18 PM
To: [EMAIL PROTECTED]
Subject: RE: Suggestion:Taking the Servlet out of Action and ActionForm


Niall (and anyone else who has done something similar),

I have been looking into doing a similar thing as you have done,
sub-classing Action and creating an abstract execute method or as you have
done, an abstract processForm method.  The main reason was to eliminate the
handling of HttpServletRequest, HttpServletResponse, current action, next
action, etc.

What types of things are you using the Transport object for?  Do you have
one generic Transport object for your entire app?  You mention that your
"Action" classes do not reference any Servlet methods.  How do you handle
putting or getting things from request scope or session scope such as a
logged in user object?

When you have a form that takes user input, do you use the same Action class
for setting up that form as well as for the submit action of that form?  We
have run into a lot of cases where I have one action class to setup a form,
such as a User Edit Profile screen.  Then, I use a second action class to
save the User.  This gives me something like EditUser.do and SaveUser.do,
both going to separate Action classes.

It seems like there are a lot of cases where you have two actions "view" and
"submit".  I was thinking about handling those two scenarios in my
sub-classed Action class, calling processView or processSubmit
automatically.  Have you done anything like that or does it sound
reasonable?

--
Thanks,
Michael Binette


-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 6:06 PM
To: [EMAIL PROTECTED]
Subject: RE: Suggestion:Taking the Servlet out of Action and ActionForm


Mikkel

OK I agree, its never so black & white and your user example looks fine to
me.

I'm wondering about your "inner" controller - sounds like some great
integrated framework, in which case I agree its probably a level of
abstraction I wouldn't want to go to. But what about lots of small
controllers which tie together your logic outside the action.

Anyway, I was probably misleading in saying "thats what we've done". What I
have actually done is this:

We have sub-classed Action and created some abstract standard classes, our
database action does something like this:

1) Get a database connection
2) Create a "Transport" object and store the ActionMapping,
HttpServletRequest, HttpServletResponse & Connection.
3) Set the default "nextAction" to "success"

4) call a processForm(ActionForm, Transport) method (implemented as an
abstract method) catching and handling exceptions.

5) Check the Transport object for error messages. If there are errors create
ActionErrors and save and if a "nextAction" returned by the Transport object
use it otherwise set the nextAction to "failure".
6) Close the Connection
7) Find the mapping for "nextAction" and forward to it.

All out actions then inherit from this ActionFramework class overriding the
processForm(ActionForm, Transport) method. This means that our "Action"
classes have no references to the servlet world, meaning we can test them
independantly.

Now I know straight away you are going to say that I am storing the
ActionMapping, HttpServletRequest & HttpServletResponse in my Transport
object - so far

Re: Problem Combining Struts And Homegrown Taglibs

2001-05-19 Thread Martin Cooper

It rather depends on what your tags are doing. We are using our own taglib
along with Struts without problems, and we have tags that interact with
Struts tags as well as tags that are independent of Struts.

Here are a couple of things you might check:

- Make sure there are no errors in your container's log file.
- Check that your form bean is getting to the page intact.
- See what happens if you add one of your own tags to the page that works.

--
Martin Cooper


- Original Message -
From: "Michael Duffy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 6:36 AM
Subject: Problem Combining Struts And Homegrown Taglibs


>
> We're having a problem using custom JSP tags with Struts that we're hoping
> someone can help with.
>
> We have two JSP pages: one that uses a Struts taglib and another that uses
> both Struts taglibs and a home-grown taglib.
>
> When we enter erroneous data into the page that only uses the Struts
taglib,
> the framework returns an HTML page that displays the original form and
data,
> plus the appropriate error messages.  This is the desired result.
>
> When we enter erroneous data into the page the uses both Struts and
> homegrown taglibs, the framework returns an HTML page that displays the
> original form elements WITHOUT THEIR DATA, plus the appropriate error
> messages.  We'd like the behavior to be like the first case, where the
data
> is sent back along with the form elements.
>
> Can anyone explain why using a homegrown taglib might have caused this?
Is
> there something in the custom tag API that we've missed?  Thanks - MOD
>
>
>





Re: how to populate 'value' attribute of html:hidden field withparam eter bean?

2001-05-19 Thread Martin Cooper

You can't use a tag to specify the value of an attribute for another tag.

What you want, I think, is just this:



The JSP expression will return the value of the bean you created with the
 tag.

However, since you seem to be using this tag inside a form (because you have
no 'name' attribute specified), why not just set the value of restrictedPage
in the form bean, instead of using a parameter? That way, you don't need to
worry about setting the value for your hidden field - Struts will do it for
you.

Hope this helps.

--
Martin Cooper


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 14, 2001 10:53 AM
Subject: how to populate 'value' attribute of html:hidden field with param
eter bean?


> Hello,
>I'm having difficulty placing the value of a request parameter into a
> hidden form field.  Could anyone direct me on the correct syntax?
>
> This is what I've been trying...
> I call my jsp page with something like the following >>
> http://localhost:8080/test/logon.jsp?restrictedPage=index.jsp
>
> I create my bean with the following (which works for me):
>  value="NONE" />
> I'm able to print the bean if I place the following within my html page,
and
> the value prints correctly (index.jsp):
> 
>
> However, I don't know how to tell my hidden tag to use that value as the
> default value.  I tried something like the following unsuccessfully:
> " />
>
> I appreciate any help,
> Perry Tew
> mailto:[EMAIL PROTECTED]
> 678-415-3823
>
>





RE: Splitting up struts-config.xml

2001-05-19 Thread Gogineni, Pratima

 Hi,

I needed to have my data-sources in a different file from the rest of the
connection pool. Since the rest of the file was static but the connection
information was varying between different users. I ended up modifying the
actionservlet to load this from a separate file. which can be inside the war
file or even specified as an initialization parameter. 

pratima

-Original Message-
From: Mikkel Bruun
To: 'Doug Way '; '[EMAIL PROTECTED] '
Sent: 5/19/01 12:32 AM
Subject: RE: Splitting up struts-config.xml

 WE ran in to similar problem a couple of months ago (just not with
struts,
another mvc framework)...

We simply recodede our xml properties loading method to grab it from a
central http url...
So now all delopers would have to work on ONE xml, which was placed
centrally, and managed by Visual Source Safe...

Thats how we avoided having to merge several config files...

Mikkel

-Original Message-
From: Doug Way
To: [EMAIL PROTECTED]
Sent: 19-05-2001 01:11
Subject: Splitting up struts-config.xml


I'm working as part of a team on a large-ish web application using
struts.

There are several of us currently working on the struts/jsp side of
things, and there's now quite a bit of stuff (action mappings, etc.) in
the struts-config.xml file, so each of us has to change this file fairly
often, and we're often in conflict with each other.  (I guess part of
the problem is that we're using a source code management tool
(SourceOffSite) with a pessimistic check-in/check-out system, without
automated merging.)

Anyway, is there some way to split up the contents of struts-config.xml,
so that it's not one huge file?  (Maybe with includes, or something
similar?)

- Doug Way
  [EMAIL PROTECTED]



RE: Oracle Driver

2001-05-19 Thread Gogineni, Pratima

I assumed that the driver is registered with the application server it will
be able to find it. Is this not true across all app servers? I think I
remember testing this with JRUN and it worked.

Because I may have the same war file but would want it to work with
different databases and everytime I change my DB I wouldnt want to repackage
the war file with the new driver (note: that i have modified the action
servlet to read the data-sources from outside the war file).

-Original Message-
From: Turgay Zengin
To: [EMAIL PROTECTED]
Sent: 5/18/01 7:45 AM
Subject: Re: Oracle Driver

I put classes12.zip (and any other archive the web application needs) in

WEB-INF/lib directory. Don't forget to change the name of the file to 
classes12.jar
This works for me.

HTH,
Turgay.

---
>Hi all,

>Where I have to put the Oracle Driver ?

>If I put it under the directory /classes I recieve this error message :

>Error: 500
>Location: /struts-client/logon.jsp
>Internal Servlet Error:
...
...

_
Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.



Question on the ActionForm design for dynamic data?

2001-05-19 Thread Joyce Tang
Title: Question on the ActionForm design for dynamic data?





Here is the situation.


I am developing a system to maintain a contribution plan.  I need to input the plan information first and add unlimited number of contributors, specifying each share of the plan.  So there will be a page with contribution plan information and a list of all the contributors.  The information you can edit on this page is the percentage of share of each contributor. Validation rules are: share need to add up to 100 and share figure is an integer between 0 and 100.   Since the number of contributors is unknown in advance, how should I design the ActionForm?

Thanks a lot,


Joyce





RE: Does anyone have a example to generate a drop down list?

2001-05-19 Thread Joyce Tang
Title: Does anyone have a example to generate a drop down list?




Thank 
you very much, Spencer,
 
I tried it out, it is working.
 
I 
don't know where to put the code in the FORM, so I put it in the action 
class.  And I had to add this line of code in my 

request.setAttribute("org.apache.struts.taglib.html.BEAN", 
form)
to make 
it working.
So where 
should I put the code to create the arrays?  Why did I have to put the line 
in?
 THanks a lot,
Joyce

 -Original Message-From: Spencer Smith 
[mailto:[EMAIL PROTECTED]]Sent: Friday, May 18, 2001 11:41 
AMTo: [EMAIL PROTECTED]Subject: Re: Does 
anyone have a example to generate a drop down 
list?

   
  IN FORM:
   
     // Get all xxx Values for 
  DropDown.   xxxDropDown[] results = 
  profileSession.getxxxValues(); // 
  Create the arrays for the labels and values.   xxxLabels = 
  new ArrayList();   xxxValues = new 
  ArrayList();  // For each value 
  returned...   for (int i = 0; i < results.length; i 
  ++)   {// Add a label and a 
  value to the corresponding list.xxxLabels.add(new 
  String(results[i].getLabel()));xxxValues.add(new 
  String(results[i].getValue()));   }
   
   
  IN JSP:
   
    
   
   
  Make sure to define the xxxLabels and xxxValues 
  as type ArrayList and import the class.
   
  Hope this helps!  :-)
  
- Original Message - 
From: 
Joyce Tang 
To: '[EMAIL PROTECTED]' 

Sent: Friday, May 18, 2001 10:28 
AM
Subject: Does anyone have a example to 
generate a drop down list?

Assuming I have a object method returning a list of 
values.  Does anyone have a example to generate a drop down 
list? 


Struts 1.0-beta-2 Released

2001-05-19 Thread Craig R. McClanahan

Struts 1.0-beta-2 is an update release in preparation for a final release
of Struts 1.0 prior to JavaOne 2001.  The changes included are documented
in the release notes, at:

  http://jakarta.apache.org/struts/release-notes-1.0-b2.html

You can pick up your copy of this latest release at:

  http://jakarta.apache.org/struts/release/v1.0-b2/

Craig McClanahan