Re: Annotations and Struts

2004-12-14 Thread Andrew Hill
Im not so sure that would work too well as the actionforms are representations of the view state, and whats in a form on the view doesnt necessarily correspond directly to the objects that are modelled at the business tier, and often contains other stuff that is view specific, or exists to work

Annotations and Struts

2004-12-14 Thread Mike Duffy
The Austin JUG meeting tonight featured the J2SE 5.0 presentation from Sum. I am currently using the new annotations feature on a test project using EJB 3.0 and JBoss. It is very cool; just annotate your entity beans and the server does all the database mappings. As I was listening to tonight'

Re: Localize a dropdown select list

2004-12-14 Thread Eddie Bush
Bryan, Here's some thoughts: - Leverage the Java language's inherent ability to internationalize things. - Leverage commons-resources to internationalize things. - Use a database to internationalize things. They aren't necessarily mutually-exclusive options, although there's little reas

Re: test

2004-12-14 Thread Eddie Bush
Any word on when they might open that to GA? I'm curious to get a peek at it ... Eddie - Original Message - From: "James Mitchell" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, December 14, 2004 1:30 PM Subject: Re: test I

Re: ??? property naming convention problem

2004-12-14 Thread Kris Schneider
Jim, you're kidding, right? The original post had nothing to do with variable names and specifically related to bean property names. The key question from the original post is: Is there a property naming convention to be followed in STRUTS The answer is, yes. In general, property names follow th

Re: Localize a dropdown select list

2004-12-14 Thread Niall Pemberton
It has come up before: http://issues.apache.org/bugzilla/show_bug.cgi?id=9748 http://issues.apache.org/bugzilla/show_bug.cgi?id=17600 but it hasn't been implemented in Struts Niall - Original Message - From: "bryan" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]

RE: submitting multiple option items to struts action

2004-12-14 Thread Jim Barrows
> -Original Message- > From: Sudip Shrestha [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 14, 2004 10:16 AM > To: Struts Users Mailing List > Subject: submitting multiple option items to struts action > > > -I have an element which has several option items. > -This is kind of unu

Re: Preventing concurrent execution of an Action

2004-12-14 Thread Behrang Saeedzadeh
Hi > No.. you need to syncrhonize on the lock. > Check the java tutorials on multi-threaded architecture for details. I guess I know enough about multi threading ;) but what I don't know enough is Struts' internals. > A better solution might be to use one of the solutions discussed on the list

Re: Preventing concurrent execution of an Action (example)

2004-12-14 Thread Behrang Saeedzadeh
Thanks. This helped me alot. Regards, Behrang S. On Wed, 15 Dec 2004 00:18:46 +0100, Leon Rosenberg <[EMAIL PROTECTED]> wrote: > Ok, just in case it was more confusing then helping. > Here is the (imho) safe solution (haven't tested it, but it should work > fine): > The isLock method is needed t

RE: ActionMessages and Struts-EL Tags

2004-12-14 Thread Karr, David
This isn't a Struts-EL issue. The "html:messages" tag can be used to iterate over either messages or errors, but not both. It defaults to errors. You can change it to iterate over messages by setting the "message" atttribute to "true". > -Original Message- > From: Hariharan V [mailto:[E

Re: AW: Preventing concurrent execution of an Action

2004-12-14 Thread Behrang Saeedzadeh
Hi Thanks for the responses. > You don't need your locked flag, it's provided by java object monitors > automatically. I actually used the lock so if the updateXML is being executed the next request won't even try and wait to aquire the lock for it and simply return. > Last question: if two use

RE: Documentation for validator regular expression

2004-12-14 Thread Jim Barrows
> -Original Message- > From: news [mailto:[EMAIL PROTECTED] Behalf Of Muhammad > Momin Rashid > Sent: Tuesday, December 14, 2004 4:10 PM > To: [EMAIL PROTECTED] > Subject: Documentation for validator regular expression > > > Hello, > > Can anyone point me to documentation I can refer

Re: Preventing concurrent execution of an Action (example)

2004-12-14 Thread Leon Rosenberg
Ok, just in case it was more confusing then helping. Here is the (imho) safe solution (haven't tested it, but it should work fine): The isLock method is needed to ensure, that all threads have the same "lock" value. Volatile should guarantee it, but it's not supported on all vms. You should call th

Re: Preventing concurrent execution of an Action (example)

2004-12-14 Thread Leon Rosenberg
Ok, just in case it was more confusing then helping. Here is the (imho) safe solution (haven't tested it, but it should work fine): The isLock method is needed to ensure, that all threads have the same "lock" value. Volatile should guarantee it, but it's not supported on all vms. You should call th

AW: Preventing concurrent execution of an Action

2004-12-14 Thread Leon Rosenberg
Small correction, In your example there is a difference whether you have a multiprocessor machine. On a single-proc machine it will work fine (prevent second user from overwriting), on a multi-processor machine it's undefined. Regards Leon > -Ursprüngliche Nachricht- > Von: Durham David

Documentation for validator regular expression

2004-12-14 Thread Muhammad Momin Rashid
Hello, Can anyone point me to documentation I can refer to for struts validator regular expressions. Regards, Muhammad Momin Rashid - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

AW: Preventing concurrent execution of an Action

2004-12-14 Thread Leon Rosenberg
Small correction, In your example there is a difference whether you have a multiprocessor machine. On a single-proc machine it will work fine (prevent second user from overwriting), on a multi-processor machine it's undefined. Regards Leon > -Ursprüngliche Nachricht- > Von: Durham David

AW: Preventing concurrent execution of an Action

2004-12-14 Thread Leon Rosenberg
Replace synchronized(UpdateXmlAction.class) with synchronized(this) and you have the same behaviour, as if you would make the whole method synchronized. You don't need your locked flag, it's provided by java object monitors automatically. BUT, synchronizing doExecute in an ac

AW: Preventing concurrent execution of an Action

2004-12-14 Thread Leon Rosenberg
Replace synchronized(UpdateXmlAction.class) with synchronized(this) and you have the same behaviour, as if you would make the whole method synchronized. You don't need your locked flag, it's provided by java object monitors automatically. BUT, synchronizing doExecute in an ac

Re: ??? property naming convention problem

2004-12-14 Thread Andrew Hill
Sure is mate!. Its all in the javabean specs This post should enlighten you further: http://marc.theaimsgroup.com/?l=struts-user&m=98900256403524&w=2 And for another getter/setter 'gotcha' you can read this thread through http://marc.theaimsgroup.com/?l=struts-user&m=102696975022454&w=2 hth Andrew

RE: Preventing concurrent execution of an Action

2004-12-14 Thread Jim Barrows
> -Original Message- > From: Behrang Saeedzadeh [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 14, 2004 3:34 PM > To: [EMAIL PROTECTED] > Subject: Preventing concurrent execution of an Action > > > Hi > > I've an action that creates an XML file on the server. It's executed > by clic

RE: Preventing concurrent execution of an Action

2004-12-14 Thread Durham David R Jr Contr 805 CSPTS/SCE
You might be able to get away with simply adding 'synchronized' to the execute method's signature. synchronized public ActionForward execute(...) { updateXml(); } private void updateXml() { ... } The lock/key threading techniques have to do with, I think, a more complex th

RE: Tips on testing pages with multiple potential paths?

2004-12-14 Thread Jim Barrows
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 14, 2004 3:15 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Tips on testing pages with multiple potential paths? > Importance: High > > > We have an application where each page

Preventing concurrent execution of an Action

2004-12-14 Thread Behrang Saeedzadeh
Hi I've an action that creates an XML file on the server. It's executed by clicking on a link. I don't want multiple instances of it to be executed concurrently. Does an approach like the following work? public class UpdateXmlAction ... { private static final boolean locked; publi

Tips on testing pages with multiple potential paths?

2004-12-14 Thread Mick.Knutson
We have an application where each page has about 8 different paths depending upon the DTO in session, and the values passed in the request. I have only started on the 1st page right now, and feel overwhelmed with the limitless possibilities I have to test for. I am hoping someone can give me some

RE: ??? property naming convention problem

2004-12-14 Thread Jim Barrows
> -Original Message- > From: Kris Schneider [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 14, 2004 12:51 PM > To: Struts Users Mailing List > Subject: RE: ??? property naming convention problem > > > Is that supposed to be some sort of bluff? What do variable > names have to do >

Re: Generating valid HTML from tag

2004-12-14 Thread Martin Wegner
Niall, I would agree with you until a customer makes XHTML conformance a requirement in the contract. Strict XHTML conformance is very important to some customers, for various reasons. As previously posted, getting rid of the "name" attribute on the tag could be troublesome. But closing the t

Localize a dropdown select list

2004-12-14 Thread bryan
Is this possible with struts ? i don't find a mention of it but can't imagine it hasn't been implemented. For example in the jsp Which generates the following ... type.yes type.no type.option_to_build type.undefined Is it possible to map type.no to a value in the r

Re: Generating valid HTML from tag

2004-12-14 Thread D. Stimits
Martin Wegner wrote: The Struts doc does suggest that should cause the tag to be XHTML compliant but for some reason it does not. The W3C XHTML validator also does not like the Struts output of the elements. Struts does not close them: . This might help as a reference: http://struts.apache.or

RE: ??? property naming convention problem

2004-12-14 Thread Kris Schneider
Is that supposed to be some sort of bluff? What do variable names have to do with bean properties? By default, property names are derived from *method* names. For example, the property exposed by TimeZone.getID() is "ID", but the property exposed by SSLSession.getId() is "id". Quoting Jim Barrows

submitting multiple option items to struts action

2004-12-14 Thread Sudip Shrestha
-I have an element which has several option items. -This is kind of unusual situation where I have to select multiple option items instead of only one and submit that array of option items to the struts action. -The select element contains a lot of option items so using check boxes and multiboxe

Re: Problems initializing form objects

2004-12-14 Thread Diego Manilla Suárez
Hi Jeff, thanks for your answer. I was already doing that, using two actions (well, using two different methods of a LookupAction), one to initialize the list and the other to process it, but the problem arises when I submit the form in "page.jsp". Jeff Beal wrote: When I have this sort of thin

Re: test

2004-12-14 Thread James Mitchell
If you want a gmail account, I've got one for you. I know that one works just fine for these lists. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: "Frank W. Zammetti" <[EMAIL PROTECTED]> To: "Struts User

Usign displaytag

2004-12-14 Thread Donie Kelly
Hi all I'm trying to use displaytag http://demo.raibledesigns.com/appfuse/demos/users-edit.jsp and I'm trying to reproduce the table on this page. I need the checkboxes to select/deselect all the other ones and I need the checkbo

Re: Generating valid HTML from tag

2004-12-14 Thread Derek Broughton
On Tuesday 14 December 2004 13:13, Martin Wegner wrote: > The Struts doc does suggest that should cause the > tag to be XHTML compliant but for some reason it does not. The W3C XHTML > validator also does not like the Struts output of the elements. > Struts does not close them: . > Well, then,

RE: ??? property naming convention problem

2004-12-14 Thread Kandula, Sunita
A property need not always imply a private member variable in a bean. for example: MyBean.java private map values = new HashMap(); public String getFirstName() { return (String)values.get("firstname"); } public void setFirstName(String firstNameIn) { values.put("firstName",firstNameIn)

RE: ??? property naming convention problem

2004-12-14 Thread Kris Schneider
Quoting Jim Barrows <[EMAIL PROTECTED]>: > > -Original Message- > > From: Daniel Perry [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, December 14, 2004 7:52 AM > > To: Struts Users Mailing List; [EMAIL PROTECTED] > > Subject: RE: ??? property naming convention problem > > > > > > This is c

RE: ??? property naming convention problem

2004-12-14 Thread Jim Barrows
> -Original Message- > From: Kris Schneider [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 14, 2004 10:45 AM > To: Struts Users Mailing List > Subject: RE: ??? property naming convention problem > > > Quoting Jim Barrows <[EMAIL PROTECTED]>: > > > > -Original Message- > >

Re: Generating valid HTML from tag

2004-12-14 Thread Martin Wegner
The Struts doc does suggest that should cause the tag to be XHTML compliant but for some reason it does not. The W3C XHTML validator also does not like the Struts output of the elements. Struts does not close them: . --Marty --- Derek Broughton <[EMAIL PROTECTED]> wrote: > On Tuesday 14 D

RE: Error in CactusStrutsTestCase

2004-12-14 Thread Jim Barrows
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 14, 2004 10:40 AM > To: [EMAIL PROTECTED] > Subject: RE: Error in CactusStrutsTestCase > Importance: High > > > Here is what I want to do. > I want to loop through various scenarios. > 1.

Re: Generating valid HTML from tag

2004-12-14 Thread Joe Germuska
At 2:31 PM + 12/14/04, Niall Pemberton wrote: Joe, maybe you were thinking of this one: http://issues.apache.org/bugzilla/show_bug.cgi?id=15023 No, but that's just because I didn't remember it ;-) That one generated a lot of discussion, so apparently people think it's important. I have to adm

RE: Error in CactusStrutsTestCase

2004-12-14 Thread Mick.Knutson
Here is what I want to do. I want to loop through various scenarios. 1. add the parameters to each given scenario 2. execute the scenario 3. assert the outcome 4. start again from scratch. Now when I put the setUp() and tearDown() around the whole method, I get an ActionError thrown the very firs

jsp mime type

2004-12-14 Thread Matt Bathje
Hey all - I am working with the commons file uploader in struts to upload a JSP file to my website. Being a security conscious developer, I am limiting the available upload file types to text/plain and text/html hoping that the JSP file would be sent as one of these types. Instead, it is sent a

Re: ??? property naming convention problem

2004-12-14 Thread Kris Schneider
This may be of interest: http://wiki.apache.org/struts/JavaBeans Quoting Andrew Hill <[EMAIL PROTECTED]>: > Yes, it is rather confusing. I wasted *many* hours with this issue the > first time it hit me! > > Another poster also stated that putting the property name as "ECoupon" > in the JSP wo

RE: ??? property naming convention problem

2004-12-14 Thread Jim Barrows
> -Original Message- > From: Daniel Perry [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 14, 2004 7:52 AM > To: Struts Users Mailing List; [EMAIL PROTECTED] > Subject: RE: ??? property naming convention problem > > > This is confusing. The bean spec / article is talking about > goi

Re: ??? property naming convention problem

2004-12-14 Thread Sebastián Gorgo
Vinod Easaw Varghese wrote: Hi, I have a textbox in a JSP whose property has been named as eCoupon. I have created the necessary ActionForm with the necessary setter and getter methods such as setECoupon and getECoupon. When I run submit the form within the corresponding JSP I get the er

Re: Problems initializing form objects

2004-12-14 Thread Diego Manilla Suárez
Thanks a lot for your answers, Andrew. I think I can't use a LazyList. The problem is that I don't only need to know the size of the list dynamically, but also the type of its objects. All of them share a common interface, but their concrete class is unknown beforehand, so I can't make the list

Re: Generating valid HTML from tag

2004-12-14 Thread Derek Broughton
On Tuesday 14 December 2004 08:51, William Ferguson wrote: > I noticed that the html generated form the tag is not valid > HTML according to the W3C validation service (http://validator.w3.org). It > generates a tag with a 'name' attribute which has been deprecated. > > Since I'm striving to conf

RE: ??? property naming convention problem

2004-12-14 Thread Daniel Perry
This is confusing. The bean spec / article is talking about going from a method name into a property name. The problem here is the other way round. Eg, decapitalise method->property will convert: getECoupon -> ECoupon But it doesnt mention property->method capitalise: eCoupon -> getECoupon / get

RE: Generating valid HTML from tag

2004-12-14 Thread Daniel Perry
But that's 5 years during which a non standards-compliant browser has had 90% of the browser market... I dont know of any browser which gets upset at the form name attribute! As a side note, why does struts set the form name? is it used anywhere? I cant see any reason to use the name tag atall.

Re: test

2004-12-14 Thread Frank W. Zammetti
No. The problem is that my webmail client, which is all I can use at work to access mailing lists, has a bug which causes messages to not get through to the lists. My web host has been working on it for some time and so the only way to see if they've fixed it or not is to send a message. -- F

Re: Problem with starting the samplecode-urgent help

2004-12-14 Thread Antony Paul
The error says that class strutsTutorial.UserRegistrationAction is not found. Check whether class is there in WEB-INF/classes directroty rgds Antony Paul On Mon, 13 Dec 2004 21:24:39 -0800, S.B. <[EMAIL PROTECTED]> wrote: > No, it still doesn't work. I am copying the error I get when I give: > h