RE: Struts & Persistence

2002-08-09 Thread Roman Fail

My list:
 
TRS-80
Commodore 64
Kaypro 2 (remember the 26-pound CP/M 'portable'?)
IBM PC
386 - 40 MHz (wow!)
Pentinum 133
Dell Latitude CPTs (500MHz Celeron) - crunched under my father-in-law's Suburban - 
oops!
Dell Latitude c810 (P3 1.13GHz) - in use today
Dell Dimension 8100 (P4 1.5GHz) - in use today
 
The TRS-80 didn't really belong to me - it was my dad's since I was only 9 years old!  
I felt like I owned it though - I was an expert at Lunar Lander loaded from cassette 
tape.
 
I think my favorite of all of them was the Kaypro, since I had a 'portable' back when 
no one else did!  And I wish I still had every single one of them, just for nostalgia 
if nothing else.  
 
Roman  
 

-Original Message- 
From: Eddie Bush [mailto:[EMAIL PROTECTED]] 
Sent: Fri 8/9/2002 1:31 PM 
To: Struts Users Mailing List 
Cc: 
Subject: Re: Struts & Persistence



LOL - I knew when Craig chipped in his  that this would
be the thread to watch - how fun it is to remenisce!

... 2400 baud.  I remember that :-)  Oh, wait, that was 24,000 LOL...
*shuts up*  You old farts! :-P  I got started with computers a bit late
though - didn't have one til I was a sophomore in highschool.  My
brother had a "trash 80" (TRS-80), but I wasn't allowed to mess with it
because of the fact that he was a selfish, ungiving person - 8 years my
senior.  Thankfully he's grown beyond that now (with the help of his
wife! LOL)

386/25-DX (mutt from local dealer)
486/66 (self-build)
K6-2/300 (self-build) [still used]
Athlon/1.3 GHz (self-build) [still used]
Duron/750 (Compaq Presario) [still used]

[EMAIL PROTECTED] wrote:

>2400 baud!  Consider yourself lucky...  I started on 300...
>







RE: Struts event sequence

2002-07-18 Thread Roman Fail

> I don't personally agree with your philosophy on setting autoCommit to
> true, but I liked the page other than that :-) 

We only use stored procedures on our database, so autoCommit(true) is appropriate for 
us since all transactions are committed/rolled back within the stored procs 
themselves.  That was sort of an internal assumption within our company that wasn't 
mentioned in the doc.
 
Roman

-Original Message- 
From: Eddie Bush [mailto:[EMAIL PROTECTED]] 
Sent: Wed 7/17/2002 7:06 PM 
To: Struts Users Mailing List 
Cc: 
Subject: Re: Struts event sequence (WAS: getting nested tags to work 
withDynaActionForm???)



Hey - I wish I'd had that when I started with Struts!

I don't personally agree with your philosophy on setting autoCommit to
true, but I liked the page other than that :-) Add
Bookmark  I just feel having autoCommits off is a good thing.
 That way you have explicit control over the transaction.  If, however,
you typically don't need it, I can understand setting autoCommit(true).
 Maybe I'm just too anal ;-)

Thanks :-)

    Eddie
    

Roman Fail wrote:

>This is the very basic outline of Struts events (with some helpful comments) 
that I worked up when I was using Struts 1.0, although most of it is still the same.  
Basically I've just expanded steps 3 & 4 of Dan's diagram a bit.  Chapter 5 of Chuck's 
book is much more detailed than this, and an excellent resource (Thanks, Chuck!).  In 
fact I think chapter 5 might be a bit overwhelming for a newbie, and reading the 
ever-changing Struts source code is not comfortable at first. 
>
>I've found that this little outline has helped our new Struts developers a 
lot.  Craig suggested a nice UML sequence diagram for the docs, which would be great - 
but I'm not fluent in UML yet.  Here's my document - keep in mind it's been about a 
year since I wrote this, but I'd be happy to take suggestions on updating it:
    >
