Re: [OS-webwork] Hidden token

2003-01-17 Thread Joseph Ottinger
I resigned from formal association with OpenSymphony. I no longer have or
want CVS update access, or web site update capabilities, although I can
update the wiki and offer input on issues just like other users can.
What's more, since I used to be somewhat responsible for the care and
feeding of OpenSymphony, I have its best interests at heart. What better
input can there be than that of an experienced, caring user?

On Fri, 17 Jan 2003, [ISO-8859-1] Rickard Öberg wrote:

 Joseph Ottinger wrote:
  I'd prefer adding it to the wiki or the current release of WW, since there
  are some users who actually use what's there now as opposed to vapourware,
  even though the vapourware is promising.

 Didn't you resign from OpenSymphony? Or was it just that you stopped
 doing things?

 /Rickard



 ---
 This SF.NET email is sponsored by: Thawte.com
 Understand how to protect your customers personal information by implementing
 SSL on your Apache Web Server. Click here to get our FREE Thawte Apache
 Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
 ___
 Opensymphony-webwork mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


-
Joseph B. Ottinger [EMAIL PROTECTED]
http://enigmastation.comIT Consultant



---
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



Re: [OS-webwork] Hidden token

2003-01-17 Thread Patrick Lightbody
Well, from my part, I'll toy with getting it in sandbox right away.

- Original Message -
From: Rickard Öberg [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 17, 2003 12:36 AM
Subject: Re: [OS-webwork] Hidden token


 Vedovato Paolo wrote:
  that is a very important feature that should get ASAP into current
  webwork...so what can be added now (automatic or manually) should be
added

 Sure, but what if we go with the automatic system later on? Then
 there'll be whining and cursing, as usual.

 /Rickard



 ---
 This SF.NET email is sponsored by: Thawte.com
 Understand how to protect your customers personal information by
implementing
 SSL on your Apache Web Server. Click here to get our FREE Thawte Apache
 Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
 ___
 Opensymphony-webwork mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



---
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



RE: [OS-webwork] Woohoo!

2003-01-17 Thread Jason Carreira
Title: Message



Well, 
it really came down to usability issues. We looked at things like having to have 
separate FormBeans tied to the Actions 1-1 (because you have to cast to the 
expected FormBean subclass). Also,we looked at some sample code for Struts 
and Webwork (we looked at code for Chiki, a Wiki implemented with Struts, and 
Jira. Thanks Mike for having clean code!). It was very apparent that you had to 
do a lot of busy work to initialize things and do the setup that the framework 
should have done for you in Struts, whereas in Webwork, it was pretty much all 
business code. Command driven actions were also a big hit, as our lead architect 
came from a Next background, and apparently they did code like that all the 
time. In general, I think it was just a general feeling that Webwork was better 
abstracted and architected than Struts.

Other 
advantages, like the ValueStack and the expression language, were less easy to 
express, since they hadn't begun to use them yet. 

Some 
of the concerns were (in no order):

-Less 
userbase - I pointed out that with a smaller project we have a better chance of 
making changes and making WW do what we need
-JSTL 
and JSF support 
-tool 
support

  
  -Original Message-From: Volkmann, Mark 
  [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 
  2003 5:52 PMTo: 
  '[EMAIL PROTECTED]'Subject: RE: 
  [OS-webwork] Woohoo!
  Can you share with us the justification you used for using 
  WebWork instead of Struts? Others may find it useful. Perhaps 
  you've already done that and I accidently deleted the email. If so, 
  could you resend it to me?
   -Original Message-  
  From: Jason Carreira [mailto:[EMAIL PROTECTED]] 
   Sent: Thursday, January 16, 2003 3:13 PM 
   To: [EMAIL PROTECTED] 
   Subject: [OS-webwork] Woohoo!So we 
  had our Webwork vs. Struts talk today, and I was able  to convince  people here that there 
  was sufficiently enough better about WW to make  
  us use it instead of Struts, even though Struts is the "standard", of 
   sorts! Cool.  
   Off to catch a plane home...   --  Jason 
  Carreira  Technical Architect, Notiva Corp. 
   phone: 
  585.240.2793  
  fax: 585.272.8118  email: 
  [EMAIL PROTECTED]  ---  Notiva - optimizing trade relationships (tm)
   
  ---  This SF.NET email is sponsored by: Thawte.com  Understand how to protect your customers personal information 
   by implementing  SSL 
  on your Apache Web Server. Click here to get our FREE  Thawte Apache  Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en 
   ___ 
   Opensymphony-webwork mailing list  [EMAIL PROTECTED]  https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork 
   ***WARNING: 
  All e-mail sent to and from this address will be received orotherwise 
  recorded by the A.G. Edwards corporate e-mail system and issubject to 
  archival, monitoring or review by, and/or disclosure to,someone other than 
  the 
  recipient.


RE: [OS-webwork] Hidden token

2003-01-17 Thread Jason Carreira
 -Original Message-
 From: Robert Nicholson [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, January 16, 2003 5:50 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [OS-webwork] Hidden token
 
 
 I think the only reason Struts needs the ui:form is to associate the 
 form to the form bean.
 
 I'm against the idea of a ui:form tag. ie. mandatory use of 
 WW UI tags 
 for proper behaviour.
 
 Struts form beans don't work unless you use their UI tags.
 
 

I was proposing the ww:form tag only to do this (the hidden token) for
you. I believe Rickard's proposed method will also require this (or
would you do form action=ww:url .../?)

I suppose we could also have the token creation be in a util action that
would populate the session, and you could call it from the jsp using
ww:action as well.


---
This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will
allow you to extend the highest allowed 128 bit encryption to all your
clients even if they use browsers that are limited to 40 bit encryption.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



RE: [OS-webwork] Hidden token

2003-01-17 Thread Jason Carreira
 -Original Message-
 From: Robert Nicholson [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, January 16, 2003 5:52 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [OS-webwork] Hidden token
 
 
 If I quickly hit the the submit button twice what happens?
 
 What guarantee is there that the execution of both actions isn't 
 interleaved?
 

Well, the first thing the action would do is check the token and remove
it from the session. Is access to the session thread safe? Either way,
you'd want to synchronize the read and clear of the token (or temporary
URL), and whichever one got it first would succeed. 


---
This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will
allow you to extend the highest allowed 128 bit encryption to all your
clients even if they use browsers that are limited to 40 bit encryption.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



RE: [OS-webwork] Hidden token

2003-01-17 Thread Jason Carreira
 -Original Message-
 From: matt baldree [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, January 16, 2003 7:27 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [OS-webwork] Hidden token
 
 
 I have the code ;). I can add it if it is what people want 
 but Rickard has a point in trying to make this more automatic 
 without adding a manual field. I guess we could have the old 
 fashion way and if/when the portlet framework develops we can use it.
 
 -Matt
 

Does the automatic way support both problem conditions: 1) reloading the
result page and thereby re-posting the form data, and 2) the user
hitting the back button and submitting the form again. I think it does,
and I'm sure the hidden token does, but I wanted to check for sure.


---
This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will
allow you to extend the highest allowed 128 bit encryption to all your
clients even if they use browsers that are limited to 40 bit encryption.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



[OS-webwork] BeanUtil copy method efficiency

2003-01-17 Thread Robert Nicholson
I've been looking at BeanUtil.java and I was looking at the copy method.

given that the fieldMaps are cached in objectMap wouldn't it make more 
sense
to use

static protected PropertyDescriptor getPropertyDescriptor(String 
property, Ob
ject obj)

instead of the inner loop?

Couldn't you do a lookup for pdTo with

BeanUtil.getPropertyDescriptor(pdFrom.getName(), to);

 public static void copy(Object from, Object to, boolean includeNull)
  throws IllegalArgumentException
   {
  try
  {
 Object[] readParameters = new Object[0];
 Object[] writeParameters = new Object[1];
 PropertyDescriptor[] propertiesFrom = 
getPropertyDescriptors(from.getCl
ass());
 PropertyDescriptor[] propertiesTo = 
getPropertyDescriptors(to.getClass(
));
 for (int i = 0; i  propertiesFrom.length; i++)
 {
PropertyDescriptor pdFrom = propertiesFrom[i];
for (int j = 0; j  propertiesTo.length; j++)
{
   PropertyDescriptor pdTo = propertiesTo[j];
   if (pdFrom.getName().equals(pdTo.getName()))
   {
  Method readMethod = pdFrom.getReadMethod();
  Method writeMethod = pdTo.getWriteMethod();
  if (writeMethod != null  readMethod != null)
  {
 writeParameters[0] = 
pdFrom.getReadMethod().invoke(from, re
adParameters);
 if (!(!includeNull  writeParameters[0] == null))
pdTo.getWriteMethod().invoke(to, 
writeParameters);
  }
  break;
   }
}
 }
  } catch (Exception e)
  {
 log.warn(Bean copy failed:+e, e);
 throw new IllegalArgumentException(Bean copy failed: + e);
  }
   }



---
This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will
allow you to extend the highest allowed 128 bit encryption to all your 
clients even if they use browsers that are limited to 40 bit encryption. 
Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork