Re: has anyone gotten struts 1.1b2 to work on Jboss 3.0.3/tomcat 4.1.12 ?

2002-11-11 Thread Gemes Tibor
2002. november 12. 06:08 dátummal Vincent Stoessel ezt írtad:
> There seems to be an issue going on with the class loader
> tiles initialization. Anyone got a struts project working
> in the jboss 3.03/tomcat4.1.12 bundle working?

Yes there is a problem. However "standard" jboss3.0.4 (without tomcat) works 
like a charm.

Hth,

Tib

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: unicode in struts

2002-11-11 Thread Gemes Tibor
2002. november 12. 02:37 dátummal Huynh Ngoc Huy ezt írtad:
>   Hi all,
>   Does struts tags support unicode? I had stored a
> unicode-string into a session, but  tag
> didn't display it correctly.
>   Any help is appreciated!

Yes it does. However if you do not set the charset, maybe the browser mess up 
the encoding. 

Did you set the content-type correctly in the page-directive? 

Hth,

Tib

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tiles validates ActionForm (second try)

2002-11-11 Thread Roland Carlsson
I sure can. I post them below. Is Devins Richards answer the way to go and
have one form that does not validate that submits to one that validates?

Thanks in advance
Roland

Tiles defintion --





  

- Struts action 
 
 

 

- Action info --
empty perform method

Form Validate info
Does not allow null or shorter than 1.

---



- Original Message -
From: "James Mitchell" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, November 11, 2002 7:24 PM
Subject: RE: Tiles validates ActionForm (second try)


> Hi Roland,
>
> Could you provide a few more details about your tiles definitions and
action
> mappings?
>
> James Mitchell
> Software Engineer/Struts Evangelist
> http://www.open-tools.org
>
> "If you were plowing a field, which would you rather use? Two strong oxen
or
> 1024 chickens?"
> - Seymour Cray (1925-1996), father of supercomputing
>
>
> > -Original Message-
> > From: Roland Carlsson [mailto:roland.c@;swetravel.se]
> > Sent: Monday, November 11, 2002 5:48 AM
> > To: Struts Users Mailing List
> > Subject: Tiles validates ActionForm (second try)
> >
> >
> > Hi!
> > I didn't get any answer to my question on this topic so I'll try again.
> >
> > I have an ActionForm in a page that is a part of a
> > Tiles-definition. The problem is that the form is validated
> > before the user have sent the form. If there are any not null
> > checks they will present the user with errormessages that should
> > not be presented to the user until she/he fails to fill out the
> > form correctly and submit.
> >
> > I have tried the form without tiles and it worked perfectly.
> >
> > Is this a know error in Struts 1.1b2 and is there a way around
> > this problem?
> >
> > Thanks in advance
> > Roland Carlsson
> >
> >
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




has anyone gotten struts 1.1b2 to work on Jboss 3.0.3/tomcat 4.1.12?

2002-11-11 Thread Vincent Stoessel
There seems to be an issue going on with the class loader
tiles initialization. Anyone got a struts project working
in the jboss 3.03/tomcat4.1.12 bundle working?
Thanks.



smime.p7s
Description: S/MIME Cryptographic Signature


RE: Why would disabled="..." not take a runtime expression? The docs say that it should...

2002-11-11 Thread Davide Bruzzone
Yes, that's what's weird... I didn't muck around with the original TLD file
or anything...

-Original Message-
From: edgar [mailto:edgar@;blue-moose.net]
Sent: Monday, November 11, 2002 3:47 PM
To: 'Struts Users Mailing List'
Subject: RE: Why would disabled="..." not take a runtime expression? The
docs say that it should...


In the struts-html.tld is  set to true for the disabled
attribute?


-Original Message-
From: Davide Bruzzone [mailto:Davide.Bruzzone@;ngt.com] 
Sent: Monday, November 11, 2002 5:36 PM
To: 'Struts Users Mailing List'
Subject: Why would disabled="..." not take a runtime expression? The
docs say that it should...


Greetings all...

I'm trying to control whether or not some form fields are editable using
a custom security tag. So, at the top of the page, I have something like
this:

<%-- Page security --%>



 

If the deny attribute is anything but null or an empty string, readOnly
is set to "true". Then I try to do this:


...


What I get back is that the readOnly symbol cannot be resolved...
However, the following tests work:

- 
- <%= readOnly %> (On its own... This prints out "true")

This is just strange. According to the documentation, disabled should be
able to take a runtime expression, and I use runtime expressions of the
form <%= someVariable %> all over the palce elsewhere.

Any insight would be greatly appreciated.

Cheers...

Davide Bruzzone


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [OFF TOPIC] Digester and Log4J

2002-11-11 Thread Matt Raible
I'm not using a classpath - just jar files in WEB-INF/lib

--- In [EMAIL PROTECTED], [EMAIL PROTECTED] wrote:
> 
> 
> 
> It's also possible that some other third-party jar you've added to your
> environment has a log4j.properties in it as well.
> 
> If log4j finds another .properties file prior to finding the one you
want,
> you get this type of error. JBoss, for example, has its own log4j config
> that may clash with yours if you have it on your classpath.
> 
> Try moving the jar file with your log4j.properties file to the front of
> your classpath...
> 
> Kevin
> 
> 
> http://www.strutskickstart.com
> 
> 
> 
> 
> 
> Robert <[EMAIL PROTECTED]> on 11/11/2002 04:57:48 PM
> 
> Please respond to "Struts Users Mailing List"
><[EMAIL PROTECTED]>
> 
> To:Struts Users Mailing List <[EMAIL PROTECTED]>
> cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
> Subject:Re: [OFF TOPIC] Digester and Log4J
> 
> 
> It looks like you don't have your log4j.properties file in your
> classpath, and thus it can't initialize.
> 
> Matt Raible wrote:
> 
> >I've recently started getting the following warning when my
struts-based
> >webapp starts:
> >
> >log4j:WARN No appenders could be found for logger
> >(org.apache.commons.digester.Digester).
> >log4j:WARN Please initialize the log4j system properly.
> >
> >Any ideas?
> >
> >I have log4j.category.org.apache.commons=ERROR in my log4j.properties
> >file.
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   <
> mailto:struts-user-unsubscribe@;j...>
> >For additional commands, e-mail: <
> mailto:struts-user-help@;j...>
> >
> >
> >
> >
> >
> 
> 
> 
> --
> To unsubscribe, e-mail:   <
> mailto:struts-user-unsubscribe@;j...>
> For additional commands, e-mail: <
> mailto:struts-user-help@;j...>
> 
> 
> 
> 
> 
> 
> 
>
---
> This e-mail message (including attachments, if any) is intended for
the use
> of the individual or entity to which it is addressed and may contain
> information that is privileged, proprietary , confidential and
exempt from
> disclosure.  If you are not the intended recipient, you are notified
that
> any dissemination, distribution or copying of this communication is
> strictly prohibited.  If you have received this communication in error,
> please notify the sender and erase this e-mail message immediately.
>
---
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [SIDEBAR] Form population (Was RE: request.setAttribute() for m confusion)

2002-11-11 Thread Sri Sankaran
Yes! Finally someone who sees what I am talking about!

*That's* exactly the scenario I am talking about.  I can't see how Struts can divine 
what values the form-bean property needs to be initialized.  It is predicated by the 
preceding business logic.

Sri

-Original Message-
From: Martin Cooper [mailto:martin.cooper@;tumbleweed.com] 
Sent: Monday, November 11, 2002 9:40 PM
To: 'Struts Users Mailing List'
Subject: RE: [SIDEBAR] Form population (Was RE: request.setAttribute() for m confusion)




> -Original Message-
> From: Eddie Bush [mailto:ekbush@;swbell.net]
> Sent: Monday, November 11, 2002 2:46 PM
> To: Struts Users Mailing List
> Subject: Re: [SIDEBAR] Form population (Was RE: request.setAttribute() 
> form confusion)
> 
> 
> Sri, pardon me, but I don't see how what you've said has
> anything to do 
> with the point I was making.  My sole point is that the 
> actual creation 
> (instantiation) of the form bean itself is a very mechanical act that 
> Struts can perform on your behalf.  There is no need to ever 
> bother with 
> creating a bean and placing it into some scope - just 
> configure things 
> properly and let it be done for you.  Yes, you may very well need to 
> initialize it's values in an action - but that is a seperate act from 
> instantiation.

I think you missed the point here, Eddie (or perhaps I missed that you didn't miss the 
point :).

Think about it this way. Struts will create your form bean automagically in a couple 
of cases: when it needs to populate one from an incoming request, and when it needs to 
render a form but can't find the corresponding form bean.

Now consider the case where you need to populate the form with some values that the 
Action came up with somehow. You'd do that by having the values in the form bean 
properties, right? That way, the Struts HTML tags will do the work for you.

But now consider the case where you haven't yet invoked anything in the app that would 
cause the appropriate form bean to be instantiated. The action that came up with the 
values might have been invoked with a different form bean, or perhaps no form bean at 
all. So Struts hasn't instantiated the bean yet. Struts *will* instantiate the bean 
when it the  tag is processed, but by then, it's too late for the Action to 
populate the form bean.

So the only way for the action to pre-populate the form bean, so that those values are 
picked up by the Struts HTML tags to populate the form is for the action to 
instantiate the form bean itself.

One way of creating the form bean is RequestUtils.createActionForm().

--
Martin Cooper


> 
> Why bother specifying a form-bean in your config file if
> you're going to 
> create it yourself?  Yeah there's some validation that can be 
> done on it 
> by Struts - but if you don't specify a form-bean for an 
> action-mapping 
> (you specify nothing for the action-mapping's name attribute) I don't 
> believe that validation is done (why would it be?  Struts 
> doesn't know 
> there's a form being used for this action!).  Hrm - in fact 
> you lose a 
> great deal of the utility Struts provides if you don't make this 
> association.  Think about it:  You have to tell Struts what type your 
> form is of - so it can instantiate it.  It needs this 
> information for no 
> other purpose.  It could easily tell later on that the form is of the 
> wrong type for validation etc.  Also, you could specify by 
> the attribute 
> property the name of a form which you instantiated yourself.  You 
> *could* (if you wanted to) cut yourself off from the Struts form 
> mechanism altogether.
> 
> What I suggest in no way impacts your ability to use good design
> (delegates etc).  It just takes one very mechanical thing out of your 
> hands - and out of your concern - and "just does it".  It's 
> solid.  It 
> works.  If it ever fails you *please* file a bug!  It also 
> has no impact 
> on where data comes from or where it goes to.  You can pass 
> data via a 
> form from one action to another in about 2 ways that come to mind 
> immediately:  1) session-scoped form 2) using hidden fields.  
> I'm sorry, 
> but I think you misunderstood my entire argument.  My 
> appologies for not 
> having been clearer.
> 
> Sri Sankaran wrote:
> 
> >While that is true, other than in the case of blank forms,
> isn't it true that one rarely depends on Struts to
> auto-generate the form bean?  If you are presenting data, the 
> form is pre-populated with such data.  This data is typically 
> derived by an earlier action -- mediated by a business delegate.  
> >
> >Say you have action-1 which is invoked when a page-1 is
> submitted.  It does sundry business functions which includes
> getting the data necessary for the next page, page-2 say.  In 
> order for page-2 to pick up this data, action-1 must know the 
> 'name' attribute for the action-mapping corresponding to 
> page-2 and save the form-bean under this name in the 
> appropriate scope.
> >
> >Is there a way

RE: [SIDEBAR] Form population (Was RE: request.setAttribute()for m confusion)

2002-11-11 Thread Martin Cooper


> -Original Message-
> From: Eddie Bush [mailto:ekbush@;swbell.net]
> Sent: Monday, November 11, 2002 2:46 PM
> To: Struts Users Mailing List
> Subject: Re: [SIDEBAR] Form population (Was RE: request.setAttribute()
> form confusion)
> 
> 
> Sri, pardon me, but I don't see how what you've said has 
> anything to do 
> with the point I was making.  My sole point is that the 
> actual creation 
> (instantiation) of the form bean itself is a very mechanical act that 
> Struts can perform on your behalf.  There is no need to ever 
> bother with 
> creating a bean and placing it into some scope - just 
> configure things 
> properly and let it be done for you.  Yes, you may very well need to 
> initialize it's values in an action - but that is a seperate act from 
> instantiation.

I think you missed the point here, Eddie (or perhaps I missed that you
didn't miss the point :).

Think about it this way. Struts will create your form bean automagically in
a couple of cases: when it needs to populate one from an incoming request,
and when it needs to render a form but can't find the corresponding form
bean.

Now consider the case where you need to populate the form with some values
that the Action came up with somehow. You'd do that by having the values in
the form bean properties, right? That way, the Struts HTML tags will do the
work for you.

But now consider the case where you haven't yet invoked anything in the app
that would cause the appropriate form bean to be instantiated. The action
that came up with the values might have been invoked with a different form
bean, or perhaps no form bean at all. So Struts hasn't instantiated the bean
yet. Struts *will* instantiate the bean when it the  tag is
processed, but by then, it's too late for the Action to populate the form
bean.

So the only way for the action to pre-populate the form bean, so that those
values are picked up by the Struts HTML tags to populate the form is for the
action to instantiate the form bean itself.

One way of creating the form bean is RequestUtils.createActionForm().

--
Martin Cooper


> 
> Why bother specifying a form-bean in your config file if 
> you're going to 
> create it yourself?  Yeah there's some validation that can be 
> done on it 
> by Struts - but if you don't specify a form-bean for an 
> action-mapping 
> (you specify nothing for the action-mapping's name attribute) I don't 
> believe that validation is done (why would it be?  Struts 
> doesn't know 
> there's a form being used for this action!).  Hrm - in fact 
> you lose a 
> great deal of the utility Struts provides if you don't make this 
> association.  Think about it:  You have to tell Struts what type your 
> form is of - so it can instantiate it.  It needs this 
> information for no 
> other purpose.  It could easily tell later on that the form is of the 
> wrong type for validation etc.  Also, you could specify by 
> the attribute 
> property the name of a form which you instantiated yourself.  You 
> *could* (if you wanted to) cut yourself off from the Struts form 
> mechanism altogether.
> 
> What I suggest in no way impacts your ability to use good design 
> (delegates etc).  It just takes one very mechanical thing out of your 
> hands - and out of your concern - and "just does it".  It's 
> solid.  It 
> works.  If it ever fails you *please* file a bug!  It also 
> has no impact 
> on where data comes from or where it goes to.  You can pass 
> data via a 
> form from one action to another in about 2 ways that come to mind 
> immediately:  1) session-scoped form 2) using hidden fields.  
> I'm sorry, 
> but I think you misunderstood my entire argument.  My 
> appologies for not 
> having been clearer.
> 
> Sri Sankaran wrote:
> 
> >While that is true, other than in the case of blank forms, 
> isn't it true that one rarely depends on Struts to 
> auto-generate the form bean?  If you are presenting data, the 
> form is pre-populated with such data.  This data is typically 
> derived by an earlier action -- mediated by a business delegate.  
> >
> >Say you have action-1 which is invoked when a page-1 is 
> submitted.  It does sundry business functions which includes 
> getting the data necessary for the next page, page-2 say.  In 
> order for page-2 to pick up this data, action-1 must know the 
> 'name' attribute for the action-mapping corresponding to 
> page-2 and save the form-bean under this name in the 
> appropriate scope.
> >
> >Is there a way around this issue?
> >
> >Sri
> >-Original Message-
> >From: Eddie Bush [mailto:ekbush@;swbell.net] 
> >Sent: Monday, November 11, 2002 3:00 PM
> >To: Struts Users Mailing List
> >Subject: Re: request.setAttribute() form confusion
> >
> >
> >You shouldn't ever have to create the form yourself if you:
> >
> >- declare the form-bean in your config file
> >- use the name of the form you declared in the action 
> mapping's "name" 
> >attribute
> >
> >
> >
> >...
> >
> >
> >
> >That should suffice.  What y

RE: how to turn on debugging

2002-11-11 Thread Martin Cooper


> -Original Message-
> From: edgar [mailto:edgar@;blue-moose.net]
> Sent: Monday, November 11, 2002 3:47 PM
> To: 'Struts Users Mailing List'
> Subject: RE: how to turn on debugging
> 
> 
> In the struts-config.xml under init-params.

That will work for Struts 1.0.x, but for Struts 1.1, you'll need to
configure Commons Logging. See:

http://jakarta.apache.org/commons/logging.html

--
Martin Cooper


> 
> -Original Message-
> From: Rachabattuni, Rajesh [mailto:Rajesh.Rachabattuni@;tfn.com] 
> Sent: Monday, November 11, 2002 6:36 PM
> To: '[EMAIL PROTECTED]'
> Subject: how to turn on debugging
> 
> 
> hi
> I am wondering if there is a way to turn on "verbose" mode or
> "debugging" mode or "trace" on the struts ...
> 
> any info/pointers appreciated.
> 
> thanks
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Why would disabled="..." not take a runtime expression? Thed ocs say that it should...

2002-11-11 Thread Martin Cooper


> -Original Message-
> From: Davide Bruzzone [mailto:Davide.Bruzzone@;ngt.com]
> Sent: Monday, November 11, 2002 2:36 PM
> To: Struts Users Mailing List
> Subject: Why would disabled="..." not take a runtime expression? The
> docs say that it should...
> 
> 
> Greetings all...
> 
> I'm trying to control whether or not some form fields are 
> editable using a
> custom security tag. So, at the top of the page, I have 
> something like this:
> 
> <%-- Page security --%>
> 
>   
> 
>value="true"/>
> 
> 
> If the deny attribute is anything but null or an empty 
> string, readOnly is
> set to "true". Then I try to do this:
> 
> 
>   ...
> 
> 
> What I get back is that the readOnly symbol cannot be 
> resolved...

The problem is that you are passing a String to an attribute that requires a
boolean. The documentation could certainly be more clear (you could submit a
Bugzilla item if you like), but you will note that it states *true* and not
*"true"* as an appropriate value.

If you want 'readOnly' to be a String, you'll have to use something like
this for the value of the 'disabled' attribute:

<%= Boolean.valueof(readOnly).booleanValue() %>

--
Martin Cooper


> However,
> the following tests work:
> 
> -  disabled="true">
> - <%= readOnly %> (On its own... This prints out "true")
> 
> This is just strange. According to the documentation, 
> disabled should be
> able to take a runtime expression, and I use runtime 
> expressions of the form
> <%= someVariable %> all over the palce elsewhere.
> 
> Any insight would be greatly appreciated.
> 
> Cheers...
> 
> Davide Bruzzone
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Upload corrupts file

2002-11-11 Thread Martin Cooper


> -Original Message-
> From: Roland Polzer [mailto:ropoking@;hotmail.com]
> Sent: Monday, November 11, 2002 8:00 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Upload corrupts file
> 
> 
> >There was a new file-upload module created after the beta 2 
> release I 
> >believe.  Can you try a recent nightly build?  Things should 
> work correctly 
> >now.
> 
> Hi,
> 
> The problem still exists in jakarta-struts-20021108.zip

Are you sure you're using the default multipart handler, and not specifying
one (e.g. the old one) explicitly? I just downloaded the 20021108 build,
along with your test file, and tried the struts-upload example application.
It works flawlessly.

--
Martin Cooper


> 
> Cheers,
> Roland
> 
> _
> MSN Groups & Chat - Freunde finden - leicht gemacht 
> http://groups.msn.com/people/
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




unicode in struts

2002-11-11 Thread Huynh Ngoc Huy
  Hi all,
  Does struts tags support unicode? I had stored a
unicode-string into a session, but  tag
didn't display it correctly.
  Any help is appreciated!
  Huy.


__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Why would disabled="..." not take a runtime expression? The docs say that it should...

2002-11-11 Thread Davide Bruzzone
>Does this fail whether "deny" is true or not?  I would think 
>that, since the default scope for "bean:define" is "page", 
>if "deny" is not true, then "readOnly" will not be defined.
>If this is the problem, then I would put your "bean:define"
>outside of the "if"-like tag, and have the body of that tag
>set the previously defined bean.

Yes, that's what I'm doing...

>If I were designing a tag like that, I would have an optional
>"var" attribute that specifies the name of a scoped attribute 
>to set, to "true" or "false" for the result.

Thank you for the suggestion...

Cheers...

Dave

> -Original Message-
> From: Davide Bruzzone [mailto:Davide.Bruzzone@;ngt.com]
> Sent: Monday, November 11, 2002 2:36 PM
> 
> I'm trying to control whether or not some form fields are 
> editable using a
> custom security tag. So, at the top of the page, I have 
> something like this:
> 
> <%-- Page security --%>
> 
>   
> 
>value="true"/>
> 
> 
> If the deny attribute is anything but null or an empty 
> string, readOnly is
> set to "true". Then I try to do this:
> 
> 
>   ...
> 
> 
> What I get back is that the readOnly symbol cannot be 
> resolved... However,
> the following tests work:

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: how to turn on debugging

2002-11-11 Thread edgar
In the struts-config.xml under init-params.

-Original Message-
From: Rachabattuni, Rajesh [mailto:Rajesh.Rachabattuni@;tfn.com] 
Sent: Monday, November 11, 2002 6:36 PM
To: '[EMAIL PROTECTED]'
Subject: how to turn on debugging


hi
I am wondering if there is a way to turn on "verbose" mode or
"debugging" mode or "trace" on the struts ...

any info/pointers appreciated.

thanks


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




how to turn on debugging

2002-11-11 Thread Rachabattuni, Rajesh
hi
I am wondering if there is a way to turn on "verbose" mode or "debugging"
mode or "trace" on the struts ...

any info/pointers appreciated.

thanks


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Debugging Http Request Response

2002-11-11 Thread Mark Ayad
Yes - Now I remember reading the same argument in a book on XP programming !

Thanks Kevin pointing this out.

- Original Message -
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 12:12 AM
Subject: Re: Debugging Http Request Response


>
>
>
> It might be worth looking at strutstestcase and developing some junit
tests
> instead of developing a tags for turning on and off debug statements in
the
> output.
>
> Once you get used to building JUnit test cases to incrementally validate
> your app logic, you may find that your need to display debug statements is
> a lot less. The big value, though, is that you can just leave all your old
> Junit tests in the code base and then doing quick regressions tests is
easy
> if you ever make changes later - if you ever add code that caussomething
> that used to work to break you know without having to go back and re-add
> print statements (or even uncomment debug tags). You can catch problems
> right at build time.
>
> Strutstestcase is easy to use and works well:
> http://strutstestcase.sourceforge.net/ .
>
> Kevin
>
> http://www.strutskickstart.com
>
>
>
>
>
> "Mark Ayad" <[EMAIL PROTECTED]> on 11/11/2002 05:53:18 PM
>
> Please respond to "Struts Users Mailing List"
><[EMAIL PROTECTED]>
>
> To:"Struts Users Mailing List" <[EMAIL PROTECTED]>
> cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
> Subject:Re: Debugging Http Request Response
>
>
> Ahh I guess plugging into an external server works like JProbe.
>
> First I'm seeing what I can get by using standard taglibs. I must admit I
> needed this debug alot in servlet projects undertaken several years ago,
> however with stuts the need for such a feature in much less since request
> mapping is a dream.
>
> Mark
>
> - Original Message -
> From: "Eddie Bush" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 12, 2002 12:42 AM
> Subject: Re: Debugging Http Request Response
>
>
> > That's one option - yes.  You also have the option of doing a
> > remote-attach so you can hook-up to a running server external of your
> > IDE.  I typically do the in-IDE gig though.
> >
> > Mark Ayad wrote:
> >
> > >Eddie,
> > >
> > >So your struts-project would be running inside the netbeans IDE ? So
> this
> > >method would be like any other IDE break point debug ?
> > >
> > --
> > Eddie Bush
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <
> mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <
> mailto:struts-user-help@;jakarta.apache.org>
>
>
>
>
>
>
>
> --
-
> This e-mail message (including attachments, if any) is intended for the
use
> of the individual or entity to which it is addressed and may contain
> information that is privileged, proprietary , confidential and exempt from
> disclosure.  If you are not the intended recipient, you are notified that
> any dissemination, distribution or copying of this communication is
> strictly prohibited.  If you have received this communication in error,
> please notify the sender and erase this e-mail message immediately.
> --
-
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Debugging Http Request Response

2002-11-11 Thread Kevin . Bedell



It might be worth looking at strutstestcase and developing some junit tests
instead of developing a tags for turning on and off debug statements in the
output.

Once you get used to building JUnit test cases to incrementally validate
your app logic, you may find that your need to display debug statements is
a lot less. The big value, though, is that you can just leave all your old
Junit tests in the code base and then doing quick regressions tests is easy
if you ever make changes later - if you ever add code that caussomething
that used to work to break you know without having to go back and re-add
print statements (or even uncomment debug tags). You can catch problems
right at build time.

Strutstestcase is easy to use and works well:
http://strutstestcase.sourceforge.net/ .

Kevin

http://www.strutskickstart.com





"Mark Ayad" <[EMAIL PROTECTED]> on 11/11/2002 05:53:18 PM

Please respond to "Struts Users Mailing List"
   <[EMAIL PROTECTED]>

To:"Struts Users Mailing List" <[EMAIL PROTECTED]>
cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:Re: Debugging Http Request Response


Ahh I guess plugging into an external server works like JProbe.

First I'm seeing what I can get by using standard taglibs. I must admit I
needed this debug alot in servlet projects undertaken several years ago,
however with stuts the need for such a feature in much less since request
mapping is a dream.

Mark

- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 12:42 AM
Subject: Re: Debugging Http Request Response


> That's one option - yes.  You also have the option of doing a
> remote-attach so you can hook-up to a running server external of your
> IDE.  I typically do the in-IDE gig though.
>
> Mark Ayad wrote:
>
> >Eddie,
> >
> >So your struts-project would be running inside the netbeans IDE ? So
this
> >method would be like any other IDE break point debug ?
> >
> --
> Eddie Bush
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   <
mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <
mailto:struts-user-help@;jakarta.apache.org>







---
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [SIDEBAR] Form population (Was RE: request.setAttribute() form confusion)

2002-11-11 Thread edgar
OK.

We don't disagree much, accept in semantics.  I do subclass the struts
ActionForm in an abstract class and subclass everything else from that,
but all the other business logic is separate and stands by itself.  If I
had to go to a different framework, I would replace the connector class.

I do appreciate your comments.

Thanks

-Original Message-
From: Eddie Bush [mailto:ekbush@;swbell.net] 
Sent: Monday, November 11, 2002 7:01 PM
To: 'Struts Users Mailing List'
Subject: Re: [SIDEBAR] Form population (Was RE: request.setAttribute()
form confusion)


edgar wrote:

>OK Eddie, what do you use to model the business logic?
>
Classes which aren't dependant on Struts ;-)



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [SIDEBAR] Form population (Was RE: request.setAttribute() formconfusion)

2002-11-11 Thread Mark Ayad
Like Eddie Says use DAO pattern it makes life much easier, and gives you a
very valuable abstraction layer.

Mark

- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 1:00 AM
Subject: Re: [SIDEBAR] Form population (Was RE: request.setAttribute()
formconfusion)


> edgar wrote:
>
> >OK Eddie, what do you use to model the business logic?
> >
> Classes which aren't dependant on Struts ;-)
>
> Seriously.  Most everyone is going to tell you to build things in layers
> - aiming for low cohesion between them.  Data goes "up" (through he
> layers) and dependencies go down (through the layers).  So it would be
> acceptable to have a business-domain layer built on top of your
> persistence layer - but not versa-vice (er vice-versa too).  Encapsulate
> everything you can using good OO methodologies and make it all as stupid
> as you can.
>
> So you have ... something like ...
>
> ActionClasses make calls to
> Business logic beans (delegates, if you like to call them that)
> which make calls to
> DAOs (or other persistence mechanism)
>
> The action probably instantiates a VO/DTO and does a copy and passes
> things to the BLBs.  That's how I tend to go about it.  So you're just
> mapping from the view to your model in the action (or model to view if
> your outputting).
>
> Build the system to be UI-agnostic.  Then, use the actions as an
> opportunity to retrofit for Struts being the view.  Translate the HTTP
> request into whatever inputs your BLBs take (probably VOs or DTOs
> depending on the name you like to use) using BeanUtils or something else
> to do a copy and then shoot things off to your BLBs.  Then, take the
> outputs and ... well everything in the action-class is UI-centric but
> you can probably acheive a better (more usable - easier-managed) design
> by taking advantage of encapsulating things and then just building on
> top of that - "on the shoulders of giants" as the phrase goes.  That
> speaks volumes about OO IMHO.
>
> If your DAOs know how to do your data-access - and they work solid - you
> needn't bother reproducing that effort anywhere else.
> If your BLBs know how to run your business, provided your DAOs - and
> they work solid - you needn't bother reproducing that effort anywhere
else.
> You may even choose to throw a layer on top of the BLBs - an API
> (facade, if you like) or ... well, there's a myriad of ways ...
>
> If you have your logic inside of form beans then you can't use that
> logic without importing org.apache.struts.* stuff - and your business
> logic should have zero dependencies on Struts.  What's going to happen
> when you change and go to another framework (ok that's probably not
> going to happen, but ...) - or you build a SWING GUI to run the show for
> your tech support guys?  If you have your logic encapsulated in
> UI-agnostic things (the BLBs) then it really doesn't matter - just write
> wrappers around your BLBs that adapt them to the SWING GUI.
>
> Clear as mud?  Someone help me here - I suck at explaining the why and
> wherefore ...
>
> >-Original Message-
> >From: Eddie Bush [mailto:ekbush@;swbell.net]
> >Sent: Monday, November 11, 2002 6:16 PM
> >To: 'Struts Users Mailing List'
> >Subject: Re: [SIDEBAR] Form population (Was RE: request.setAttribute()
> >form confusion)
> >
> >
> >My apologies - you were going after edgar - and rightfully so :-)
> >
> >edgar:  Listen to Sri the wise ;-)
> >
> --
> Eddie Bush
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[Fwd: ChW find words Re: Re: [SIDEBAR] Form population (Was RE:request.setAttribute() form confusion)]

2002-11-11 Thread Eddie Bush
 LOL - what is inappropriate?!  ... and why are they telling me about 
their policy?  Is their filter not smart enough to see I am not under 
their jurisdiction?! :-)

 Original Message 
Subject: ChW find words Re: Re: [SIDEBAR] Form population (Was RE: 
request.setAttribute() form confusion)
Date: Mon, 11 Nov 2002 17:03:54 -0600
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]



MIMEsweeper ChineseWall
Server: EPTXUDSB113/Server/TXU
---
Mail-Info

From:  Eddie Bush  @ TXUE@TXUB
To:Struts Users Mailing List
 
Rec.: CN=Ernest J Chambers/OU=BIZSRV/O=TXU
Date:  11/11/2002 06:00:50 PM
Subject:   Re: [SIDEBAR] Form population (Was RE:
 request.setAttribute() form confusion)
---
'ChW find words' reports:

TXU automatically screens all e-mail for inappropriate subject matter (i.e.
material that is offensive, harassing, threatening, discriminatory,
sexually-explicit, pornographic or obscene).

Based on this initial screening, the e-mail, referenced in the above
subject, may contain information that is considered inappropriate for the
business environment. The information of concern is shown below.

Your e-mail has been logged and will be reviewed promptly. If, after
review, it's considered to be appropriate business correspondence, you will
not receive any further communications.

Please refer to the "TXU Companies Internet, Intranet and E-mail Policy" in
the attached link for complete details and compliance.
http://tuinet.tu.com/DSABRSMain/usageofinternet.htm

If you have any questions, please direct them to [EMAIL PROTECTED]

Thank you for your cooperation.


--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: [SIDEBAR] Form population (Was RE: request.setAttribute() formconfusion)

2002-11-11 Thread Eddie Bush
edgar wrote:


OK Eddie, what do you use to model the business logic?


Classes which aren't dependant on Struts ;-)

Seriously.  Most everyone is going to tell you to build things in layers 
- aiming for low cohesion between them.  Data goes "up" (through he 
layers) and dependencies go down (through the layers).  So it would be 
acceptable to have a business-domain layer built on top of your 
persistence layer - but not versa-vice (er vice-versa too).  Encapsulate 
everything you can using good OO methodologies and make it all as stupid 
as you can.

So you have ... something like ...

ActionClasses make calls to
   Business logic beans (delegates, if you like to call them that) 
which make calls to
   DAOs (or other persistence mechanism)

The action probably instantiates a VO/DTO and does a copy and passes 
things to the BLBs.  That's how I tend to go about it.  So you're just 
mapping from the view to your model in the action (or model to view if 
your outputting).

Build the system to be UI-agnostic.  Then, use the actions as an 
opportunity to retrofit for Struts being the view.  Translate the HTTP 
request into whatever inputs your BLBs take (probably VOs or DTOs 
depending on the name you like to use) using BeanUtils or something else 
to do a copy and then shoot things off to your BLBs.  Then, take the 
outputs and ... well everything in the action-class is UI-centric but 
you can probably acheive a better (more usable - easier-managed) design 
by taking advantage of encapsulating things and then just building on 
top of that - "on the shoulders of giants" as the phrase goes.  That 
speaks volumes about OO IMHO.

If your DAOs know how to do your data-access - and they work solid - you 
needn't bother reproducing that effort anywhere else.
If your BLBs know how to run your business, provided your DAOs - and 
they work solid - you needn't bother reproducing that effort anywhere else.
You may even choose to throw a layer on top of the BLBs - an API 
(facade, if you like) or ... well, there's a myriad of ways ...

If you have your logic inside of form beans then you can't use that 
logic without importing org.apache.struts.* stuff - and your business 
logic should have zero dependencies on Struts.  What's going to happen 
when you change and go to another framework (ok that's probably not 
going to happen, but ...) - or you build a SWING GUI to run the show for 
your tech support guys?  If you have your logic encapsulated in 
UI-agnostic things (the BLBs) then it really doesn't matter - just write 
wrappers around your BLBs that adapt them to the SWING GUI.

Clear as mud?  Someone help me here - I suck at explaining the why and 
wherefore ...

-Original Message-
From: Eddie Bush [mailto:ekbush@;swbell.net] 
Sent: Monday, November 11, 2002 6:16 PM
To: 'Struts Users Mailing List'
Subject: Re: [SIDEBAR] Form population (Was RE: request.setAttribute()
form confusion)


My apologies - you were going after edgar - and rightfully so :-)

edgar:  Listen to Sri the wise ;-)

--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Why would disabled="..." not take a runtime expression? The docs say that it should...

2002-11-11 Thread Karr, David
Does this fail whether "deny" is true or not?  I would think that, since the default 
scope for "bean:define" is "page", if "deny" is not true, then "readOnly" will not be 
defined.  If this is the problem, then I would put your "bean:define" outside of the 
"if"-like tag, and have the body of that tag set the previously defined bean.

If I were designing a tag like that, I would have an optional "var" attribute that 
specifies the name of a scoped attribute to set, to "true" or "false" for the result.

> -Original Message-
> From: Davide Bruzzone [mailto:Davide.Bruzzone@;ngt.com]
> Sent: Monday, November 11, 2002 2:36 PM
> 
> I'm trying to control whether or not some form fields are 
> editable using a
> custom security tag. So, at the top of the page, I have 
> something like this:
> 
> <%-- Page security --%>
> 
>   
> 
>value="true"/>
> 
> 
> If the deny attribute is anything but null or an empty 
> string, readOnly is
> set to "true". Then I try to do this:
> 
> 
>   ...
> 
> 
> What I get back is that the readOnly symbol cannot be 
> resolved... However,
> the following tests work:

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Debugging Http Request Response

2002-11-11 Thread Mark Ayad
Ahh I guess plugging into an external server works like JProbe.

First I'm seeing what I can get by using standard taglibs. I must admit I
needed this debug alot in servlet projects undertaken several years ago,
however with stuts the need for such a feature in much less since request
mapping is a dream.

Mark

- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 12:42 AM
Subject: Re: Debugging Http Request Response


> That's one option - yes.  You also have the option of doing a
> remote-attach so you can hook-up to a running server external of your
> IDE.  I typically do the in-IDE gig though.
>
> Mark Ayad wrote:
>
> >Eddie,
> >
> >So your struts-project would be running inside the netbeans IDE ? So this
> >method would be like any other IDE break point debug ?
> >
> --
> Eddie Bush
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Why would disabled="..." not take a runtime expression? The docs say that it should...

2002-11-11 Thread edgar
In the struts-html.tld is  set to true for the disabled
attribute?


-Original Message-
From: Davide Bruzzone [mailto:Davide.Bruzzone@;ngt.com] 
Sent: Monday, November 11, 2002 5:36 PM
To: 'Struts Users Mailing List'
Subject: Why would disabled="..." not take a runtime expression? The
docs say that it should...


Greetings all...

I'm trying to control whether or not some form fields are editable using
a custom security tag. So, at the top of the page, I have something like
this:

<%-- Page security --%>



 

If the deny attribute is anything but null or an empty string, readOnly
is set to "true". Then I try to do this:


...


What I get back is that the readOnly symbol cannot be resolved...
However, the following tests work:

- 
- <%= readOnly %> (On its own... This prints out "true")

This is just strange. According to the documentation, disabled should be
able to take a runtime expression, and I use runtime expressions of the
form <%= someVariable %> all over the palce elsewhere.

Any insight would be greatly appreciated.

Cheers...

Davide Bruzzone


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Debugging Http Request Response

2002-11-11 Thread Eddie Bush
That's one option - yes.  You also have the option of doing a 
remote-attach so you can hook-up to a running server external of your 
IDE.  I typically do the in-IDE gig though.

Mark Ayad wrote:

Eddie,

So your struts-project would be running inside the netbeans IDE ? So this
method would be like any other IDE break point debug ?


--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Debugging Http Request Response

2002-11-11 Thread Mark Ayad
Eddie,

So your struts-project would be running inside the netbeans IDE ? So this
method would be like any other IDE break point debug ?

- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 12:31 AM
Subject: Re: Debugging Http Request Response


> You could certainly write one :-)  However I'm not aware of an existing
> one.  I use netbeans.  It lets you see all the information - just may
> have to open up the object graph.
>
> Mark Ayad wrote:
>
> >By debu I mean visualising request and session attributes.
> >
> >I would like a tag like   that I could place at the end of a
> >page
> >
> >a.k.a cold fusion page debug ?
> >
> --
> Eddie Bush
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Why would disabled="..." not take a runtime expression? The docs say that it should...

2002-11-11 Thread Davide Bruzzone
Greetings all...

I'm trying to control whether or not some form fields are editable using a
custom security tag. So, at the top of the page, I have something like this:

<%-- Page security --%>






If the deny attribute is anything but null or an empty string, readOnly is
set to "true". Then I try to do this:


...


What I get back is that the readOnly symbol cannot be resolved... However,
the following tests work:

- 
- <%= readOnly %> (On its own... This prints out "true")

This is just strange. According to the documentation, disabled should be
able to take a runtime expression, and I use runtime expressions of the form
<%= someVariable %> all over the palce elsewhere.

Any insight would be greatly appreciated.

Cheers...

Davide Bruzzone


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Debugging Http Request Response

2002-11-11 Thread Eddie Bush
You could certainly write one :-)  However I'm not aware of an existing 
one.  I use netbeans.  It lets you see all the information - just may 
have to open up the object graph.

Mark Ayad wrote:

By debu I mean visualising request and session attributes.

I would like a tag like   that I could place at the end of a
page

a.k.a cold fusion page debug ?


--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [SIDEBAR] Form population (Was RE: request.setAttribute() form confusion)

2002-11-11 Thread edgar
OK Eddie, what do you use to model the business logic?

-Original Message-
From: Eddie Bush [mailto:ekbush@;swbell.net] 
Sent: Monday, November 11, 2002 6:16 PM
To: 'Struts Users Mailing List'
Subject: Re: [SIDEBAR] Form population (Was RE: request.setAttribute()
form confusion)


My apologies - you were going after edgar - and rightfully so :-)

edgar:  Listen to Sri the wise ;-)

Eddie Bush wrote:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Debugging Http Request Response

2002-11-11 Thread Mark Ayad
By debu I mean visualising request and session attributes.

I would like a tag like   that I could place at the end of a
page

a.k.a cold fusion page debug ?

- Original Message -
From: "James Childers" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, November 11, 2002 11:18 PM
Subject: RE: Debugging Http Request Response


>
> What are people using to debug, http-session, request and
> response objects.
>
> Is it a case or role your own ?
>

Depends on what you mean by "debug." I use Cactus unit tests to make sure my
components (serlvets, custom tags, etc.) are behaving properly. If you are
talking about run-time debugging within an IDE, I personally use Eclipse,
although there are certainly other tools available that allow for this
functionality.

-= James

--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Debugging Http Request Response

2002-11-11 Thread James Childers
> 
> What are people using to debug, http-session, request and 
> response objects. 
> 
> Is it a case or role your own ?
> 

Depends on what you mean by "debug." I use Cactus unit tests to make sure my 
components (serlvets, custom tags, etc.) are behaving properly. If you are talking 
about run-time debugging within an IDE, I personally use Eclipse, although there are 
certainly other tools available that allow for this functionality.

-= James

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Debugging Http Request Response

2002-11-11 Thread Mark Ayad
What are people using to debug, http-session, request and response objects. 

Is it a case or role your own ?



Re: [SIDEBAR] Form population (Was RE: request.setAttribute() formconfusion)

2002-11-11 Thread Eddie Bush
My apologies - you were going after edgar - and rightfully so :-)

edgar:  Listen to Sri the wise ;-)

Eddie Bush wrote:


Sri, pardon me, but I don't see how what you've said has anything to 
do with the point I was making.  My sole point is that the actual 
creation (instantiation) of the form bean itself is a very mechanical 
act that Struts can perform on your behalf.  There is no need to ever 
bother with creating a bean and placing it into some scope - just 
configure things properly and let it be done for you.  Yes, you may 
very well need to initialize it's values in an action - but that is a 
seperate act from instantiation.

Why bother specifying a form-bean in your config file if you're going 
to create it yourself?  Yeah there's some validation that can be done 
on it by Struts - but if you don't specify a form-bean for an 
action-mapping (you specify nothing for the action-mapping's name 
attribute) I don't believe that validation is done (why would it be?  
Struts doesn't know there's a form being used for this action!).  Hrm 
- in fact you lose a great deal of the utility Struts provides if you 
don't make this association.  Think about it:  You have to tell Struts 
what type your form is of - so it can instantiate it.  It needs this 
information for no other purpose.  It could easily tell later on that 
the form is of the wrong type for validation etc.  Also, you could 
specify by the attribute property the name of a form which you 
instantiated yourself.  You *could* (if you wanted to) cut yourself 
off from the Struts form mechanism altogether.

What I suggest in no way impacts your ability to use good design 
(delegates etc).  It just takes one very mechanical thing out of your 
hands - and out of your concern - and "just does it".  It's solid.  It 
works.  If it ever fails you *please* file a bug!  It also has no 
impact on where data comes from or where it goes to.  You can pass 
data via a form from one action to another in about 2 ways that come 
to mind immediately:  1) session-scoped form 2) using hidden fields.  
I'm sorry, but I think you misunderstood my entire argument.  My 
appologies for not having been clearer. 

--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [SIDEBAR] Form population (Was RE: request.setAttribute() formconfusion)

2002-11-11 Thread Eddie Bush
... why are you changing forms?  Do you forward to the JSP or redirect? 
Unless you do something special in EditAction the form you are dealing 
with in JSP is form-A --- not form-B.  That is irrelevant though - as 
the user will submit form-A and form-B will be created (if needed - 
assuming you've configured things right) and populated and fed to 
SaveAction.

Why two different forms here?  Why not set a property of the form that 
says what you're doing?  ... or rely on the value of a field to tell you 
(field meaning something that is actually present in the bean [VO/DTO] 
represented by the form) - such as a null OID or some such.  I don't see 
why you would have this arrangement ... but I do not know your circumstance.

Sri Sankaran wrote:

"...EditAction takes the form bean created/retrieved by Struts, populates/modifies it with..."

Wait a minute.  What caused Struts to create the form bean?  If that is form-bean associated with this action, the scenario I am describing is different.  In my scenario, consecutive actions do not share the same form-bean.  It's as if EditAction does its work and needs to prep *a*different*form* for the next screen.

EditAction -->   JSP   --> SaveAction
form-Aform-Bform-B


Sri



--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [SIDEBAR] Form population (Was RE: request.setAttribute() form confusion)

2002-11-11 Thread edgar
I have interpreted that the form bean be the repository for the bulk of
the business logic surrounding it's elements.  Then I can use any number
of JSP pages to display / modify / whatever with minimal knowledge of
the basic business rule.

I don't know if that is what was intended, it just appears natural to
me.  I also don't have a another tool which might control the business
logic so that might be our difference. I don't like to put too much
business logic in the database because that tends to force use of DB
specific code.  There is a program turbine which is reccomended to be
used with struts which is designed to handle some of the database
operations which might change my analysis, but I haven't had time to
review it.  

What are you using to do the business model?

Thanks.

Edgar

-Original Message-
From: Sri Sankaran [mailto:Sri.Sankaran@;sas.com] 
Sent: Monday, November 11, 2002 3:12 PM
To: 'Struts Users Mailing List'; Edgar Dollin
Subject: RE: [SIDEBAR] Form population (Was RE: request.setAttribute()
form confusion)


Actually, the way I have tried to describe keeps business logic
*entirely* out of the form-beans and uses them only as the medium of
transporting data between the model and the view.

I prefer not to put *any* business logic in the form beans (code re-use,
lack of portability, model/controller separation -- take your pick).

In other words, the form-bean is just a dumb holder of information; it
doesn't know where the data came from or where it goes.

Is that not the recommended purpose?  Are you suggesting that the
form-bean be responsible for loading/unloading the data?

Sri 

-Original Message-
From: edgar [mailto:edgar@;blue-moose.net] 
Sent: Monday, November 11, 2002 3:04 PM
To: 'Struts Users Mailing List'
Subject: RE: [SIDEBAR] Form population (Was RE: request.setAttribute()
form confusion)


Doesn't doing things the way you are suggesting spread the business
logic over the view and the controller?

I have found that if you have a overall form which may or may not
correspond to a db element but pulls in as nested forms the tables that
it needs and controls the business logic to be a strong way of doing
things.  This means that Eddie's comment will still hold about letting
struts manage the action form.

Edgar

-Original Message-
From: Sri Sankaran [mailto:Sri.Sankaran@;sas.com] 
Sent: Monday, November 11, 2002 2:51 PM
To: 'Struts Users Mailing List'
Subject: [SIDEBAR] Form population (Was RE: request.setAttribute() form
confusion)


While that is true, other than in the case of blank forms, isn't it true
that one rarely depends on Struts to auto-generate the form bean?  If
you are presenting data, the form is pre-populated with such data.  This
data is typically derived by an earlier action -- mediated by a business
delegate.  

Say you have action-1 which is invoked when a page-1 is submitted.  It
does sundry business functions which includes getting the data necessary
for the next page, page-2 say.  In order for page-2 to pick up this
data, action-1 must know the 'name' attribute for the action-mapping
corresponding to page-2 and save the form-bean under this name in the
appropriate scope.

Is there a way around this issue?

Sri
-Original Message-
From: Eddie Bush [mailto:ekbush@;swbell.net] 
Sent: Monday, November 11, 2002 3:00 PM
To: Struts Users Mailing List
Subject: Re: request.setAttribute() form confusion


You shouldn't ever have to create the form yourself if you:

- declare the form-bean in your config file
- use the name of the form you declared in the action mapping's "name" 
attribute



...



That should suffice.  What you should find is that the form is created 
for you.  Doing things as I mention simplifies you actions so that they 
can just expect the form to be there.  If the form is not there you will

probably NPE.  That would indicate that you didn't create the 
association (by setting name="myForm") or Struts wasn't able to create 
the form for some odd reason.

Susan Bradeen wrote:

>Nevermind, answering my own question ...
>
>actions in the Struts examples don't use the second line of code, so
>the answer is no, you don't need the two together.
>
>Susan
>
-- 
Eddie Bush




--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: <

Re: [OFF TOPIC] Digester and Log4J

2002-11-11 Thread Kevin . Bedell



It's also possible that some other third-party jar you've added to your
environment has a log4j.properties in it as well.

If log4j finds another .properties file prior to finding the one you want,
you get this type of error. JBoss, for example, has its own log4j config
that may clash with yours if you have it on your classpath.

Try moving the jar file with your log4j.properties file to the front of
your classpath...

Kevin


http://www.strutskickstart.com





Robert <[EMAIL PROTECTED]> on 11/11/2002 04:57:48 PM

Please respond to "Struts Users Mailing List"
   <[EMAIL PROTECTED]>

To:Struts Users Mailing List <[EMAIL PROTECTED]>
cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:Re: [OFF TOPIC] Digester and Log4J


It looks like you don't have your log4j.properties file in your
classpath, and thus it can't initialize.

Matt Raible wrote:

>I've recently started getting the following warning when my struts-based
>webapp starts:
>
>log4j:WARN No appenders could be found for logger
>(org.apache.commons.digester.Digester).
>log4j:WARN Please initialize the log4j system properly.
>
>Any ideas?
>
>I have log4j.category.org.apache.commons=ERROR in my log4j.properties
>file.
>
>
>
>
>--
>To unsubscribe, e-mail:   <
mailto:struts-user-unsubscribe@;jakarta.apache.org>
>For additional commands, e-mail: <
mailto:struts-user-help@;jakarta.apache.org>
>
>
>
>
>



--
To unsubscribe, e-mail:   <
mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <
mailto:struts-user-help@;jakarta.apache.org>







---
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [OFF TOPIC] Digester and Log4J

2002-11-11 Thread Robert
It looks like you don't have your log4j.properties file in your 
classpath, and thus it can't initialize.

Matt Raible wrote:

I've recently started getting the following warning when my struts-based
webapp starts:

log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.

Any ideas?

I have log4j.category.org.apache.commons=ERROR in my log4j.properties
file.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [OFF TOPIC] Digester and Log4J

2002-11-11 Thread Eddie Bush
Maybe you should try:

log4j.logger.org.apache.commons=ERROR

I think logger replaced category.

Matt Raible wrote:


I've recently started getting the following warning when my struts-based
webapp starts:

log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.

Any ideas?

I have log4j.category.org.apache.commons=ERROR in my log4j.properties
file.



--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[OFF TOPIC] Digester and Log4J

2002-11-11 Thread Matt Raible
I've recently started getting the following warning when my struts-based
webapp starts:

log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.

Any ideas?

I have log4j.category.org.apache.commons=ERROR in my log4j.properties
file.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [SIDEBAR] Form population (Was RE: request.setAttribute() formconfusion)

2002-11-11 Thread Eddie Bush
Sri, pardon me, but I don't see how what you've said has anything to do 
with the point I was making.  My sole point is that the actual creation 
(instantiation) of the form bean itself is a very mechanical act that 
Struts can perform on your behalf.  There is no need to ever bother with 
creating a bean and placing it into some scope - just configure things 
properly and let it be done for you.  Yes, you may very well need to 
initialize it's values in an action - but that is a seperate act from 
instantiation.

Why bother specifying a form-bean in your config file if you're going to 
create it yourself?  Yeah there's some validation that can be done on it 
by Struts - but if you don't specify a form-bean for an action-mapping 
(you specify nothing for the action-mapping's name attribute) I don't 
believe that validation is done (why would it be?  Struts doesn't know 
there's a form being used for this action!).  Hrm - in fact you lose a 
great deal of the utility Struts provides if you don't make this 
association.  Think about it:  You have to tell Struts what type your 
form is of - so it can instantiate it.  It needs this information for no 
other purpose.  It could easily tell later on that the form is of the 
wrong type for validation etc.  Also, you could specify by the attribute 
property the name of a form which you instantiated yourself.  You 
*could* (if you wanted to) cut yourself off from the Struts form 
mechanism altogether.

What I suggest in no way impacts your ability to use good design 
(delegates etc).  It just takes one very mechanical thing out of your 
hands - and out of your concern - and "just does it".  It's solid.  It 
works.  If it ever fails you *please* file a bug!  It also has no impact 
on where data comes from or where it goes to.  You can pass data via a 
form from one action to another in about 2 ways that come to mind 
immediately:  1) session-scoped form 2) using hidden fields.  I'm sorry, 
but I think you misunderstood my entire argument.  My appologies for not 
having been clearer.

Sri Sankaran wrote:

While that is true, other than in the case of blank forms, isn't it true that one rarely depends on Struts to auto-generate the form bean?  If you are presenting data, the form is pre-populated with such data.  This data is typically derived by an earlier action -- mediated by a business delegate.  

Say you have action-1 which is invoked when a page-1 is submitted.  It does sundry business functions which includes getting the data necessary for the next page, page-2 say.  In order for page-2 to pick up this data, action-1 must know the 'name' attribute for the action-mapping corresponding to page-2 and save the form-bean under this name in the appropriate scope.

Is there a way around this issue?

Sri
-Original Message-
From: Eddie Bush [mailto:ekbush@;swbell.net] 
Sent: Monday, November 11, 2002 3:00 PM
To: Struts Users Mailing List
Subject: Re: request.setAttribute() form confusion


You shouldn't ever have to create the form yourself if you:

- declare the form-bean in your config file
- use the name of the form you declared in the action mapping's "name" 
attribute



...



That should suffice.  What you should find is that the form is created 
for you.  Doing things as I mention simplifies you actions so that they 
can just expect the form to be there.  If the form is not there you will 
probably NPE.  That would indicate that you didn't create the 
association (by setting name="myForm") or Struts wasn't able to create 
the form for some odd reason.

--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [SIDEBAR] Form population (Was RE: request.setAttribute() form confusion)

2002-11-11 Thread Sri Sankaran
"...EditAction takes the form bean created/retrieved by Struts, populates/modifies it 
with..."

Wait a minute.  What caused Struts to create the form bean?  If that is form-bean 
associated with this action, the scenario I am describing is different.  In my 
scenario, consecutive actions do not share the same form-bean.  It's as if EditAction 
does its work and needs to prep *a*different*form* for the next screen.

EditAction -->   JSP   --> SaveAction
 form-Aform-Bform-B


Sri

-Original Message-
From: Kris Schneider [mailto:kris@;dotech.com] 
Sent: Monday, November 11, 2002 4:17 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: [SIDEBAR] Form population (Was RE: request.setAttribute() form confusion)


"...one rarely depends on Struts to auto-generate the form bean?" If you 
changed "rarely" to "almost always", I'd tend to agree with you ;-). I make a 
clear distinction between form creation/retrieval and population/modification. 
Take the typical: 

EditAction -> JSP -> SaveAction

In general, the action mappings for both EditAction and SaveAction would use 
the same form bean. EditAction takes the form bean created/retrieved by Struts, 
populates/modifies it with data obtained from the business layer, and then 
forwards to the JSP for display. The user interacts with the page, submits to 
SaveAction which takes the form bean created/retrieved *and* populated/modified 
(from request params) by Struts and uses its data to interact with the business 
layer. So, I guess the key difference is that for EditAction the form bean is 
populated/modified with data from the business layer but for SaveAction it's 
done with data from request params. In both cases, Struts handles the form bean 
creation/retrieval.

Quoting Sri Sankaran <[EMAIL PROTECTED]>:

> From: Sri Sankaran [mailto:Sri.Sankaran@;sas.com]
> Sent: Monday, November 11, 2002 2:51 PM
> To: 'Struts Users Mailing List'
> Subject: [SIDEBAR] Form population (Was RE: request.setAttribute() form
> confusion)
> 
> 
> While that is true, other than in the case of blank forms, isn't it 
> true that one rarely depends on Struts to auto-generate the form bean?  
> If you are presenting data, the form is pre-populated with such data.  
> This data is typically derived by an earlier action -- mediated by a 
> business delegate.
> 
> Say you have action-1 which is invoked when a page-1 is submitted.  It 
> does sundry business functions which includes getting the data 
> necessary for the next page, page-2 say.  In order for page-2 to pick 
> up this data, action-1 must know the 'name' attribute for the 
> action-mapping corresponding to page-2 and save the form-bean under 
> this name in the appropriate scope.
> 
> Is there a way around this issue?
> 
> Sri
> -Original Message-
> From: Eddie Bush [mailto:ekbush@;swbell.net]
> Sent: Monday, November 11, 2002 3:00 PM
> To: Struts Users Mailing List
> Subject: Re: request.setAttribute() form confusion
> 
> 
> You shouldn't ever have to create the form yourself if you:
> 
> - declare the form-bean in your config file
> - use the name of the form you declared in the action mapping's "name"
> attribute
> 
> 
> 
> ...
> 
> 
> 
> That should suffice.  What you should find is that the form is created
> for you.  Doing things as I mention simplifies you actions so that they 
> can just expect the form to be there.  If the form is not there you will
> 
> probably NPE.  That would indicate that you didn't create the
> association (by setting name="myForm") or Struts wasn't able to create 
> the form for some odd reason.
> 
> Susan Bradeen wrote:
> 
> >Nevermind, answering my own question ...
> >
> >actions in the Struts examples don't use the second line of code, so 
> >the answer is no, you don't need the two together.
> >
> >Susan
> >
> --
> Eddie Bush
> 
> 
> 
> 
> --
> To unsubscribe, e-mail: 
> 
> For additional commands, e-mail: 
> 
> 
> 
> --
> To unsubscribe, e-mail: 
> 
> For additional commands, e-mail: 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 


-- 
Kris Schneider 
D.O.Tech   

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [SIDEBAR] Form population (Was RE: request.setAttribute() form confusion)

2002-11-11 Thread Kris Schneider
"...one rarely depends on Struts to auto-generate the form bean?" If you 
changed "rarely" to "almost always", I'd tend to agree with you ;-). I make a 
clear distinction between form creation/retrieval and population/modification. 
Take the typical: 

EditAction -> JSP -> SaveAction

In general, the action mappings for both EditAction and SaveAction would use 
the same form bean. EditAction takes the form bean created/retrieved by Struts, 
populates/modifies it with data obtained from the business layer, and then 
forwards to the JSP for display. The user interacts with the page, submits to 
SaveAction which takes the form bean created/retrieved *and* populated/modified 
(from request params) by Struts and uses its data to interact with the business 
layer. So, I guess the key difference is that for EditAction the form bean is 
populated/modified with data from the business layer but for SaveAction it's 
done with data from request params. In both cases, Struts handles the form bean 
creation/retrieval.

Quoting Sri Sankaran <[EMAIL PROTECTED]>:

> From: Sri Sankaran [mailto:Sri.Sankaran@;sas.com] 
> Sent: Monday, November 11, 2002 2:51 PM
> To: 'Struts Users Mailing List'
> Subject: [SIDEBAR] Form population (Was RE: request.setAttribute() form
> confusion)
> 
> 
> While that is true, other than in the case of blank forms, isn't it true
> that one rarely depends on Struts to auto-generate the form bean?  If
> you are presenting data, the form is pre-populated with such data.  This
> data is typically derived by an earlier action -- mediated by a business
> delegate.  
> 
> Say you have action-1 which is invoked when a page-1 is submitted.  It
> does sundry business functions which includes getting the data necessary
> for the next page, page-2 say.  In order for page-2 to pick up this
> data, action-1 must know the 'name' attribute for the action-mapping
> corresponding to page-2 and save the form-bean under this name in the
> appropriate scope.
> 
> Is there a way around this issue?
> 
> Sri
> -Original Message-
> From: Eddie Bush [mailto:ekbush@;swbell.net] 
> Sent: Monday, November 11, 2002 3:00 PM
> To: Struts Users Mailing List
> Subject: Re: request.setAttribute() form confusion
> 
> 
> You shouldn't ever have to create the form yourself if you:
> 
> - declare the form-bean in your config file
> - use the name of the form you declared in the action mapping's "name" 
> attribute
> 
> 
> 
> ...
> 
> 
> 
> That should suffice.  What you should find is that the form is created 
> for you.  Doing things as I mention simplifies you actions so that they 
> can just expect the form to be there.  If the form is not there you will
> 
> probably NPE.  That would indicate that you didn't create the 
> association (by setting name="myForm") or Struts wasn't able to create 
> the form for some odd reason.
> 
> Susan Bradeen wrote:
> 
> >Nevermind, answering my own question ...
> >
> >actions in the Struts examples don't use the second line of code, so
> >the
> >answer is no, you don't need the two together.
> >
> >Susan
> >
> -- 
> Eddie Bush
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


-- 
Kris Schneider 
D.O.Tech   

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:link question

2002-11-11 Thread mike . witt
Doh!  Thanks ... you know it turned green in netbeans editor so I just
thought ...

-Original Message-
From: James Childers [mailto:jchilders@;hotels.com]
Sent: Monday, November 11, 2002 2:42 PM
To: Struts Users Mailing List
Subject: RE: html:link question


 
> 
> 
> If I take that line out, the error goes away.  So, Tomcat will process
> commented out tags?  Doesn't sound right, but I'll keep it in mind.

Actually, this is the correct behavior for code inside of HTML comment tags.
If you want the JSP parser to ignore it you must surround it with JSP
comment tags:

<%-- stuff --%>

-= James


 

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




log4j logging config for a struts app - seeing struts msgs

2002-11-11 Thread Kevin . Hooke
Robert - thats exactly what I was looking for, thanks for your help!

Kevin


Date: Mon, 11 Nov 2002 13:44:43 -0600
From: Robert <[EMAIL PROTECTED]>
Subject: log4j logging config for a struts app - seeing struts msgs
Content-Type: text/plain; charset=us-ascii; format=flowed


Try adding something along the lines of this to your log4j.properties file:

log4j.logger.org.apache=WARN (or ERROR, etc.)

Which means that the packages org.apache and below will log at level
WARN, ERROR, etc.

You can also specify complete class names like:

log4j.logger.org.apache.struts.actions.Action=(level)

HTH,
Robert




This email message and all attachments transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and
privileged information. Please DO NOT forward this email outside of the recipient's 
Company unless expressly authorized to do so herein.  Any
unauthorized review, use, disclosure or distribution is prohibited. If you are not the 
intended recipient, please contact the sender by reply email
and destroy all copies of the original message.

Any views expressed in this email message are those of the individual sender except 
where the sender specifically states them to be the views of Indus
 International, Inc.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [SIDEBAR] Form population (Was RE: request.setAttribute() form confusion)

2002-11-11 Thread Sri Sankaran
Actually, the way I have tried to describe keeps business logic *entirely* out of the 
form-beans and uses them only as the medium of transporting data between the model and 
the view.

I prefer not to put *any* business logic in the form beans (code re-use, lack of 
portability, model/controller separation -- take your pick).

In other words, the form-bean is just a dumb holder of information; it doesn't know 
where the data came from or where it goes.

Is that not the recommended purpose?  Are you suggesting that the form-bean be 
responsible for loading/unloading the data?

Sri 

-Original Message-
From: edgar [mailto:edgar@;blue-moose.net] 
Sent: Monday, November 11, 2002 3:04 PM
To: 'Struts Users Mailing List'
Subject: RE: [SIDEBAR] Form population (Was RE: request.setAttribute() form confusion)


Doesn't doing things the way you are suggesting spread the business logic over the 
view and the controller?

I have found that if you have a overall form which may or may not correspond to a db 
element but pulls in as nested forms the tables that it needs and controls the 
business logic to be a strong way of doing things.  This means that Eddie's comment 
will still hold about letting struts manage the action form.

Edgar

-Original Message-
From: Sri Sankaran [mailto:Sri.Sankaran@;sas.com] 
Sent: Monday, November 11, 2002 2:51 PM
To: 'Struts Users Mailing List'
Subject: [SIDEBAR] Form population (Was RE: request.setAttribute() form
confusion)


While that is true, other than in the case of blank forms, isn't it true that one 
rarely depends on Struts to auto-generate the form bean?  If you are presenting data, 
the form is pre-populated with such data.  This data is typically derived by an 
earlier action -- mediated by a business delegate.  

Say you have action-1 which is invoked when a page-1 is submitted.  It does sundry 
business functions which includes getting the data necessary for the next page, page-2 
say.  In order for page-2 to pick up this data, action-1 must know the 'name' 
attribute for the action-mapping corresponding to page-2 and save the form-bean under 
this name in the appropriate scope.

Is there a way around this issue?

Sri
-Original Message-
From: Eddie Bush [mailto:ekbush@;swbell.net] 
Sent: Monday, November 11, 2002 3:00 PM
To: Struts Users Mailing List
Subject: Re: request.setAttribute() form confusion


You shouldn't ever have to create the form yourself if you:

- declare the form-bean in your config file
- use the name of the form you declared in the action mapping's "name" 
attribute



...



That should suffice.  What you should find is that the form is created 
for you.  Doing things as I mention simplifies you actions so that they 
can just expect the form to be there.  If the form is not there you will

probably NPE.  That would indicate that you didn't create the 
association (by setting name="myForm") or Struts wasn't able to create 
the form for some odd reason.

Susan Bradeen wrote:

>Nevermind, answering my own question ...
>
>actions in the Struts examples don't use the second line of code, so 
>the answer is no, you don't need the two together.
>
>Susan
>
-- 
Eddie Bush




--
To unsubscribe, e-mail: 
For additional commands, e-mail: 


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: request.setAttribute() form confusion

2002-11-11 Thread Susan Bradeen
Thank you for the help Eddie and Kris. I've already got my action mapping 
set up just as you say to have them, so I'll go back to trusting Struts 
with the form creation.

Susan

On 11/11/2002 02:00:55 PM Kris Schneider wrote:

> Susan,
> 
> Here's a response to a different thread with the same type of code 
block:
> 
> http://marc.theaimsgroup.com/?l=struts-user&m=103669042429912&w=2
> 
> I understand this type of approach is used in the example app, but I'd 
say it's
> anything but good practice. In general, if you have an action that's 
going to
> pre-populate a form, it's action mapping should include a name (or 
attribute)
> attribute for the appropriate form. Struts will take care of finding or
> creating the form, ensuring that it's stored in the proper scope, and 
passing
> it to the execute/perform method. All you need to do then is cast it to 
the
> appropriate type.
> 
> Quoting Susan Bradeen <[EMAIL PROTECTED]>:
> 
> > If I have this code, which appears to be good practice, in the 
beginning
> > of my pre-action's execute() method:
> >
> >if (form == null) {
> >   form = new SomeForm();
> >   if ("request".equals(mapping.getScope())) {
> >  request.setAttribute(mapping.getAttribute(), form);
> >   }
> >   else {
> >  request.getSession().setAttribute(mapping.getAttribute(), 
form);
> >   }
> >}
> >SomeForm myForm = (SomeForm)form;
> >/* populate form values ...  */
> >
> > Do I also need to use the following line at the end (after form
> > population), or is this basically accomplishing the same as the above?
> >
> >request.setAttribute(mapping.getAttribute(), myForm);
> >
> >
> > Thanks,
> > Susan Bradeen
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
> 
> 
> --
> Kris Schneider 
> D.O.Tech   
> 
> --
> To unsubscribe, e-mail: 

> For additional commands, e-mail: 

> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [SIDEBAR] Form population (Was RE: request.setAttribute() form confusion)

2002-11-11 Thread edgar
Doesn't doing things the way you are suggesting spread the business
logic over the view and the controller?

I have found that if you have a overall form which may or may not
correspond to a db element but pulls in as nested forms the tables that
it needs and controls the business logic to be a strong way of doing
things.  This means that Eddie's comment will still hold about letting
struts manage the action form.

Edgar

-Original Message-
From: Sri Sankaran [mailto:Sri.Sankaran@;sas.com] 
Sent: Monday, November 11, 2002 2:51 PM
To: 'Struts Users Mailing List'
Subject: [SIDEBAR] Form population (Was RE: request.setAttribute() form
confusion)


While that is true, other than in the case of blank forms, isn't it true
that one rarely depends on Struts to auto-generate the form bean?  If
you are presenting data, the form is pre-populated with such data.  This
data is typically derived by an earlier action -- mediated by a business
delegate.  

Say you have action-1 which is invoked when a page-1 is submitted.  It
does sundry business functions which includes getting the data necessary
for the next page, page-2 say.  In order for page-2 to pick up this
data, action-1 must know the 'name' attribute for the action-mapping
corresponding to page-2 and save the form-bean under this name in the
appropriate scope.

Is there a way around this issue?

Sri
-Original Message-
From: Eddie Bush [mailto:ekbush@;swbell.net] 
Sent: Monday, November 11, 2002 3:00 PM
To: Struts Users Mailing List
Subject: Re: request.setAttribute() form confusion


You shouldn't ever have to create the form yourself if you:

- declare the form-bean in your config file
- use the name of the form you declared in the action mapping's "name" 
attribute



...



That should suffice.  What you should find is that the form is created 
for you.  Doing things as I mention simplifies you actions so that they 
can just expect the form to be there.  If the form is not there you will

probably NPE.  That would indicate that you didn't create the 
association (by setting name="myForm") or Struts wasn't able to create 
the form for some odd reason.

Susan Bradeen wrote:

>Nevermind, answering my own question ...
>
>actions in the Struts examples don't use the second line of code, so
>the
>answer is no, you don't need the two together.
>
>Susan
>
-- 
Eddie Bush