>http://www.posportal.com/StrutsOverview.html
>
>Roman Fail
>Sr. Web Application Developer
>POS Portal, Inc.
>







RE: Re[2]: getting nested tags to work with DynaActionForm???

2002-07-17 Thread Roman Fail

>Counter-intuitive to whom?  Do standard JavaBean indexed properties act
>like this?  :-)

You've got a great point there.  You actually made me realize why it is 
counter-intuitive though: non-indexed standard JavaBean properties don't do anything 
on their own either.  You have to write the code to store even the simplest property.  

 
When I first looked at the DynaFormAction javadocs, I thought I was buying into 
something that would do everything for me (shame on me, I should have known better!).  
I wrongly assumed that if the DynaForm would transparently manage getting and setting 
properties for me.  In reality, it only manages non-indexed properties.  To do 
anything with indexed properties, I have to subclass, get inside the black box, and 
override reset().  I guess I don't really have a problem with that - it's just not 
documented very well.  Perhaps you could add just a bit more discussion about the use 
of DynaActionForm in the javadoc?
 
>I'd possibly buy into it for java.lang.List based properties, but I'm
>pretty skeptical about transparently expanding an array that the user has
>already created.
 
Agreed, that does walk into the realm of Big Brother code.  I guess it's just going to 
be a rough spot for DynaNewbies.  Thanks for your thoughts.

Roman

-Original Message- 
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] 
    Sent: Wed 7/17/2002 3:55 PM 
To: Roman Fail 
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] 
Subject: Re[2]: getting nested tags to work with DynaActionForm???



> Date: Wed, 17 Jul 2002 15:23:23 -0700
> From: Roman Fail <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED], [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re[2]: getting nested tags to work with DynaActionForm???
>
> What do you think of Arron's idea, Craig?  It would be ten times more
> intuitive to have DynaForms work more like an ArrayList - you
> instantiate the form, call an indexed setter and it just works - no
> exceptions.  Rick and I are merely the first of many who will hit this
> annoying, counter-intuitive, undocumented speed bump.  Rick finally gave
> up and just went back to regular ActionForms, and I came close to that
> before I figured it out.
>

Counter-intuitive to whom?  Do standard JavaBean indexed properties act
like this?  :-)

I'd possibly buy into it for java.lang.List based properties, but I'm
pretty skeptical about transparently expanding an array that the user has
already created.

> I haven't looked into the lazy collections code yet, but it sounds like
> a great solution.
>

Lazy instantiation is a neat idea in principle, but there is a whole lot
more to it than just nested properties.  You really want to be able to
configure quite a bit of stuff about the beans that get created, up to and
including a custom factory for beans of a particular type.  I don't really
want to go down that road until we're ready to build a bridge across the
chasm at the end of it.

> Roman

Craig






Re[2]: getting nested tags to work with DynaActionForm???

2002-07-17 Thread Roman Fail

What do you think of Arron's idea, Craig?  It would be ten times more intuitive to 
have DynaForms work more like an ArrayList - you instantiate the form, call an indexed 
setter and it just works - no exceptions.  Rick and I are merely the first of many who 
will hit this annoying, counter-intuitive, undocumented speed bump.  Rick finally gave 
up and just went back to regular ActionForms, and I came close to that before I 
figured it out.
 
I haven't looked into the lazy collections code yet, but it sounds like a great 
solution.
 
Roman

-Original Message- 
From: Arron Bates [mailto:[EMAIL PROTECTED]] 
Sent: Wed 7/17/2002 5:28 AM 
To: Struts Users Mailing List 
Cc: 
Subject: Re: Re[2]: getting nested tags to work with DynaActionForm???



Craig, wouldn't this be fixed by getting the collections in the 
DynaForm
to be wrapped by the lazy lists I commited a few weeks ago to
commons?... then when they're being created when the request comes in,
it'll all grow as needed and it'd just happen.


Been missing the past couple of weeks due to bad flu among other 
things.
Love to get in there and code it, but time is hard to find at the 
moment
and there's other things I need to get on to, but the above feels like 
a
good marriage.

One of the things I have to do is describe the lazy collections to the
masses. Seems a few have had list constrcution issues with request 
scope
beens in the last fortnight.



On Wed, 2002-07-17 at 12:45, Craig R. McClanahan wrote:
>
>
> On Tue, 16 Jul 2002, Rick Reumann wrote:
>
> > Date: Tue, 16 Jul 2002 22:04:54 -0400
> > From: Rick Reumann <[EMAIL PROTECTED]>
> > To: Craig R. McClanahan <[EMAIL PROTECTED]>
> > Cc: Struts Users Mailing List <[EMAIL PROTECTED]>
> > Subject: Re[2]: getting nested tags to work with DynaActionForm???
> >
> > On Tuesday, July 16, 2002, 9:04:04 PM, Craig R. McClanahan wrote:
> >
> > CRM> Setting stuff like this up in the reset() method is the 
standard approach.
> > CRM> Arrays have to exist already for either standard 
JavaBean-based
> > CRM> ActionForms, as well as DynaActionForms.
> >
> >  I'm still a bit confused by this. When I use a standard
> >  ActionForm I don't have to do anything special with my 
ArrayList
> >  in the ActionForm. A page that uses this ArrayList works 
fine.
> >  However as soon as I try to use this ArrayList as property in 
a
> >  DynaActionForm I run into problems trying to submit a jsp 
page
> >  that was populated with the ArrayList info (the display works
> >  fine, it's just upon submission).
> >
>
> If you're using request scope beans, a new instance gets created on 
every
> request.  And I will bet that you probably have an initialization of 
this
> array happening in your constructor, or in an initialization 
expression,
> right?
>
> For DynaActionForm instances, the default initialization of all
> non-primitives in null.  That's why you still need to initialize in
> reset(), or use the new "initial" property described below.
>
> > CRM> In recent nightly builds, we added support for an additional 
mechanism --
> > CRM> you can declare an intiialization expression for arrays in 
the
> > CRM>  for a DynaActionForm bean, using the 
"initial" attribute.
> > CRM> The syntax is basically like what you use in Java to 
initialize an array
> > CRM> to a set of values in a variable declaration -- for example:
> >
> > CRM>> CRM>  type="org.apache.struts.action.DynaActionForm">
> >
> > CRM>  > CRM> initial="{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }"/>
> >
> > CRM>   
> >
> >What if the information in an ArrayList of beans that you 
want in a
> >DynaActionForm is to first be populated by some database 
info.
   

Struts event sequence (WAS: getting nested tags to work with DynaActionForm???)

2002-07-17 Thread Roman Fail

This is the very basic outline of Struts events (with some helpful comments) that I 
worked up when I was using Struts 1.0, although most of it is still the same.  
Basically I've just expanded steps 3 & 4 of Dan's diagram a bit.  Chapter 5 of Chuck's 
book is much more detailed than this, and an excellent resource (Thanks, Chuck!).  In 
fact I think chapter 5 might be a bit overwhelming for a newbie, and reading the 
ever-changing Struts source code is not comfortable at first.  
 
I've found that this little outline has helped our new Struts developers a lot.  Craig 
suggested a nice UML sequence diagram for the docs, which would be great - but I'm not 
fluent in UML yet.  Here's my document - keep in mind it's been about a year since I 
wrote this, but I'd be happy to take suggestions on updating it:
 
http://www.posportal.com/StrutsOverview.html
 
Roman Fail
Sr. Web Application Developer
POS Portal, Inc.
 

-Original Message- 
From: Dan Cancro [mailto:[EMAIL PROTECTED]] 
Sent: Tue 7/16/2002 5:00 PM 
To: 'Struts Users Mailing List' 
Cc: 
Subject: RE: getting nested tags to work with DynaActionForm???



I'd like to see what you've written. 

Here's how I understand it so far:
http://members.telocity.com/dcancro/images/eng/Struts_MVC.gif

    
    
> -Original Message-
> From: Roman Fail [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 16, 2002 4:35 PM
> To: Rick Reumann; Struts List
> Subject: RE: getting nested tags to work with DynaActionForm???
>
>
> I had the same problem - after reviewing the source code for
> DynaActionForm I realized that the underlying ArrayList is
> not 'automatically' instantiated by the DynaActionForm.  In
> other words, when the controller is trying to call
> DynaActionForm.set("myField[0]") because it sees a request
> parameter called 'myField[0]', there is no ArrayList there
> yet to match the "myField" property.  My solution was to
> subclass DynaActionForm and just override the reset() method
> in order to instantiate the ArrayList.  (since reset() is
> called before any setters).  I think I also did this using an
> array of BasicDynaBeans, and again had to initialize the
> array in reset(). 
> 
> Of course you don't have to do this when simply displaying
> the data, because you are populating the property with your
> ArrayList in Action.perform()/execute() before the
> DynaActionForm.get() methods are ever called. 
> 
> Is there a better solution out there?  I don't like having to
> write a subclass just to instantiate the ArrayList.
> 
> This is another example of where knowing the exact sequence
> of Struts events is crucial.  Has anyone ever written up a
    > detailed step-by-step of what the controller does when a
> request comes in?  I've written a brief one for our company's
> developers - shall I post it?
> 
> Roman Fail
> Sr. Web Application Developer
> POS Portal, Inc.
> 
>
>   -Original Message-
>   From: Rick Reumann [mailto:[EMAIL PROTECTED]]
>   Sent: Tue 7/16/2002 1:33 PM
>   To: Struts List
>   Cc:
>   Subject: getting nested tags to work with DynaActionForm???
>  
>  
>
>   I had an ArrayList property set in my DynaActionForm
> and it worked
>   fine with the nested tag in displaying the information
> from the beans
>   in the ArrayList of this DynaActionForm. The problem
> however came when
>   I when I hit submit with the updated information. I kept getting
>   BeanUtils.populate errors with no index value set for
> 'field.[0]'.
>   Sorry can't cite the exact error since I now went to
> using a typical
>   ActionForm and the nested tag page submits fine.
>  
>   Is there something special I need to do in order to get
>   DynamicActionForms to work with Nested tags?
>  
>   Thanks,
>  
>   --
>  
>   Rick
>   mailto:[EMAIL PROTECTED]
>  
>  
>
>





RE: getting nested tags to work with DynaActionForm???

2002-07-16 Thread Roman Fail

I had the same problem - after reviewing the source code for DynaActionForm I realized 
that the underlying ArrayList is not 'automatically' instantiated by the 
DynaActionForm.  In other words, when the controller is trying to call 
DynaActionForm.set("myField[0]") because it sees a request parameter called 
'myField[0]', there is no ArrayList there yet to match the "myField" property.  My 
solution was to subclass DynaActionForm and just override the reset() method in order 
to instantiate the ArrayList.  (since reset() is called before any setters).  I think 
I also did this using an array of BasicDynaBeans, and again had to initialize the 
array in reset().  
 
Of course you don't have to do this when simply displaying the data, because you are 
populating the property with your ArrayList in Action.perform()/execute() before the 
DynaActionForm.get() methods are ever called.  
 
Is there a better solution out there?  I don't like having to write a subclass just to 
instantiate the ArrayList.
 
This is another example of where knowing the exact sequence of Struts events is 
crucial.  Has anyone ever written up a detailed step-by-step of what the controller 
does when a request comes in?  I've written a brief one for our company's developers - 
shall I post it?
 
Roman Fail
Sr. Web Application Developer
POS Portal, Inc.
 

-Original Message- 
From: Rick Reumann [mailto:[EMAIL PROTECTED]] 
Sent: Tue 7/16/2002 1:33 PM 
To: Struts List 
Cc: 
Subject: getting nested tags to work with DynaActionForm???



I had an ArrayList property set in my DynaActionForm and it worked
fine with the nested tag in displaying the information from the beans
in the ArrayList of this DynaActionForm. The problem however came when
I when I hit submit with the updated information. I kept getting
BeanUtils.populate errors with no index value set for 'field.[0]'.
Sorry can't cite the exact error since I now went to using a typical
ActionForm and the nested tag page submits fine.

Is there something special I need to do in order to get
DynamicActionForms to work with Nested tags?

Thanks,

--

Rick
mailto:[EMAIL PROTECTED]






RE: Empty Page returned after Action executed

2001-07-25 Thread Roman Fail

You most likely have a NullPointerException occuring somewhere in your
Action.perform().  This has happened to me many times - you can find the
error with a debugger, or trap the Exception with a catch block.
Otherwise you can use servlet.log() in your perform method to determine
what is going on at each line of code (view in the webapp logfile).
Also look at the logfile for your overall servlet container.
 
Roman

-Original Message- 
From: Randall Dietz 
Sent: Wed 7/25/2001 5:06 PM 
To: '[EMAIL PROTECTED]' 
Cc: 
Subject: RE: Empty Page returned after Action executed



I have some further information that might help solve my
problem.

I've narrowed it down to the ActionForm that I created.  If the
validate()
method does NOT return an error (validate method not implemented
or returns
empty ActionErrors object), an empty HTML page is returned by
Struts to the
browser.  If there is at least one error returned by the
ActionForm, then
the JSP page is displayed correctly.

Obviously there's something about Struts I haven't got my head
wrapped
around yet.

Here's the action mapping I'm using:



NB - I've tried the above with validate="false"... with the same
result.

The empty page that is returned by Struts looks like this:






Can anyone help shed some light on this?

thanks,
randall



**
The information contained in this e-mail is confidential and is
intended only for the use of the addressee(s).
If you receive this e-mail in error, any use, distribution or
copying of this e-mail is not permitted. You are requested to
forward unwanted e-mail and address any problems to the
MIM Holdings Limited Support Centre.

e-mail: [EMAIL PROTECTED]
phone: Australia 1800500646
International ++61 7 38338042

**



 winmail.dat


RE: Annoying Teamtech.com Report to Recipient(s)

2001-07-16 Thread Roman Fail

The quoted content of your original message contains the letter x three
times in a row, which someone's mail server intereprets as
po-rn-o-graphic banned content (I figure that word is probably bad too).
Unfortunately the server sees fit to email the sender of the mail to let
them know they were bad, which in this case is the address of the whole
list.  So everyone gets it, which today has become quite annoying.  
 
Whoever is at Teamtech, let your mail administrator know about this
problem and maybe they can change the mail filter.  

-Original Message- 
From: Jeff Trent 
Sent: Mon 7/16/2001 11:53 AM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: Re: Report to Recipient(s)



What is this message mean?


- Original Message -
From: "Paladin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 16, 2001 2:46 PM
Subject: Report to Recipient(s)


> Incident Information:-
>
> Originator:"Jeff Trent" <[EMAIL PROTECTED]>
> Recipients:<[EMAIL PROTECTED]>
> Subject:  Re: quick question : form
>
> Message from "Jeff Trent" <[EMAIL PROTECTED]> was
quarantined because
> it contained banned content.
>
>




 winmail.dat


RE: Nested logic:iterate tags & ServletExec

2001-06-06 Thread Roman Fail

I can second your problems with nested iterate tags using ServletExec.
We are running JDK 1.3, ServletExec 3.1, Win2k/IIS 5.0.  I posted
something about it a few weeks ago but no one replied.  It appeared to
me to be some sort of recursion issue, where the body of the inner
iterate tag was evaluated and output prior to the outer iterate tag.  We
ended up just using a scriplet for the outer loop and an iterate tag for
the inner loop.  I havent' seen any other glaring problems with the
custom tags running under ServletExecyet.
 
ServletExec 4.0 is in beta right now, perhaps that will solve the
problem?  It's supposed to support Servlet API 2.3 and JSP 1.2 (as soon
as they are released!).
 
Roman
 

-Original Message- 
From: Amos Shapira 
Sent: Wed 6/6/2001 8:58 AM 
To: '[EMAIL PROTECTED]' 
Cc: 
Subject: RE: Nested logic:iterate tags



Hi,

I just had bad experience with ServletExec 3.0E and nested
iterate tags.  When I changed the inner iterate tag back to
scriptlets things startted working again (the code worked fine
under Tomcat 3.2.1).

Is anyone aware of problems with NewAtlanta's handling of custom
tags in general or Struts in particular?

My env:

1. Sun JDK 1.2.2_5/6
2. New Atlanta ServletExec 3.0E
3. Windows 2000 Professional or Sparc Solaris 2.6
4. Jakarta Struts and Jakarta Taglib

Thanks,

--Amos




 winmail.dat


RE: Report to Recipient(s)

2001-06-05 Thread Roman Fail

 

-Original Message- 
From: Paladin 
Sent: Tue 6/5/2001 7:30 AM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: Report to Recipient(s)



Incident Information:-

Originator:Ted Husted <[EMAIL PROTECTED]>
Recipients:[EMAIL PROTECTED]
Subject:  Re: Action before loading a page

Message from Ted Husted <[EMAIL PROTECTED]> was NOT deliverd,
because it
contained banned content.




 winmail.dat


RE: more connection pool problems ....

2001-05-24 Thread Roman Fail

The most likely reason is that Jrun runs under the SYSTEM account or
some other account besides the one you are logged in with.  A "User" DSN
works with one specific account only.  I guess Tomcat runs under the
currently logged in user.  Consult the JRun docs to find out what
account it runs under - it may even run under several accounts at
different times, including the IUSR Internet Guest Account.  You would
have to set up a User DSN for each of these accounts if that is the
case.
 
What the problem with running it as a System DSN anyway?  Security
issues?
 
Roman

-Original Message- 
From: Gogineni, Pratima 
Sent: Thu 5/24/2001 3:49 PM 
To: '[EMAIL PROTECTED]' 
Cc: 
Subject: more connection pool problems 



I see the following strange behavior or JRUN and *Not* on
TOMCAT.

I have an access database that is registered as an ODBC "user
dsn" - the
connection pool finds the datasource the runs fine in tomcat but
when the
same war file is running in JRUN a URI not found exception is
thrown. But if
create a "system dsn" both tomcat and jrun find the datasource
without any
problem.

would anyone happen to have an idea as to why this should occur?
I am using
the JDBC-ODBC bridge as the driver ..

thanks
pratima



 winmail.dat


Nested and problems

2001-05-03 Thread Roman Fail

I am having difficulty with the HTML output when using nested iterate
tags.  After reviewing the archives, I can see others have had a similar
goal but I didn't see any working solutions. 
 
For some reason all of the output from the inner  is being
printed before the body of the outer tag is printed.  Is this a bug, or
due to some sort of recursion issue?  I am using the most recent binary
nightly build.  Here is an example of the code that I *wish* would work
intuitively:
 


  
  OrderNum:
  

 
It is sort of a parent-child-grandchild relationship, the Report bean
returns an ArrayList of Customer beans, which in turn return an
ArrayList of Order beans.  The desired effect is like this:
 
-
John Smith
   OrderNum: 10034
   OrderNum: 25467
   OrderNum: 29876
-
Jane Doe
   OrderNum: 15678
   OrderNum: 23456
 
...and so on for more customers.  The output actually looks like:
 
JohnSmith100342546729876JaneDoe1567823456
   OrderNum:
   OrderNum:
   OrderNum:
-
   OrderNum:
   OrderNum:
-
 
The funny thing is that if I get rid of  and use
, the order numbers come up in the right place, but the
customer names are output *below* the matching order numbers.  Go
figure.
 
I tried using a scriplet 'for' loop instead of the outer iterate tag,
and everything works fine.  Example:
 
<% ArrayList customers = report.getCustomers();
  for (int i=0; i < customers.size(); i++) {
  CustomerBean customer = (CustomerBean)customers.get(i);
  pageContext.setAttribute("customer", customer,
PageContext.PAGE_SCOPE);
%>
  
  
  OrderNum:
  
<% } %>
 
So does anyone know why this happens?  I searched the archives and found
some people who said they were successfully doing this, but only in
theory:
 
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg03951.html
 
I can provide the complete JSP code and the bean classes (which are real
simple, I wrote them just to test this).  
 
Craig indicated that this was possible to do like so:
> > For example, consider a bean that has a getter method:
> >
> > public Map getProperties();
> >
> > and you had a collection of them called "beans".  Then you
can:
> >
> > 
> >   Now processing bean 
> >   
> > Property 
> > has value 
> >   
> > 
 
(near the bottom of
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg05232.html
)
 
Any ideas?  My gut tells me it is a recursion issue. I can leave it as a
scriptlet.but if that was acceptable I wouldn't be using Struts
anyway!
 
Thanks,   
Roman
[EMAIL PROTECTED]  
 
 



RE: FormBeans and Thread Safety

2001-04-26 Thread Roman Fail

 From:
http://jakarta.apache.org/struts/userGuide/building_controller.html#acti
on_classes
 

"Design issues to remember when coding Action classes include the
following: 

The controller servlet creates only one instance of your Action class,
and uses it for all requests. Thus, you need to code your Action class
so that it operates correctly in a multi-threaded environment, just as
you must code a servlet's service() method safely. "

 
Jonathan, you can't expect the list to solve all your problems for you.
Please stop being so pushy; I'm probably not the only one who finds your
attitude offensive.
 
 
 
-Original Message- 
From: Jonathan 
Sent: Thu 4/26/2001 1:47 PM 
To: [EMAIL PROTECTED]; Ryan Rich 
Cc: 
Subject: Re: FormBeans and Thread Safety

Where in the docs does it say that Action objects are pooled?!!


- Original Message -
From: "Rajan Gupta" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Ryan Rich" <[EMAIL PROTECTED]>
Sent: Thursday, April 26, 2001 8:58 AM
Subject: Re: FormBeans and Thread Safety


> No. ActionForm are created for each request, While Action need to
> threadsafe, because Action's are pooled
> --- Ryan Rich <[EMAIL PROTECTED]> wrote:
> > When creating a FormBean (a class extending ActionForm), do they
need to
> > be
> > thread-safe?
> >
> >  Ryan Rich
> >  
> >  Bitek, Inc.
> >  2569 West Woodland Dr.
> >  Anaheim, CA 92801
> >  (714) 828-8388
> >
>
>
> __
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>



 winmail.dat


RE: Need help with logic:iterate :)

2001-04-19 Thread Roman Fail

Your  tag closes itself before it gets to the tag body.
i.e. 
I made this mistake a couple times too so don't feel bad!
 
On your bonus question, your JSP shouldn't be performing business logic,
the bean should be.  Create another getter on your bean for the specific
thing you want to display.  Alternatively, inside your 
you could wrap a  tag around your  and
conditionally display a particular value within the iteration.
 
Roman

 
-Original Message- 
From: Alex Colic 
Sent: Thu 4/19/2001 12:50 PM 
To: Struts 
Cc: 
Subject: Need help with logic:iterate :)



Hi,

I am trying to get a handle on the logic:iterate tag.

I have an object in application scope under the key
'storeroomList.'
There is a vector of objects under the property 'storeroomList'.
Each one of
the objects in this vector has a property 'name.'

What I am trying to do is go through the vector and print out
the names. I
have attempted the below but the only storeroom name to be
printed out to
the screen is the last storeroom. I traced the execution of the
iterate
class and it looks to be getting the correct data, going through
each
element of the vector and pulling out the name property and then
looping
through all the elements without printing them to the screen and
then the
bean:write is called.

Any help is as usual greatly appreciated.


Oh, bonus question.. Lets say I only wanted to print out a
particular
storeroom. Iterate through the vector but only print the
storeroom that had
the name "main."







Regards

Alex




 winmail.dat