--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[SIDEBAR] Form population (Was RE: request.setAttribute() form confusion)

2002-11-11 Thread Sri Sankaran
While that is true, other than in the case of blank forms, isn't it true that one 
rarely depends on Struts to auto-generate the form bean?  If you are presenting data, 
the form is pre-populated with such data.  This data is typically derived by an 
earlier action -- mediated by a business delegate.  

Say you have action-1 which is invoked when a page-1 is submitted.  It does sundry 
business functions which includes getting the data necessary for the next page, page-2 
say.  In order for page-2 to pick up this data, action-1 must know the 'name' 
attribute for the action-mapping corresponding to page-2 and save the form-bean under 
this name in the appropriate scope.

Is there a way around this issue?

Sri
-Original Message-
From: Eddie Bush [mailto:ekbush@;swbell.net] 
Sent: Monday, November 11, 2002 3:00 PM
To: Struts Users Mailing List
Subject: Re: request.setAttribute() form confusion


You shouldn't ever have to create the form yourself if you:

- declare the form-bean in your config file
- use the name of the form you declared in the action mapping's "name" 
attribute



...



That should suffice.  What you should find is that the form is created 
for you.  Doing things as I mention simplifies you actions so that they 
can just expect the form to be there.  If the form is not there you will 
probably NPE.  That would indicate that you didn't create the 
association (by setting name="myForm") or Struts wasn't able to create 
the form for some odd reason.

Susan Bradeen wrote:

>Nevermind, answering my own question ...
>
>actions in the Struts examples don't use the second line of code, so 
>the
>answer is no, you don't need the two together.
>
>Susan
>
-- 
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




page attribute for validator's formfield (multi-page form wizard)

2002-11-11 Thread Derek Lin
I just have some thoughts about this issue:

In validation.xml, one can specify the page of a filed like:


But doing so will limit the filed to be defined in page 1 (coupling the field and the 
page).  That will defeat reusability.  I mean if I want to use this filed in page 2 of 
some other wizard, no validation will be processed.  Am I seeing this correctly?

I think one of the solution is to modify the validator code.  The validator code 
should check the existence of the field before validating (even if they are present in 
the validation.xml file).  The fields shouldn't be validated if they don't exists.

-- Derek



RE: html:link question

2002-11-11 Thread edgar
If you are using xml jsp there is no equivalent to <%-- comment --%>.

How would that work?

Edgar

-Original Message-
From: James Childers [mailto:jchilders@;hotels.com] 
Sent: Monday, November 11, 2002 2:42 PM
To: 'Struts Users Mailing List'
Subject: RE: html:link question


 
> 
> 
> If I take that line out, the error goes away.  So, Tomcat will process

> commented out tags?  Doesn't sound right, but I'll keep it in mind.

Actually, this is the correct behavior for code inside of HTML comment
tags. If you want the JSP parser to ignore it you must surround it with
JSP comment tags:

<%-- stuff --%>

-= James


 

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: log4j logging config for a struts app - seeing struts msgs

2002-11-11 Thread Robert
Try adding something along the lines of this to your log4j.properties file:

log4j.logger.org.apache=WARN (or ERROR, etc.)

Which means that the packages org.apache and below will log at level 
WARN, ERROR, etc.

You can also specify complete class names like:

log4j.logger.org.apache.struts.actions.Action=(level)

HTH,
Robert

[EMAIL PROTECTED] wrote:

Hi  - I am using Commons Logging/log4j in my struts app. When I added my
commons-logging.properties and log4j.properties to the classpath in my
struts webapp it enabled a huge amount of logging within the Struts
framework (ie I see loads of INFO and DEBUG messages from Struts framework
classes in addition to my own messages).

I don't understand enough about the logf4 config to configure this right.
I'm sure my config is too broad and that is why I am seeing all the
additional messages.

I tried setting the rootLogger level to ERROR which I though would restrict
the msgs, but this doesn't seem to have any effect.

I have also set the detail and debug values in web.xml to 0, but this
doesn't seem to have any effect either.

Heres the content of my log4j.properties:

log4j.rootLogger=ERROR

#define logger 'iaw_admin'
log4j.logger.iaw_admin=DEBUG, Console, Rolling

log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d{ISO8601}  %5p [%t]
(%F:%L) - %m%n

log4j.appender.Rolling=org.apache.log4j.RollingFileAppender
log4j.appender.Rolling.File=iaw_admin.log
log4j.appender.Rolling.MaxFileSize=10KB
log4j.appender.Rolling.MaxBackupIndex=1
log4j.appender.Rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.Rolling.layout.ConversionPattern=%d{ISO8601}  %p %t %c -
%m%n

I'd like to restrict the logging to either a) only my classes (based on a
package name?), or b) only see errors from the logger I have configured
here, iaw_admin, and turn all other log msgs off.

Any ideas?

Thanks in advance, Kevin


This email message and all attachments transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and
privileged information. Please DO NOT forward this email outside of the recipient's Company unless expressly authorized to do so herein.  Any
unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email
and destroy all copies of the original message.

Any views expressed in this email message are those of the individual sender except where the sender specifically states them to be the views of Indus
International, Inc.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: html:link question

2002-11-11 Thread Brian Hickey
Mike,

The HTML comment isn't applied until the page is rendered. Use the Java
comment to prevent processing.

Brian

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 11, 2002 1:37 PM
Subject: RE: html:link question


> Hue,
>
> I think I found the problem.  In my welcome.jsp, I have the followin g
line
> (which is commented out):
>
> 
>
> If I take that line out, the error goes away.  So, Tomcat will process
> commented out tags?  Doesn't sound right, but I'll keep it in mind.
>
> Thanks for your help, Mike
>
> -Original Message-
> From: Hue Holleran [mailto:hueh@;softwareskills.net]
> Sent: Monday, November 11, 2002 10:57 AM
> To: 'Struts Users Mailing List'
> Subject: RE: html:link question
>
>
> Hi Mike,
>
> Sorry for the delay in getting back to you - do you still have an issue
with
> this?
>
> OK, personally - I've never seen this exact error before and I've not been
> successful in attempting to reproduce: "Exception forwarding for name
> welcome:" and attempts to reproduce this error were not successful!
>
> The error seems to come from:
>
> ...
> at org.apache.jsp.index_jsp._jspService(index_jsp.java:60)
> ...
>
> i.e. index.jsp
>
> When I reproduced your actions and forwards, I used an index.jsp, as
> follows:
>
> <%@page contentType="text/html"%>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> Administrative Functions
>
> ... and this worked fine.
>
> >> I've been trying different things and now I'm getting it on welcome ...
> it's
> going from bad to worse. <<
>
> OK - what's your current state of play - i.e. would it helped if I sent
you
> the play app (as a .war) I was using to test the code you posted - as it
> does seem to work for me?
>
> H.
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:mike.witt@;honeywell.com]
> Sent: 08 November 2002 20:20
> To: [EMAIL PROTECTED]
> Subject: RE: html:link question
>
>
> Hi Hue,
>
> You're a glutton for punishment, but here is the whole thing:
>
> org.apache.jasper.JasperException: Exception forwarding for name welcome:
> org.apache.jasper.JasperException: Cannot create rewrite URL:
> java.net.MalformedURLException: Cannot retrive ActionForward named admin
> at
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
> 48)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:247)
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:260)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:191)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
> )
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> java:170)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
> )
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :174)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
> at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
> ction(Htt

RE: html:link question

2002-11-11 Thread James Childers
 
> 
> 
> If I take that line out, the error goes away.  So, Tomcat will process
> commented out tags?  Doesn't sound right, but I'll keep it in mind.

Actually, this is the correct behavior for code inside of HTML comment tags. If you 
want the JSP parser to ignore it you must surround it with JSP comment tags:

<%-- stuff --%>

-= James


 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:link question

2002-11-11 Thread mike . witt
Hue,

I think I found the problem.  In my welcome.jsp, I have the followin g line
(which is commented out):



If I take that line out, the error goes away.  So, Tomcat will process
commented out tags?  Doesn't sound right, but I'll keep it in mind.

Thanks for your help, Mike

-Original Message-
From: Hue Holleran [mailto:hueh@;softwareskills.net]
Sent: Monday, November 11, 2002 10:57 AM
To: 'Struts Users Mailing List'
Subject: RE: html:link question


Hi Mike,

Sorry for the delay in getting back to you - do you still have an issue with
this?

OK, personally - I've never seen this exact error before and I've not been
successful in attempting to reproduce: "Exception forwarding for name
welcome:" and attempts to reproduce this error were not successful!

The error seems to come from:

...
at org.apache.jsp.index_jsp._jspService(index_jsp.java:60)
...

i.e. index.jsp

When I reproduced your actions and forwards, I used an index.jsp, as
follows:

<%@page contentType="text/html"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
Administrative Functions

... and this worked fine.

>> I've been trying different things and now I'm getting it on welcome ...
it's
going from bad to worse. <<

OK - what's your current state of play - i.e. would it helped if I sent you
the play app (as a .war) I was using to test the code you posted - as it
does seem to work for me?

H.

-Original Message-
From: [EMAIL PROTECTED] [mailto:mike.witt@;honeywell.com]
Sent: 08 November 2002 20:20
To: [EMAIL PROTECTED]
Subject: RE: html:link question


Hi Hue,

You're a glutton for punishment, but here is the whole thing:

org.apache.jasper.JasperException: Exception forwarding for name welcome:
org.apache.jasper.JasperException: Cannot create rewrite URL:
java.net.MalformedURLException: Cannot retrive ActionForward named admin
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
48)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
at java.lang.Thread.run(Thread.java:484)


root cause

java

reset form link

2002-11-11 Thread Mark Ayad
I'm using the following to call the edit action that pre-populates a form.



However once the form is submitted (with errors) the above link does nothing. If I 
replace  with the word reset, 
everything works fine.

In all cases I would like the reset to reset the form back to its pre-populated state.

Mark





log4j logging config for a struts app - seeing struts msgs

2002-11-11 Thread Kevin . Hooke
Hi  - I am using Commons Logging/log4j in my struts app. When I added my
commons-logging.properties and log4j.properties to the classpath in my
struts webapp it enabled a huge amount of logging within the Struts
framework (ie I see loads of INFO and DEBUG messages from Struts framework
classes in addition to my own messages).

I don't understand enough about the logf4 config to configure this right.
I'm sure my config is too broad and that is why I am seeing all the
additional messages.

I tried setting the rootLogger level to ERROR which I though would restrict
the msgs, but this doesn't seem to have any effect.

I have also set the detail and debug values in web.xml to 0, but this
doesn't seem to have any effect either.

Heres the content of my log4j.properties:

log4j.rootLogger=ERROR

#define logger 'iaw_admin'
log4j.logger.iaw_admin=DEBUG, Console, Rolling

log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d{ISO8601}  %5p [%t]
(%F:%L) - %m%n

log4j.appender.Rolling=org.apache.log4j.RollingFileAppender
log4j.appender.Rolling.File=iaw_admin.log
log4j.appender.Rolling.MaxFileSize=10KB
log4j.appender.Rolling.MaxBackupIndex=1
log4j.appender.Rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.Rolling.layout.ConversionPattern=%d{ISO8601}  %p %t %c -
%m%n

I'd like to restrict the logging to either a) only my classes (based on a
package name?), or b) only see errors from the logger I have configured
here, iaw_admin, and turn all other log msgs off.

Any ideas?

Thanks in advance, Kevin


This email message and all attachments transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and
privileged information. Please DO NOT forward this email outside of the recipient's 
Company unless expressly authorized to do so herein.  Any
unauthorized review, use, disclosure or distribution is prohibited. If you are not the 
intended recipient, please contact the sender by reply email
and destroy all copies of the original message.

Any views expressed in this email message are those of the individual sender except 
where the sender specifically states them to be the views of Indus
 International, Inc.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: request.setAttribute() form confusion

2002-11-11 Thread Kris Schneider
Susan,

Here's a response to a different thread with the same type of code block:

http://marc.theaimsgroup.com/?l=struts-user&m=103669042429912&w=2

I understand this type of approach is used in the example app, but I'd say it's 
anything but good practice. In general, if you have an action that's going to 
pre-populate a form, it's action mapping should include a name (or attribute) 
attribute for the appropriate form. Struts will take care of finding or 
creating the form, ensuring that it's stored in the proper scope, and passing 
it to the execute/perform method. All you need to do then is cast it to the 
appropriate type.

Quoting Susan Bradeen <[EMAIL PROTECTED]>:

> If I have this code, which appears to be good practice, in the beginning 
> of my pre-action's execute() method:
> 
>if (form == null) {
>   form = new SomeForm();
>   if ("request".equals(mapping.getScope())) {
>  request.setAttribute(mapping.getAttribute(), form);
>   }
>   else {
>  request.getSession().setAttribute(mapping.getAttribute(), form);
>   }
>}
>SomeForm myForm = (SomeForm)form;
>/* populate form values ...  */
> 
> Do I also need to use the following line at the end (after form 
> population), or is this basically accomplishing the same as the above? 
> 
>request.setAttribute(mapping.getAttribute(), myForm);
> 
> 
> Thanks,
> Susan Bradeen
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


-- 
Kris Schneider 
D.O.Tech   

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: request.setAttribute() form confusion

2002-11-11 Thread Eddie Bush
You shouldn't ever have to create the form yourself if you:

- declare the form-bean in your config file
- use the name of the form you declared in the action mapping's "name" 
attribute



...



That should suffice.  What you should find is that the form is created 
for you.  Doing things as I mention simplifies you actions so that they 
can just expect the form to be there.  If the form is not there you will 
probably NPE.  That would indicate that you didn't create the 
association (by setting name="myForm") or Struts wasn't able to create 
the form for some odd reason.

Susan Bradeen wrote:

Nevermind, answering my own question ... 

actions in the Struts examples don't use the second line of code, so the 
answer is no, you don't need the two together.

Susan

--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: request.setAttribute() form confusion

2002-11-11 Thread Susan Bradeen
Nevermind, answering my own question ... 

actions in the Struts examples don't use the second line of code, so the 
answer is no, you don't need the two together.

Susan

On 11/11/2002 01:34:16 PM "Susan Bradeen" wrote:

> If I have this code, which appears to be good practice, in the beginning
> of my pre-action's execute() method:
> 
> if (form == null) {
> form = new SomeForm();
> if ("request".equals(mapping.getScope())) {
> request.setAttribute(mapping.getAttribute(), form);
> }
> else {
> request.getSession().setAttribute(mapping.getAttribute(), form);
> }
> }
> SomeForm myForm = (SomeForm)form;
> /* populate form values ...  */
> 
> Do I also need to use the following line at the end (after form
> population), or is this basically accomplishing the same as the above?
> 
> request.setAttribute(mapping.getAttribute(), myForm);
> 
> 
> Thanks,
> Susan Bradeen
> 
> --
> To unsubscribe, e-mail: 

> For additional commands, e-mail: 

> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Dynamic Value for logic equal

2002-11-11 Thread edgar
Isn't there a complexity that this doesn't necessarily solve, if you are
using the 'OLD' parallel sets of value/label collections.  Or are you
saying that those should be updated to the new LabelValueBean when you
move from 1.02 to 1.1+.

Thanks

Edgar


-Original Message-
From: David M. Karr [mailto:dmkarr@;earthlink.net] 
Sent: Saturday, November 09, 2002 7:25 PM
To: '[EMAIL PROTECTED]'
Subject: Re: Dynamic Value for logic equal


> "David" == David M Karr <[EMAIL PROTECTED]> writes:

> "Vikram" == Vikram Goyal <[EMAIL PROTECTED]> writes:

David> Your alternatives are to use a scriptlet or to use the
Struts-EL library in the
David> nightly build (as described in another response to this).
With Struts-EL, a
David> direct translation of your code would look something like the
following (with
David> some renaming):

David>  
David>   
David>
David>   
David>  

Slight correction:

  
   

   
  

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tiles validates ActionForm (second try)

2002-11-11 Thread Richards, Devin N (Devin)
I don't know if it is "proper" or not, but when we have a form that needs to be 
validated, we have 2 different actions associated with it. The first action just 
displays the empty (or pre-populated) form with NO validation. The second calls a 
different action that processes the form and has validation turned on.

FYI

-Devin



-Original Message-
From: Roland Carlsson [mailto:roland.c@;swetravel.se]
Sent: Monday, November 11, 2002 5:48 AM
To: Struts Users Mailing List
Subject: Tiles validates ActionForm (second try)


Hi!
I didn't get any answer to my question on this topic so I'll try again.

I have an ActionForm in a page that is a part of a Tiles-definition. The problem is 
that the form is validated before the user have sent the form. If there are any not 
null checks they will present the user with errormessages that should not be presented 
to the user until she/he fails to fill out the form correctly and submit. 

I have tried the form without tiles and it worked perfectly. 

Is this a know error in Struts 1.1b2 and is there a way around this problem?

Thanks in advance
Roland Carlsson


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




request.setAttribute() form confusion

2002-11-11 Thread Susan Bradeen
If I have this code, which appears to be good practice, in the beginning 
of my pre-action's execute() method:

   if (form == null) {
  form = new SomeForm();
  if ("request".equals(mapping.getScope())) {
 request.setAttribute(mapping.getAttribute(), form);
  }
  else {
 request.getSession().setAttribute(mapping.getAttribute(), form);
  }
   }
   SomeForm myForm = (SomeForm)form;
   /* populate form values ...  */

Do I also need to use the following line at the end (after form 
population), or is this basically accomplishing the same as the above? 

   request.setAttribute(mapping.getAttribute(), myForm);


Thanks,
Susan Bradeen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tiles validates ActionForm (second try)

2002-11-11 Thread James Mitchell
Hi Roland,

Could you provide a few more details about your tiles definitions and action
mappings?

James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org

"If you were plowing a field, which would you rather use? Two strong oxen or
1024 chickens?"
- Seymour Cray (1925-1996), father of supercomputing


> -Original Message-
> From: Roland Carlsson [mailto:roland.c@;swetravel.se]
> Sent: Monday, November 11, 2002 5:48 AM
> To: Struts Users Mailing List
> Subject: Tiles validates ActionForm (second try)
>
>
> Hi!
> I didn't get any answer to my question on this topic so I'll try again.
>
> I have an ActionForm in a page that is a part of a
> Tiles-definition. The problem is that the form is validated
> before the user have sent the form. If there are any not null
> checks they will present the user with errormessages that should
> not be presented to the user until she/he fails to fill out the
> form correctly and submit.
>
> I have tried the form without tiles and it worked perfectly.
>
> Is this a know error in Struts 1.1b2 and is there a way around
> this problem?
>
> Thanks in advance
> Roland Carlsson
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:link question

2002-11-11 Thread mike . witt
Hue,

Thanks for checking back and no it still doesn't work.  Since this project
was just getting off the ground, I was planning on just restarting it.  It
would be helpful if you sent me your .war file ...thank you.  

The weird thing if traced this down to is in my index.jsp when it gets made
in to a .java file, it gets the line:

_jspx_th_html_link_0.setForward("admin");

Since I don't have anything called admin in either the jsp or my
struts-config.xml, I'm really at a loss as to how it is getting there.

Thanks again, Mike

-Original Message-
From: Hue Holleran [mailto:hueh@;softwareskills.net]
Sent: Monday, November 11, 2002 10:57 AM
To: 'Struts Users Mailing List'
Subject: RE: html:link question


Hi Mike,

Sorry for the delay in getting back to you - do you still have an issue with
this?

OK, personally - I've never seen this exact error before and I've not been
successful in attempting to reproduce: "Exception forwarding for name
welcome:" and attempts to reproduce this error were not successful!

The error seems to come from:

...
at org.apache.jsp.index_jsp._jspService(index_jsp.java:60)
...

i.e. index.jsp

When I reproduced your actions and forwards, I used an index.jsp, as
follows:

<%@page contentType="text/html"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
Administrative Functions

... and this worked fine.

>> I've been trying different things and now I'm getting it on welcome ...
it's
going from bad to worse. <<

OK - what's your current state of play - i.e. would it helped if I sent you
the play app (as a .war) I was using to test the code you posted - as it
does seem to work for me?

H.

-Original Message-
From: [EMAIL PROTECTED] [mailto:mike.witt@;honeywell.com]
Sent: 08 November 2002 20:20
To: [EMAIL PROTECTED]
Subject: RE: html:link question


Hi Hue,

You're a glutton for punishment, but here is the whole thing:

org.apache.jasper.JasperException: Exception forwarding for name welcome:
org.apache.jasper.JasperException: Cannot create rewrite URL:
java.net.MalformedURLException: Cannot retrive ActionForward named admin
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
48)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.ja

RE: Single Session - Single Browser Session ?

2002-11-11 Thread James Mitchell
Hi Vic,

I usually handle this with tokens.  I know this doesn't help much with
preventing the user from browsing via hyperlink, but it can help prevent
corrupting data due to invalid state.

I'm sure you could do this with JavaScript, but IMHO that's just something
else to maintain.




James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org

"If you were plowing a field, which would you rather use? Two strong oxen or
1024 chickens?"
- Seymour Cray (1925-1996), father of supercomputing


> -Original Message-
> From: news [mailto:news@;main.gmane.org]On Behalf Of V. Cekvenich
> Sent: Monday, November 11, 2002 10:57 AM
> To: [EMAIL PROTECTED]
> Subject: Single Session - Single Browser Session ?
>
>
> If I want to prevent a user of a browser from opening a same session
> with another browser instance (send him an error), with same session,
> how would I do this on the server side?
> (not on browser, I just want to detect that I have 2 browser with same
> session)
> Ideas, tips, TIA,
>
> .V
>
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Mozilla asking to save *.do ?!

2002-11-11 Thread Michael Delamere
Eddie,

I prefer not to show you the line of embarrassment!  Then you really
would be questioning my intelligence ;-) !

There are a couple of things that I do in my version of the
RequestProcessor.  Trivial things really, but it makes my life a bit
easier.

By the way: I didn?t think that anyone was trying to insult me - I was
just kidding.

> when I get too close to a given tree to see the forest - we've all
done it

Oh yes, I?ve been there, done it and bought the t-shirt - looking at the
same lines of code for hours and in the end it was something completely
stupid!

Regards,

Michael


-Original Message-
From: Eddie Bush [mailto:ekbush@;swbell.net] 
Sent: Montag, 11. November 2002 20:03
To: Struts Users Mailing List
Subject: Re: Mozilla asking to save *.do ?!

:-)  Well I must admit I'm somewhat curious to know what content-type 
you actually set to cause it!

I can't imagine why you would be overriding processContent (that's where

this is done, right?) for anything - but recall that you can invoke the 
super-class method by calling super(...) inside of your overriding 
method.  No, I'm not attempting to insult your intelligence - just 
remind you of a very simple thing that I sometimes forget myself (when I

get too close to a given tree to see the forest - we've all done it, I'd

wager).

Glad you got it fixed ;-)

Michael Delamere wrote:

>Hi,
>
>thought you might like to know how I solved it (even although normally
>there is nothing to solve :-D).  It was of course a silly little error
>which crept up in my lovely piece of code - as suggested, I set the
>wrong "content-type" in my RequestProcessor :-).
>
>Just out of interest, was the title of this thread enough to get anyone
>to panic?  I almost did when I first fell into the trap ;-) !
>
>Replacing it with this line immediately solved the problem:
>response.setContentType("text/html; charset=UTF-8");
>
>And yes, Mozilla is great - The explorer just ignored my error!
>
>Regards,
>
>Michael
>
-- 
Eddie Bush




--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Mozilla asking to save *.do ?!

2002-11-11 Thread Eddie Bush
:-)  Well I must admit I'm somewhat curious to know what content-type 
you actually set to cause it!

I can't imagine why you would be overriding processContent (that's where 
this is done, right?) for anything - but recall that you can invoke the 
super-class method by calling super(...) inside of your overriding 
method.  No, I'm not attempting to insult your intelligence - just 
remind you of a very simple thing that I sometimes forget myself (when I 
get too close to a given tree to see the forest - we've all done it, I'd 
wager).

Glad you got it fixed ;-)

Michael Delamere wrote:

Hi,

thought you might like to know how I solved it (even although normally
there is nothing to solve :-D).  It was of course a silly little error
which crept up in my lovely piece of code - as suggested, I set the
wrong "content-type" in my RequestProcessor :-).

Just out of interest, was the title of this thread enough to get anyone
to panic?  I almost did when I first fell into the trap ;-) !

Replacing it with this line immediately solved the problem:
response.setContentType("text/html; charset=UTF-8");

And yes, Mozilla is great - The explorer just ignored my error!

Regards,

Michael


--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Mozilla asking to save *.do ?!

2002-11-11 Thread Michael Delamere
Hi,

thought you might like to know how I solved it (even although normally
there is nothing to solve :-D).  It was of course a silly little error
which crept up in my lovely piece of code - as suggested, I set the
wrong "content-type" in my RequestProcessor :-).

Just out of interest, was the title of this thread enough to get anyone
to panic?  I almost did when I first fell into the trap ;-) !

Replacing it with this line immediately solved the problem:
response.setContentType("text/html; charset=UTF-8");

And yes, Mozilla is great - The explorer just ignored my error!

Regards,

Michael


-Original Message-
From: Daniel Jaffa [mailto:jaffad@;courtinnovation.org] 
Sent: Montag, 11. November 2002 18:41
To: Struts Users Mailing List
Subject: Re: Mozilla asking to save *.do ?!

Is this a mime type problem,  check the registry hkey_classes_root.  I
had
this problem with netscape about 4 or 5 years ago.

- Original Message -
From: "Michael Delamere" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, November 11, 2002 12:27 PM
Subject: RE: Mozilla asking to save *.do ?!


Simon,

1.  I also think Mozilla is great
2.  Are you trying to insult me or my intelligence? ;-)

Regards,

Michael



-Original Message-
From: Chappell, Simon P [mailto:Simon.Chappell@;landsend.com]
Sent: Montag, 11. November 2002 18:24
To: Struts Users Mailing List
Subject: RE: Mozilla asking to save *.do ?!

Are you trying to view stuff straight from your harddrive? *.do files
are only properly viewable when served up by an appropriate server. Your
symptoms suggest "direct viewing" to me.

+1 for Mozilla being great! :-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


>-Original Message-
>From: Eddie Bush [mailto:ekbush@;swbell.net]
>Sent: Monday, November 11, 2002 12:21 PM
>To: Struts Users Mailing List
>Subject: Re: Mozilla asking to save *.do ?!
>
>
>I can't imagine it.  Mozilla is my primary browser - never had
>an issue
>with it.
>
>Michael Delamere wrote:
>
>>Hi,
>>
>>When calling a *.do URL in Mozilla, I am asked whether I want to save
>>the file or open it using an application!
>>
>>I´m sure that this cannot be the kind of behaviour that one is looking
>>for, when writing an application which consists of about 90% of *.do
>>URLs.
>>
>>Is there a way around this that I may not be aware of right now?  I
>>haven´t actually changed any settings in Mozilla, so this is
>the default
>>behaviour!
>>
>>Has anyone else experienced this?
>>
>>Regards,
>>
>>Michael
>>
>
>--
>Eddie Bush
>
>
>
>
>
>--
>To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: AW: checkbox problem

2002-11-11 Thread Craig R. McClanahan


On Mon, 11 Nov 2002, Hirschmann, Bernhard wrote:

> Date: Mon, 11 Nov 2002 14:42:05 +0100
> From: "Hirschmann, Bernhard" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: AW: checkbox problem
>
>
> Thanks for your comment, but I'm not sure if that's the problem.
>
> Here is the scenario:
> 1.) While populating the form, the value is true.
> 2.) Then the user disables the checkbox - for setting the value to false.
> 3.) Submit occurs.
> 4.) In the action I check the value and I see that it is true.
>
> Do I really have to reset the form for such a scenario?
>

Yes.  Absolutely.

The underlying problem is that an HTML submit includes *nothing* for an
unchecked checkbox, so the server-side Struts code that populates your
form bean's properties has no way to know that it should set this variable
(there is no requirement that every form bean property exist in every
submit, so you can't just use reflection to figure out which properties
are valid).

The Struts solution to this issue *requires* you to set boolean form bean
properties to false in the reset() method in order to correctly deal with
checkboxes.  See the Struts user guide, and the documentation for the
 tag, for more details.

> Regards,
> Bernhard

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Mozilla asking to save *.do ?!

2002-11-11 Thread Daniel Jaffa
Is this a mime type problem,  check the registry hkey_classes_root.  I had
this problem with netscape about 4 or 5 years ago.

- Original Message -
From: "Michael Delamere" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, November 11, 2002 12:27 PM
Subject: RE: Mozilla asking to save *.do ?!


Simon,

1.  I also think Mozilla is great
2.  Are you trying to insult me or my intelligence? ;-)

Regards,

Michael



-Original Message-
From: Chappell, Simon P [mailto:Simon.Chappell@;landsend.com]
Sent: Montag, 11. November 2002 18:24
To: Struts Users Mailing List
Subject: RE: Mozilla asking to save *.do ?!

Are you trying to view stuff straight from your harddrive? *.do files
are only properly viewable when served up by an appropriate server. Your
symptoms suggest "direct viewing" to me.

+1 for Mozilla being great! :-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


>-Original Message-
>From: Eddie Bush [mailto:ekbush@;swbell.net]
>Sent: Monday, November 11, 2002 12:21 PM
>To: Struts Users Mailing List
>Subject: Re: Mozilla asking to save *.do ?!
>
>
>I can't imagine it.  Mozilla is my primary browser - never had
>an issue
>with it.
>
>Michael Delamere wrote:
>
>>Hi,
>>
>>When calling a *.do URL in Mozilla, I am asked whether I want to save
>>the file or open it using an application!
>>
>>I´m sure that this cannot be the kind of behaviour that one is looking
>>for, when writing an application which consists of about 90% of *.do
>>URLs.
>>
>>Is there a way around this that I may not be aware of right now?  I
>>haven´t actually changed any settings in Mozilla, so this is
>the default
>>behaviour!
>>
>>Has anyone else experienced this?
>>
>>Regards,
>>
>>Michael
>>
>
>--
>Eddie Bush
>
>
>
>
>
>--
>To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Mozilla asking to save *.do ?!

2002-11-11 Thread Michael Delamere
I agree with you on that one.  That will be my next step!

I think I´ll have my cup of coffee tomorrow though because I´m about to
go home :-) !

Regards,

Michael

-Original Message-
From: Chappell, Simon P [mailto:Simon.Chappell@;landsend.com] 
Sent: Montag, 11. November 2002 18:34
To: Struts Users Mailing List
Subject: RE: Mozilla asking to save *.do ?!

1. Agreed.
2. No, I'd only do that on Fridays. ;-)

I'm just trying to cover all the bases. Hands up anyone who's never
forgotten to plug something in and wondered why it wasn't working! We
are none of us perfect and I HAVE seen the behaviour described when
surfing my harddrive when i was first learning CGI programming. It's
Monday morning, go have another cup of coffee and read some of the other
helpful replies. The MIME type one looks promising.

Simon

>-Original Message-
>From: Michael Delamere [mailto:home@;michael-delamere.de]
>Sent: Monday, November 11, 2002 11:28 AM
>To: 'Struts Users Mailing List'
>Subject: RE: Mozilla asking to save *.do ?!
>
>
>Simon,
>
>1.  I also think Mozilla is great
>2.  Are you trying to insult me or my intelligence? ;-)
>
>Regards,
>
>Michael
>
>
>
>-Original Message-
>From: Chappell, Simon P [mailto:Simon.Chappell@;landsend.com] 
>Sent: Montag, 11. November 2002 18:24
>To: Struts Users Mailing List
>Subject: RE: Mozilla asking to save *.do ?!
>
>Are you trying to view stuff straight from your harddrive? *.do files
>are only properly viewable when served up by an appropriate 
>server. Your
>symptoms suggest "direct viewing" to me.
>
>+1 for Mozilla being great! :-)
>
>Simon
>
>-
>Simon P. Chappell [EMAIL PROTECTED]
>Java Programming Specialist  www.landsend.com
>Lands' End, Inc.   (608) 935-4526
>
>
>>-Original Message-
>>From: Eddie Bush [mailto:ekbush@;swbell.net]
>>Sent: Monday, November 11, 2002 12:21 PM
>>To: Struts Users Mailing List
>>Subject: Re: Mozilla asking to save *.do ?!
>>
>>
>>I can't imagine it.  Mozilla is my primary browser - never had 
>>an issue 
>>with it.
>>
>>Michael Delamere wrote:
>>
>>>Hi,
>>>
>>>When calling a *.do URL in Mozilla, I am asked whether I want to save
>>>the file or open it using an application!
>>>
>>>I´m sure that this cannot be the kind of behaviour that one 
>is looking
>>>for, when writing an application which consists of about 90% of *.do
>>>URLs.
>>>
>>>Is there a way around this that I may not be aware of right now?  I
>>>haven´t actually changed any settings in Mozilla, so this is 
>>the default
>>>behaviour!
>>>
>>>Has anyone else experienced this?  
>>>
>>>Regards,
>>>
>>>Michael
>>>
>>
>>-- 
>>Eddie Bush
>>
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   
>
>For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:   

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Mozilla asking to save *.do ?!

2002-11-11 Thread Eddie Bush
Yes, that very well could be it.  Heh - sorry, I should have thought 
about that.

Michael Delamere wrote:

Ok,

I think it might have something to do with our own implementation of the
RequestProcessor then...

I´ll have to look into that - I think I set some headers there...

Thanks,

Michael


--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Mozilla asking to save *.do ?!

2002-11-11 Thread Chappell, Simon P
1. Agreed.
2. No, I'd only do that on Fridays. ;-)

I'm just trying to cover all the bases. Hands up anyone who's never forgotten to plug 
something in and wondered why it wasn't working! We are none of us perfect and I HAVE 
seen the behaviour described when surfing my harddrive when i was first learning CGI 
programming. It's Monday morning, go have another cup of coffee and read some of the 
other helpful replies. The MIME type one looks promising.

Simon

>-Original Message-
>From: Michael Delamere [mailto:home@;michael-delamere.de]
>Sent: Monday, November 11, 2002 11:28 AM
>To: 'Struts Users Mailing List'
>Subject: RE: Mozilla asking to save *.do ?!
>
>
>Simon,
>
>1.  I also think Mozilla is great
>2.  Are you trying to insult me or my intelligence? ;-)
>
>Regards,
>
>Michael
>
>
>
>-Original Message-
>From: Chappell, Simon P [mailto:Simon.Chappell@;landsend.com] 
>Sent: Montag, 11. November 2002 18:24
>To: Struts Users Mailing List
>Subject: RE: Mozilla asking to save *.do ?!
>
>Are you trying to view stuff straight from your harddrive? *.do files
>are only properly viewable when served up by an appropriate 
>server. Your
>symptoms suggest "direct viewing" to me.
>
>+1 for Mozilla being great! :-)
>
>Simon
>
>-
>Simon P. Chappell [EMAIL PROTECTED]
>Java Programming Specialist  www.landsend.com
>Lands' End, Inc.   (608) 935-4526
>
>
>>-Original Message-
>>From: Eddie Bush [mailto:ekbush@;swbell.net]
>>Sent: Monday, November 11, 2002 12:21 PM
>>To: Struts Users Mailing List
>>Subject: Re: Mozilla asking to save *.do ?!
>>
>>
>>I can't imagine it.  Mozilla is my primary browser - never had 
>>an issue 
>>with it.
>>
>>Michael Delamere wrote:
>>
>>>Hi,
>>>
>>>When calling a *.do URL in Mozilla, I am asked whether I want to save
>>>the file or open it using an application!
>>>
>>>I´m sure that this cannot be the kind of behaviour that one 
>is looking
>>>for, when writing an application which consists of about 90% of *.do
>>>URLs.
>>>
>>>Is there a way around this that I may not be aware of right now?  I
>>>haven´t actually changed any settings in Mozilla, so this is 
>>the default
>>>behaviour!
>>>
>>>Has anyone else experienced this?  
>>>
>>>Regards,
>>>
>>>Michael
>>>
>>
>>-- 
>>Eddie Bush
>>
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   
>
>For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:   

For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Mozilla asking to save *.do ?!

2002-11-11 Thread Michael Delamere
Ok,

I think it might have something to do with our own implementation of the
RequestProcessor then...

I´ll have to look into that - I think I set some headers there...

Thanks,

Michael

-Original Message-
From: James Childers [mailto:jchilders@;hotels.com] 
Sent: Montag, 11. November 2002 18:26
To: Struts Users Mailing List
Subject: RE: Mozilla asking to save *.do ?!

> When calling a *.do URL in Mozilla, I am asked whether I want to save
> the file or open it using an application!

I also use Mozilla as my primary browser and have never encountered
this. Make sure you're viewing the .do through http://, not file://. If
that doesn't work, make sure that you haven't changed the MIME type you
are serving through your action to something other than text/html.

Hope this helps,

-= J

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Mozilla asking to save *.do ?!

2002-11-11 Thread Michael Delamere
Simon,

1.  I also think Mozilla is great
2.  Are you trying to insult me or my intelligence? ;-)

Regards,

Michael



-Original Message-
From: Chappell, Simon P [mailto:Simon.Chappell@;landsend.com] 
Sent: Montag, 11. November 2002 18:24
To: Struts Users Mailing List
Subject: RE: Mozilla asking to save *.do ?!

Are you trying to view stuff straight from your harddrive? *.do files
are only properly viewable when served up by an appropriate server. Your
symptoms suggest "direct viewing" to me.

+1 for Mozilla being great! :-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


>-Original Message-
>From: Eddie Bush [mailto:ekbush@;swbell.net]
>Sent: Monday, November 11, 2002 12:21 PM
>To: Struts Users Mailing List
>Subject: Re: Mozilla asking to save *.do ?!
>
>
>I can't imagine it.  Mozilla is my primary browser - never had 
>an issue 
>with it.
>
>Michael Delamere wrote:
>
>>Hi,
>>
>>When calling a *.do URL in Mozilla, I am asked whether I want to save
>>the file or open it using an application!
>>
>>I´m sure that this cannot be the kind of behaviour that one is looking
>>for, when writing an application which consists of about 90% of *.do
>>URLs.
>>
>>Is there a way around this that I may not be aware of right now?  I
>>haven´t actually changed any settings in Mozilla, so this is 
>the default
>>behaviour!
>>
>>Has anyone else experienced this?  
>>
>>Regards,
>>
>>Michael
>>
>
>-- 
>Eddie Bush
>
>
>
>
>
>--
>To unsubscribe, e-mail:   

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Mozilla asking to save *.do ?!

2002-11-11 Thread Michael Delamere
Hmmm have you got the latest release?  I am using Mozilla 1.0.1.

In fact, our design team have had exactly the same issue using Mozilla
1.0.0 on the Macintosh.

It is definitely there!

Regards,

Michael



-Original Message-
From: Eddie Bush [mailto:ekbush@;swbell.net] 
Sent: Montag, 11. November 2002 19:21
To: Struts Users Mailing List
Subject: Re: Mozilla asking to save *.do ?!

I can't imagine it.  Mozilla is my primary browser - never had an issue 
with it.

Michael Delamere wrote:

>Hi,
>
>When calling a *.do URL in Mozilla, I am asked whether I want to save
>the file or open it using an application!
>
>I´m sure that this cannot be the kind of behaviour that one is looking
>for, when writing an application which consists of about 90% of *.do
>URLs.
>
>Is there a way around this that I may not be aware of right now?  I
>haven´t actually changed any settings in Mozilla, so this is the
default
>behaviour!
>
>Has anyone else experienced this?  
>
>Regards,
>
>Michael
>

-- 
Eddie Bush





--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Mozilla asking to save *.do ?!

2002-11-11 Thread James Childers
> When calling a *.do URL in Mozilla, I am asked whether I want to save
> the file or open it using an application!

I also use Mozilla as my primary browser and have never encountered this. Make sure 
you're viewing the .do through http://, not file://. If that doesn't work, make sure 
that you haven't changed the MIME type you are serving through your action to 
something other than text/html.

Hope this helps,

-= J

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Mozilla asking to save *.do ?!

2002-11-11 Thread Chappell, Simon P
Are you trying to view stuff straight from your harddrive? *.do files are only 
properly viewable when served up by an appropriate server. Your symptoms suggest 
"direct viewing" to me.

+1 for Mozilla being great! :-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


>-Original Message-
>From: Eddie Bush [mailto:ekbush@;swbell.net]
>Sent: Monday, November 11, 2002 12:21 PM
>To: Struts Users Mailing List
>Subject: Re: Mozilla asking to save *.do ?!
>
>
>I can't imagine it.  Mozilla is my primary browser - never had 
>an issue 
>with it.
>
>Michael Delamere wrote:
>
>>Hi,
>>
>>When calling a *.do URL in Mozilla, I am asked whether I want to save
>>the file or open it using an application!
>>
>>I´m sure that this cannot be the kind of behaviour that one is looking
>>for, when writing an application which consists of about 90% of *.do
>>URLs.
>>
>>Is there a way around this that I may not be aware of right now?  I
>>haven´t actually changed any settings in Mozilla, so this is 
>the default
>>behaviour!
>>
>>Has anyone else experienced this?  
>>
>>Regards,
>>
>>Michael
>>
>
>-- 
>Eddie Bush
>
>
>
>
>
>--
>To unsubscribe, e-mail:   

For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Mozilla asking to save *.do ?!

2002-11-11 Thread Eddie Bush
I can't imagine it.  Mozilla is my primary browser - never had an issue 
with it.

Michael Delamere wrote:

Hi,

When calling a *.do URL in Mozilla, I am asked whether I want to save
the file or open it using an application!

I´m sure that this cannot be the kind of behaviour that one is looking
for, when writing an application which consists of about 90% of *.do
URLs.

Is there a way around this that I may not be aware of right now?  I
haven´t actually changed any settings in Mozilla, so this is the default
behaviour!

Has anyone else experienced this?  

Regards,

Michael


--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: bean:define problem in nested tags

2002-11-11 Thread Karr, David
> -Original Message-
> From: Vinod Kotnala, Noida [mailto:vkotnala@;noida.hcltech.com]
> Sent: Monday, November 11, 2002 7:10 AM
> 
> Ah.. 
>  What I find is that if any of the property has a blank value, the the
> exception occurs !!
> i.e if 
> 
> 
> 
> prints nothing .. then the exception : Define tag can contain 
> only one of
> name attribute, value attribute, or body content
>  gets thrown 
> 
>   Do I consider this as a bug ?

I've actually been thinking about this situation lately.  I don't know if you can call 
it a bug.  It would take some serious thought to see if there's any way to get a 
better error message out of this.

The problem is, the JSP infrastructure was built so that a "containing tag" has to do 
very little to get the "body content" from its contained tags.  In fact, the parent 
tag just references a protected field ("bodyContent") to get the contained body 
content.  It doesn't know how it was generated.  The problem is, if there was real 
content in the body, but it failed to produce a non-null value, then the body content 
will be null, and the parent tag will have no way to know the difference between a 
null value produced by the contained tags, or simply no body content at all.

About the best you could get from this is an error message that indicates something 
like "there was body content, but it produced a null value".  That would be a useful 
message.  Unfortunately, in order to do this, there would have to be some sort of 
communication from the contained tags to the containing tag, perhaps through an 
indirect interface of some sort.

Another alternative might be to use the JSTL "c:out" tag, which has a "default" 
attribute, which is used if the specified value is null.  This would get annoying, 
however, if you had many expressions you wanted to provide some notification if 
they're null.

Another alternative might be a variation of "bean:write" like "bean:writeNotNull", 
which would throw a particular exception if the property value was null.

I'm not necessarily recommending any of these approaches, I'm just explaining why this 
happens, and what possible solutions there might be.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Upload corrupts file

2002-11-11 Thread Roland Polzer
There was a new file-upload module created after the beta 2 release I 
believe.  Can you try a recent nightly build?  Things should work correctly 
now.

Hi,

The problem still exists in jakarta-struts-20021108.zip

Cheers,
Roland

_
MSN Groups & Chat - Freunde finden - leicht gemacht 
http://groups.msn.com/people/


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: html:link question

2002-11-11 Thread Hue Holleran
Hi Mike,

Sorry for the delay in getting back to you - do you still have an issue with
this?

OK, personally - I've never seen this exact error before and I've not been
successful in attempting to reproduce: "Exception forwarding for name
welcome:" and attempts to reproduce this error were not successful!

The error seems to come from:

...
at org.apache.jsp.index_jsp._jspService(index_jsp.java:60)
...

i.e. index.jsp

When I reproduced your actions and forwards, I used an index.jsp, as
follows:

<%@page contentType="text/html"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
Administrative Functions

... and this worked fine.

>> I've been trying different things and now I'm getting it on welcome ...
it's
going from bad to worse. <<

OK - what's your current state of play - i.e. would it helped if I sent you
the play app (as a .war) I was using to test the code you posted - as it
does seem to work for me?

H.

-Original Message-
From: [EMAIL PROTECTED] [mailto:mike.witt@;honeywell.com]
Sent: 08 November 2002 20:20
To: [EMAIL PROTECTED]
Subject: RE: html:link question


Hi Hue,

You're a glutton for punishment, but here is the whole thing:

org.apache.jasper.JasperException: Exception forwarding for name welcome:
org.apache.jasper.JasperException: Cannot create rewrite URL:
java.net.MalformedURLException: Cannot retrive ActionForward named admin
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
48)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
at java.lang.Thread.run(Thread.java:484)


root cause

javax.servlet.ServletException: Exception forwarding for name welcome:
org.apache.jasper.JasperException: Cannot create rewrite URL:
java.net.MalformedURLException: Cannot retrive ActionForward named admin
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:494)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:60)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.s

Single Session - Single Browser Session ?

2002-11-11 Thread V. Cekvenich
If I want to prevent a user of a browser from opening a same session 
with another browser instance (send him an error), with same session, 
how would I do this on the server side?
(not on browser, I just want to detect that I have 2 browser with same 
session)
Ideas, tips, TIA,

.V




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: Question about modules

2002-11-11 Thread Eddie Bush
Emmanuel Boudrant wrote:


Hi,

Does the Struts modules work on Struts 1.1b2 ? The problem is I've got a form :


There were a few issues with the way modules worked in the beta 2 
release.  Grab a nightly and see if your problems persist.


...


The /verifyUser action and the verifyUser formbean are defined in a module named admin
(struts-config-admin.xml). The JSP Form is in the folder /admin/form/verifyUser.jsp

And I've got the message Cannot retrieve mapping for action /verifyUser.

I try with 


...


and same message.

So how does Struts locate the good module to lookup the requested mapping ?

It looks at the URI.  You can examine RequestProcessor.selectApplication 
for source.  Basically, it tries to match the first piece of the URI 
with one of the known prefixes.  At some point past beta 2, this was 
done using a "startsWith" criteria (path startsWith( prefix[i] )) and 
was causing unintended module-changing - and other problems.  Now it 
looks for an exact match and should work a bit better.

-emmanuel


--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Question about modules

2002-11-11 Thread Emmanuel Boudrant
Hi,

Does the Struts modules work on Struts 1.1b2 ? The problem is I've got a form :


...


The /verifyUser action and the verifyUser formbean are defined in a module named admin
(struts-config-admin.xml). The JSP Form is in the folder /admin/form/verifyUser.jsp

And I've got the message Cannot retrieve mapping for action /verifyUser.

I try with 


...


and same message.

So how does Struts locate the good module to lookup the requested mapping ?



-emmanuel

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: bean:define problem in nested tags

2002-11-11 Thread edgar
Sounds like one to me, although if struts-el allows you to work around
it, I wouldn't bother reporting it.

Edgar

-Original Message-
From: Vinod Kotnala, Noida [mailto:vkotnala@;noida.hcltech.com] 
Sent: Monday, November 11, 2002 10:10 AM
To: 'Struts Users Mailing List'
Subject: RE: bean:define problem in nested tags


Ah.. 
 What I find is that if any of the property has a blank value, the the
exception occurs !! i.e if 



prints nothing .. then the exception : Define tag can contain only one
of name attribute, value attribute, or body content  gets thrown 


  Do I consider this as a bug ?

Vinod



-Original Message-
From: edgar [mailto:edgar@;blue-moose.net]
Sent: Monday, November 11, 2002 8:33 PM
To: 'Struts Users Mailing List'
Subject: RE: bean:define problem in nested tags


Are you using 1.1b2?

If not, try updating.

If that doesn't work submit try the JSTL c:set command or see if you can
solve your problem with struts-el.


-Original Message-
From: Vinod Kotnala, Noida [mailto:vkotnala@;noida.hcltech.com] 
Sent: Monday, November 11, 2002 9:43 AM
To: 'Struts Users Mailing List'
Subject: bean:define problem in nested tags


Hi All, 

I want to define 2 or more variables using  tag The
following code works ok..



   
 
   



But when I try to define one more variable  as in:



   
 
   

   
 
   


it gives the exception:

org.apache.jasper.JasperException :  Define tag can contain only one of
name attribute, value attribute, or body content
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:2
46)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)


I've even tried using the nested:define tag, as well as.. but to no avail.

Thanks,
Vinod


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: java.sql.Date formatting problem

2002-11-11 Thread Eddie Bush
You should be using the URI that flare gave you.  Only by using that URI 
can your container optimize performance on the standard tags. 
Otherwise, they have the same overhead as all other custom tags.  In 
short, you want to use the proper URI (the one flare gave you).

kiuma wrote:

thank u,
You helped me to find my stupid problem.
it was that i had defined tag lib as
<%@ taglib uri="/WEB-INF/fmt.tld"
   prefix="f" %>

and not as fmt.

regards 


--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: bean:define problem in nested tags

2002-11-11 Thread Vinod Kotnala, Noida
Ah.. 
 What I find is that if any of the property has a blank value, the the
exception occurs !!
i.e if 



prints nothing .. then the exception : Define tag can contain only one of
name attribute, value attribute, or body content
 gets thrown 


  Do I consider this as a bug ?

Vinod



-Original Message-
From: edgar [mailto:edgar@;blue-moose.net]
Sent: Monday, November 11, 2002 8:33 PM
To: 'Struts Users Mailing List'
Subject: RE: bean:define problem in nested tags


Are you using 1.1b2?

If not, try updating.

If that doesn't work submit try the JSTL c:set command or see if you can
solve your problem with struts-el.


-Original Message-
From: Vinod Kotnala, Noida [mailto:vkotnala@;noida.hcltech.com] 
Sent: Monday, November 11, 2002 9:43 AM
To: 'Struts Users Mailing List'
Subject: bean:define problem in nested tags


Hi All, 

I want to define 2 or more variables using  tag The
following code works ok..



   
 
   



But when I try to define one more variable  as in:



   
 
   

   
 
   


it gives the exception:

org.apache.jasper.JasperException :  Define tag can contain only one of
name attribute, value attribute, or body content
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:2
46)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)


I've even tried using the nested:define tag, as well as.. but to no avail.

Thanks,
Vinod


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Upload corrupts file

2002-11-11 Thread Eddie Bush
There was a new file-upload module created after the beta 2 release I 
believe.  Can you try a recent nightly build?  Things should work 
correctly now.

Roland Polzer wrote:

Hi,

I have a case in which an uploaded file is corrupted by struts.

The file is only 20KB. You can get it from here:
http://home.arcor.de/polzer/testXP.doc

Byte 4097 (originally 0x00) turned into a 0x0A.
I suspect a buffer size of 4 KB and/or a 0x0A 0x0D problem ???

Supposedly this bug is fixed in 1.0.1, but I have tried 1.0.2 and 1.1b 
and it is still there.
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=struts-user@;jakarta.apache.org&msgId=163235 


Thanks,
Roland 

--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[TILES Definitions and Tiles Action

2002-11-11 Thread Postfach 4711
Using struts 1.01 my tiles-defs looks like:


  some other stuff


If I define my action like

public class ActionController extends Action {

public ActionForward perform(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
  throws ServletException {
.

my perform methods is called. If I use

public class ActionController extends TilesAction {

public ActionForward perform( ComponentContext context,
 ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
  throws ServletException {

my perform method is *not* called.

Any ideas why??
  
-- 
Best regards,
Dirk


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Deprecation

2002-11-11 Thread Darren Hill
Ooops

I neglected to check the documentation.war file contained in the
distribution I got .. I simply assumed that the Nightly Build JavaDocs on
the struts web-site would actually contain the Nightly Build JavaDocs.

D.

-Original Message-
From: Darren Hill [mailto:dhill@;724.com]
Sent: November 11, 2002 10:02 AM
To: 'Struts Users Mailing List'
Subject: Deprecation


Where can I find documentation on all of the deprecated variables and
methods.  I just downloaded the nightly build today ... TONS of deprecated
messages.

D.

The JavaDoc doesn't appear to contain any information.

-Original Message-
From: edgar [mailto:edgar@;blue-moose.net]
Sent: November 11, 2002 10:03 AM
To: 'Struts Users Mailing List'
Subject: RE: bean:define problem in nested tags


Are you using 1.1b2?

If not, try updating.

If that doesn't work submit try the JSTL c:set command or see if you can
solve your problem with struts-el.


-Original Message-
From: Vinod Kotnala, Noida [mailto:vkotnala@;noida.hcltech.com] 
Sent: Monday, November 11, 2002 9:43 AM
To: 'Struts Users Mailing List'
Subject: bean:define problem in nested tags


Hi All, 

I want to define 2 or more variables using  tag The
following code works ok..



   
 
   



But when I try to define one more variable  as in:



   
 
   

   
 
   


it gives the exception:

org.apache.jasper.JasperException :  Define tag can contain only one of
name attribute, value attribute, or body content
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:2
46)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)


I've even tried using the nested:define tag, as well as.. but to no avail.

Thanks,
Vinod


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Java WebStart as a Strut front end

2002-11-11 Thread Eddie Bush
Toni Charlot wrote:


I thank you for the correction.  You're absolutely correct.  No I can ask my
questions in a more clever way and perform searches as Eddie suggested.

I looked at the link provided, it wasn't very clear but I can see that it's
doable.


Sorry - the question is occassionally asked, but that's the only answer 
I've ever seen that came close to being a good one.  Much as I hate to 
suggest it (because I know how unhelpful they can be) you might consider 
trying the Sun Java Forums.

Some one ask why the need to go through the web-app and not interface with
the database and server directly?
answer:  I would like to keep the validation, database access, and other
business logic excecution in one place.  the Swing app will be a module
because of the need to access local i/o devices such as the printer, camera,
signature pad, and the like.

May be I could do that through JMS.

Thank you guys and gals.


--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Deprecation

2002-11-11 Thread Darren Hill
Where can I find documentation on all of the deprecated variables and
methods.  I just downloaded the nightly build today ... TONS of deprecated
messages.

D.

The JavaDoc doesn't appear to contain any information.

-Original Message-
From: edgar [mailto:edgar@;blue-moose.net]
Sent: November 11, 2002 10:03 AM
To: 'Struts Users Mailing List'
Subject: RE: bean:define problem in nested tags


Are you using 1.1b2?

If not, try updating.

If that doesn't work submit try the JSTL c:set command or see if you can
solve your problem with struts-el.


-Original Message-
From: Vinod Kotnala, Noida [mailto:vkotnala@;noida.hcltech.com] 
Sent: Monday, November 11, 2002 9:43 AM
To: 'Struts Users Mailing List'
Subject: bean:define problem in nested tags


Hi All, 

I want to define 2 or more variables using  tag The
following code works ok..



   
 
   



But when I try to define one more variable  as in:



   
 
   

   
 
   


it gives the exception:

org.apache.jasper.JasperException :  Define tag can contain only one of
name attribute, value attribute, or body content
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:2
46)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)


I've even tried using the nested:define tag, as well as.. but to no avail.

Thanks,
Vinod


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: bean:define problem in nested tags

2002-11-11 Thread edgar
Are you using 1.1b2?

If not, try updating.

If that doesn't work submit try the JSTL c:set command or see if you can
solve your problem with struts-el.


-Original Message-
From: Vinod Kotnala, Noida [mailto:vkotnala@;noida.hcltech.com] 
Sent: Monday, November 11, 2002 9:43 AM
To: 'Struts Users Mailing List'
Subject: bean:define problem in nested tags


Hi All, 

I want to define 2 or more variables using  tag The
following code works ok..



   
 
   



But when I try to define one more variable  as in:



   
 
   

   
 
   


it gives the exception:

org.apache.jasper.JasperException :  Define tag can contain only one of
name attribute, value attribute, or body content
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:2
46)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)


I've even tried using the nested:define tag, as well as.. but to no avail.

Thanks,
Vinod


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [html:errors] Separation of Global Errors from Specific Errors

2002-11-11 Thread Kris Schneider
Jerry,

I really can't see a way to get at everything *except* the global errors. You 
should be able to get at *just* the global errors with:



Quoting Jerry Jalenak <[EMAIL PROTECTED]>:

> Any help on this at all?
> 
> 
> 
> I know I've this answer before, but I cannot seem to find it in the
> archives.  I am setting ActionErrors for both specific properties as well
> as
> global errors.  In other words, in my action I have 
> 
>   errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("myError"));
> 
> and
> 
>   errors.add("myProperty", new ActionError("myPropertyError"));
> 
> In my JSP I am using  to get my global errors, and
>  to get my specific error.  The
> problem
> is that the  is also returning the specific errors.  I
> remember seeing an e-mail on this a few weeks ago, but can't find it in the
> archives.  Is there a way to limit the  to only display the
> errors that are NOT associated with a specific property?
> 
> 
> TIA!
> 
> Jerry Jalenak
> Web Publishing
> LabOne, Inc.
> 10101 Renner Blvd.
> Lenexa, KS  66219
> (913) 577-1496
> [EMAIL PROTECTED]
> 
> 
> 
> This transmission (and any information attached to it) may be confidential
> and is intended solely for the use of the individual or entity to which it is
> addressed. If you are not the intended recipient or the person responsible
> for delivering the transmission to the intended recipient, be advised that
> you have received this transmission in error and that any use, dissemination,
> forwarding, printing, or copying of this information is strictly prohibited.
> If you have received this transmission in error, please immediately notify
> LabOne at (800)388-4675.
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


-- 
Kris Schneider 
D.O.Tech   

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




bean:define problem in nested tags

2002-11-11 Thread Vinod Kotnala, Noida
Hi All, 

I want to define 2 or more variables using  tag
The following code works ok..



   
 
   



But when I try to define one more variable  as in:



   
 
   

   
 
   


it gives the exception:

org.apache.jasper.JasperException :  Define tag can contain only one of name
attribute, value attribute, or body content
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
46)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)


I've even tried using the nested:define tag, as well as  
 .. but to no avail.

Thanks,
Vinod


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: URGENT:DTD Struts Configuration

2002-11-11 Thread David Graham
I don't think tomcat 3.2 is a supported server.  It may have been for 1.0.2 
but not for 1.1.  You should upgrade to tomcat 4.1.12 if possible.

David






From: "Neginder Singh" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: URGENT:DTD Struts Configuration
Date: Mon, 11 Nov 2002 18:39:19 +0530


Hi All

I am a newbie in Struts. I am using Struts1.0.2 with Tomcat3.2.1.
The problem is when i try the initial step of copying the struts-blank.war 
under tomcat/webapps and restartt tomcat i get the following errors.


Error Stack:

register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 
'jar:file: C:\soap\jakarta-tomcat-3.2.1\webapps\ 
struts-blank\WEB-INF\lib\struts.jar!/org/apache/struts/resources/struts-confi
g_1_0.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 
'jar:file:C:\soap\jakarta-tomcat-3.2.1\webapps\struts-blank\WEB-INF\lib\struts.jar!/org/apache/struts/resources/web-app_2_2.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 
'jar:file:C:\soap\jakarta-tomcat-3.2.1\webapps\struts-blank\WEB-INF\lib\struts.jar!/org/apache/struts/resources/web-app_2_3.dtd'
resolveEntity('-//Apache Software Foundation//DTD Struts Configuration 
1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
Resolving to alternate DTD 
'jar:file:C:\soap\jakarta-tomcat-3.2.1\webapps\struts-blank\WEB-INF\lib\
struts.jar!/org/apache/struts/resources/struts-config_1_0.dtd'
New org.apache.struts.action.ActionMapping
et org.apache.struts.action.ActionMapping properties
Call 
org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/admin/addFormBean, 
type=o
rg.apache.struts.actions.AddFormBeanAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call 
org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/admin/addForward, 
type=or
g.apache.struts.actions.AddForwardAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call 
org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/admin/addMapping, 
type=or
g.apache.struts.actions.AddMappingAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call 
org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/admin/reload, 
type=org.ap
ache.struts.actions.ReloadAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call 
org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/admin/removeFormBean, 
typ
e=org.apache.struts.actions.RemoveFormBeanAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call 
org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/admin/removeForward, 
type
=org.apache.struts.actions.RemoveForwardAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call 
org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/admin/removeMapping, 
type
=org.apache.struts.actions.RemoveMappingAction])
Pop org.apache.struts.action.ActionMapping
register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 
'jar:file:C:\soap\jakart
a-tomcat-3.2.1\webapps\struts-blank\WEB-INF\lib\struts.jar!/org/apache/struts/resources/struts-confi
g_1_0.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 
'jar:file:C:\soap\jakarta-tomcat-
3.2.1\webapps\struts-blank\WEB-INF\lib\struts.jar!/org/apache/struts/resources/web-app_2_2.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 
'jar:file:C:\soap\jakarta-tomcat-
3.2.1\webapps\struts-blank\WEB-INF\lib\struts.jar!/org/apache/struts/resources/web-app_2_3.dtd'
resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 
'http://java.sun.com/j2ee/dt
ds/web-app_2_2.dtd')
Resolving to alternate DTD 
'jar:file:C:\soap\jakarta-tomcat-3.2.1\webapps\struts-blank\WEB-INF\lib\
struts.jar!/org/apache/struts/resources/web-app_2_2.dtd'
Call 
org.apache.struts.action.ActionServlet.addServletMapping(action/java.lang.String,*.do/java.lang
.String)


I have carried out the following steps:

Downloaded the 1.02 version of Struts.
Extracted the download.
Copy the Struts.jar and Pasted it to the lib directory of my struts-blank 
application.

Note: I haven't added it to my CLASSPATH as the tutorials say.

Could you please suggest, where i am going wrong.

I really appreciate any kind of help from your end.

Thanks.

Best,
Neginder

_
MSN 8 with e-

RE: Redux: Actions and business logic, or Using Struts with the Rational Unified Process

2002-11-11 Thread John Bigboote
James,

Thanks for clarifying things for me.

John


--- James Higginbotham
<[EMAIL PROTECTED]> wrote:
> John,
> 
> > is an MVC framework.  Granted, while it tends
> toward
> > the presentation layer, it does provide mechanisms
> > that venture into the problem domain, like
> FormBeans.
> 
> Not quite sure what you mean here, as FormBeans are
> simply javabeans
> that are used to store the user's input form data
> before its mapped to
> the actual business tier. I think you will find that
> although the
> formbeans look very much like your domain objects,
> your HCI and business
> folks may require the presentation to change quite a
> bit and thus they
> will fork a little from the business objects proper
> found in the biz
> domain.
> 
> > Paragraph 2 of the document referenced by that URL
> > says that "Struts provides its own Controller
> > component and integrates with other technologies
> to
> > provide the Model and the View".  It goes on to
> say
> > that this controller can interact with the model
> tier
> > in the form of Javabeans/EJBs, and view components
> > such as JSPs, Velocity templates, etc.  That
> implies
> > that Struts falls closer to the controller than
> one
> > would think.
> 
> Yes, it's a controller in the presentation layer,
> which I stated above.
> It also provides custom JSP tags for the view that
> interact with your
> formbeans, which are part of the presentation layer
> as well. When you
> write a swing application, you don't just write the
> controller or the
> view, you have to write both. So, Struts provides
> help in both of those
> areas, and allows the model to be whatever you want
> it to be -
> Javabeans, EJBs, Mbeans, whatever. 
> 
> > 
> > > > > 
> > > > >  - If an architectural design called for a
> > > > > ScenarioController class for each use case,
> how
> > > > > would the boundary between this class and
> Struts
> > 
> > > > > be manifested?  Should this
> ScenarioController
> > be
> > > > > an  extension of or external to Struts?
> > > 
> > > Well, generally a scenario has an associated set
> of
> > > business logic to be done on the backend to 
> > > accomplish this goal. Thus, you would probably
> > > engineer a stateless EJB that would contain 1 or
> > > more methods to accomplish this goal (probably
> one 
> > > method, which may invoke multiple other
> components/ 
> > > EJBs once the single remote call from the web
> tier
> > is
> > > made). 
> > > 
> > 
> > Agreed.  I guess the nature of my question stems
> from
> > the controller provided in Struts.  In the
> interests
> > of loose coupling of tiers, I would think that the
> > struts controller should be separate from scenario
> > controller  rather than putting scenario (i.e.
> > business) logic in the struts controller.  
> 
> Right. This is why in the statement above, I mention
> that your action
> will invoke a business object, probably a stateless
> session bean, which
> does the business logic (i.e. scenario work)
> 
> > 
> > I guess I'm hung up on the word "controller" and
> its
> > use in both the struts and Rational documents.  In
> my
> > mind, truly separate tiers means that the struts
> > controller should control the behavior of the
> > presentation layer, while the scenario behavior
> would
> > reside in other classes refered to in the Struts
> world
> > as the model.  Have I got this right?
> 
> I would agree with this statement. Using the MVC
> architecture pattern
> doesn't preclude you from using multiple times. A
> Swing app may be
> architected to use MVC, which internally its using
> lots of MVC-based
> components as well. So, the whole app is split up
> into MVC, while the V
> in that MVC is composed of multiple components
> designing using MVC. I
> think this is where you are hung up on. RUP
> recommends an MVC
> architecture, but does not really recommend you to
> use MVC for your
> internal components, as you may not need to. 
> 
> James
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Redux: Actions and business logic, or Using Struts with the Rational Unified Process

2002-11-11 Thread James Higginbotham
John,

> is an MVC framework.  Granted, while it tends toward
> the presentation layer, it does provide mechanisms
> that venture into the problem domain, like FormBeans.

Not quite sure what you mean here, as FormBeans are simply javabeans
that are used to store the user's input form data before its mapped to
the actual business tier. I think you will find that although the
formbeans look very much like your domain objects, your HCI and business
folks may require the presentation to change quite a bit and thus they
will fork a little from the business objects proper found in the biz
domain.

> Paragraph 2 of the document referenced by that URL
> says that "Struts provides its own Controller
> component and integrates with other technologies to
> provide the Model and the View".  It goes on to say
> that this controller can interact with the model tier
> in the form of Javabeans/EJBs, and view components
> such as JSPs, Velocity templates, etc.  That implies
> that Struts falls closer to the controller than one
> would think.

Yes, it's a controller in the presentation layer, which I stated above.
It also provides custom JSP tags for the view that interact with your
formbeans, which are part of the presentation layer as well. When you
write a swing application, you don't just write the controller or the
view, you have to write both. So, Struts provides help in both of those
areas, and allows the model to be whatever you want it to be -
Javabeans, EJBs, Mbeans, whatever. 

> 
> > > > 
> > > >  - If an architectural design called for a
> > > > ScenarioController class for each use case, how
> > > > would the boundary between this class and Struts
> 
> > > > be manifested?  Should this ScenarioController
> be
> > > > an  extension of or external to Struts?
> > 
> > Well, generally a scenario has an associated set of
> > business logic to be done on the backend to 
> > accomplish this goal. Thus, you would probably
> > engineer a stateless EJB that would contain 1 or
> > more methods to accomplish this goal (probably one 
> > method, which may invoke multiple other components/ 
> > EJBs once the single remote call from the web tier
> is
> > made). 
> > 
> 
> Agreed.  I guess the nature of my question stems from
> the controller provided in Struts.  In the interests
> of loose coupling of tiers, I would think that the
> struts controller should be separate from scenario
> controller  rather than putting scenario (i.e.
> business) logic in the struts controller.  

Right. This is why in the statement above, I mention that your action
will invoke a business object, probably a stateless session bean, which
does the business logic (i.e. scenario work)

> 
> I guess I'm hung up on the word "controller" and its
> use in both the struts and Rational documents.  In my
> mind, truly separate tiers means that the struts
> controller should control the behavior of the
> presentation layer, while the scenario behavior would
> reside in other classes refered to in the Struts world
> as the model.  Have I got this right?

I would agree with this statement. Using the MVC architecture pattern
doesn't preclude you from using multiple times. A Swing app may be
architected to use MVC, which internally its using lots of MVC-based
components as well. So, the whole app is split up into MVC, while the V
in that MVC is composed of multiple components designing using MVC. I
think this is where you are hung up on. RUP recommends an MVC
architecture, but does not really recommend you to use MVC for your
internal components, as you may not need to. 

James

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: AW: AW: AW: checkbox problem

2002-11-11 Thread Gemes Tibor
2002. november 11. 15:14 dátummal Hirschmann, Bernhard ezt írtad:

> One final question:
> do I have to call form.reset() manually, or is this done automatically?

give it a try  ;-)

Tib

yes it is called automagically


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >