Re: valid email addresses
AFAIK, common-validator's email validation is correct except maybe for the one open bug against it. David I remember there was a recent discussion about the Struts validation framework invalidating email addresses that were considered to be valid according to some RFC (I can't remember which one. Maybe 822?). Was this ever an issue? Was it resolved? robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: valid email addresses
Try, if the common-validator correctly lets users use: [EMAIL PROTECTED] I just ran that address through the test cases and it passed. I'll add it to the tests permanently later. David If it doesn't, then there's an issue. -TPP - This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, retention, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message. Also, email is susceptible to data corruption, interception, tampering, unauthorized amendment and viruses. We only send and receive emails on the basis that we are not liable for any such corruption, interception, tampering, amendment or viruses or any consequence thereof. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] MVC / Model 2 for Microsoft ???
My understanding is that J# is only included in .NET to allow a transition path from Java to C#. It's definitely not one of the more supported .NET languages and it's *not* Java. David Whoa... MS Has released J#... that would be .NET Java. Anybody used this? Maybe I could just build an app with struts... then copy the Business/Data Tier code to a .NET app in J#. Is J# code compatible with REAL java? Aaron Longwell wrote: I hope I don't start a huge debate with that intro, here goes. I am a freelance web developer. I've been struggling lately with not being able to use the Struts framework on ALL projects. Specifically, I do work with a number of Microsoft Devotees. For several sites, this has meant developing in old ASP like playing with Duplos compared to Struts. I have been spending some time learning the .NET framework. So far it looks great... er, the features that look like Java look great. But then, why wouldn't I just use the more open, polished, community-oriented, original... Java? So now to the point... I don't have a choice for some projects... I have to use .NET. I am curious if anyone is aware of an MVC-type framework for .NET. I am NOT looking for a Struts port to .NET. I started doing a little research, searching for things like Best Practices or .NET Patterns etc. I found almost nothing... no best practices guides. Not even a single recommendation about builing Object-based backend systems. In fact, most books I've read on ASP.NET and .NET in general have focused on database access code directly in the ASPX page itself(in the Code Behind section). Am I: 1) Naive to not notice that Java Enterprise developers are light-years ahead of MS developers in terms of programming practices, design patterns, and role separation? 2) Mistaken? There really are MVC frameworks in .NET... but they are all internal... and no community oriented projects exist. Thanks for the input. Aaron Longwell - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] MVC / Model 2 for Microsoft ???
But this makes complete sense, in a sick way. In a MS environment, portability probably isn't as big a concern, It's no concern at all because you have nothing to port to. and while there are certainly other reasons to use MVC, it strikes me that the biggest is to maintain abstractions between the various layers. If you're a MS shop, you probably have SQL server, ASP and IIS -- and MS has little interest in making it easy to change this. So why spend time building up a MVC framework if you know that you're pretty much married to certain technologies? I don't see any connection between MVC and vendor lock in. Even if you were an MS shop you still need layers to make the app. maintainable. David No thanks. Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT FRIDAY: Take a break with struts users
No can do. I'm so far removed from the network operations group here, that I don't even know who they are. They block every available port except web, ftp, and telnet. It demonstrates an extra special form of incompetence when 2 of 3 open ports are completely insecure protocols. David I used to be able to use gotomypc.com from home, which uses default port 80 and http to communicate, so that I was able to work from home on occasion. Suddenly about 3 weeks ago, it stopped working. Apparently they added both the web site and poll server to their blocked list (probably because of me) so now I guess I'm just screwed. It's times like this when I hate this fu##king place!!! Micro-manage the SH## out of everyone. -- James Mitchell Software Developer/Struts Evangelist http://www.struts-atlanta.org 770-822-3359 AIM:jmitchtx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT FRIDAY: Take a break with struts users
They also block ssh, therefore I cannot access cvs.apache.org while at work (unless I tunnel home first on a port-forwarded connection). Talk about a pain in my ass. LOL, do you work for Microsoft? You have some truly special people running your network. David -- James Mitchell Software Developer/Struts Evangelist http://www.struts-atlanta.org 770-822-3359 AIM:jmitchtx - Original Message - From: David Graham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 13, 2003 11:32 AM Subject: Re: OT FRIDAY: Take a break with struts users No can do. I'm so far removed from the network operations group here, that I don't even know who they are. They block every available port except web, ftp, and telnet. It demonstrates an extra special form of incompetence when 2 of 3 open ports are completely insecure protocols. David I used to be able to use gotomypc.com from home, which uses default port 80 and http to communicate, so that I was able to work from home on occasion. Suddenly about 3 weeks ago, it stopped working. Apparently they added both the web site and poll server to their blocked list (probably because of me) so now I guess I'm just screwed. It's times like this when I hate this fu##king place!!! Micro-manage the SH## out of everyone. -- James Mitchell Software Developer/Struts Evangelist http://www.struts-atlanta.org 770-822-3359 AIM:jmitchtx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] MVC / Model 2 for Microsoft ???
The enforcement is the key I see lots of MS Developers do sloppy things because they can. Now let's be fair. MS developers aren't the only sloppy ones out there. David _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Java Trivia
That won't compile. length() is a method on String not a property. David Anybody know why the length of a String is a property of the String when used as a logical qualifier in a for{} block but a function of the String in a conditional if{} statement? for( int i = 0; i string.length; i++ ) {} if( string.length() != 4 ) {} Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Java Trivia
Here's my code - it compiles just fine. Note the string.length in the for{} and the string.length() in the if{}: I'm sure it does but not because you magically found a way to reference string.length. Look at your code more closely, you're using an array not a String. David test = st.nextToken(); if( test.equals( )) { return false; } for( int i = 0; i months.length; i++ ) { if( test.equals( months[ i ] )){ month = true; break; } } if( !month ) { return false; } test = st.nextToken(); if( test.length() 3 || test.length() 2 ) { return false; } else { StringTokenizer token = new StringTokenizer( test, , ); while( token.hasMoreTokens() ) { int i = 0; if( !Character.isDigit( token.nextToken().charAt( i ))) { return false; } i++; } } -Original Message- From: Jarnot Voytek Contr AU HQ/SC [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 10:02 AM To: 'Struts Users Mailing List' Subject: RE: [OT] Java Trivia for( int i = 0; i string.length; i++ ) {} doesn't compile for me... -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 8:46 AM To: 'Struts Users Mailing List' Subject: [OT] Java Trivia Anybody know why the length of a String is a property of the String when used as a logical qualifier in a for{} block but a function of the String in a conditional if{} statement? for( int i = 0; i string.length; i++ ) {} if( string.length() != 4 ) {} Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Java Trivia
String is a final class so you can't subclass it. David and here I thought it was a trick question, where you had subclassed String as string class and added a public member length. .. -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 11:17 AM To: 'Struts Users Mailing List' Subject: RE: [OT] Java Trivia okay, okay, let it rest. I feel st00pid enough already! -Original Message- From: Mike Whittaker [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 10:51 AM To: Struts Users Mailing List Subject: RE: [OT] Java Trivia if( test.equals( )) { return false; } for( int i = 0; i months.length; i++ ) { if( test.equals( months[ i ] )){ I see no 'string.length' If you are refering to the months.length, then this is a language convenience for determining the length of an array, which 'months' surely is since you have 'months[ i ]' In the same way +27 is a language convenience - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] - dos file
I think there's a dos2unix program that converts the file. David Download Textpad, it's free (sort of). It will do everything you need. -- James Mitchell Software Developer/Struts Evangelist http://www.struts-atlanta.org 770-822-3359 AIM:jmitchtx - Original Message - From: Ray Madigan [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, June 12, 2003 11:25 AM Subject: [OT] - dos file I just got back from a week business trip and used wordpad to edit all of my struts code. Now all of my files say dos when I look at them in vi. Does anyone know of a command to convert them back. I assume it is because of the line terminator being different on the Redmond OS. I usually use Linux. Thanks In Advance RayM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Action Scripting
One of the stated benefits is that you don't have to reload your app to see changes in actions. I think the idea is neat but would never use it because Tomcat reloads my app in 3 seconds. David Then you get back to a spageti application ... :) José. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 5:49 PM To: Struts Users Mailing List Subject: Struts Action Scripting Just found this at http://www.alphaworks.ibm.com/tech/strutsscripting From their Overview: The ScriptedAction is a Struts Action class that uses BSF (Bean Scripting Framework) to enable Struts developers to create Struts Actions in the language of their choice. Supported languages include: JavaScript, Jython, Jacl, ActiveScript, PerlScript and others. When specifying the type of an action, the ScriptedAction is specified and the parameter attribute is used to tell the ScriptedAction which script to load and execute. The ScriptedAction uses BSF to setup the script runtime environment with declared variables for the arguments typically passed to the execute method of an action, as well as a context object that provides a way for the script to specify the forward for the action to return. Currently, there is some function for customizing the execution environment of scripts to make the scripting of Actions easier and friendlier by allowing the definition of predefined variables and functions available to all scripts. Future plans include an extension mechanism to allow for the registration of new BSF engines and file extensions for different languages. Cheers, Gustavo DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Action Scripting
True, but I think recompiling is the time consuming part! Recompiling the actions or jsps? If it takes you more than 1 second to compile an action, you're using the wrong tool. Eclipse performs incremental compilation every time you save a .java file so you don't even notice that it's compiling. I've had people ask me how to compile and build projects in eclipse because they didn't realize it was all automated for them! David I've also done a small integration project using BeanShell scripting (for actions), if anyone is interested, I'll be willing to share it! ^^ Ed Yu, Senior Solutions Architect (IBM Certified AIX Administrator), Advanced Solutions Group, Physics Dept., University of South Carolina, Columbia, SC 29208 Office (803)777-8831, FAX (803)777-8833, Email [EMAIL PROTECTED] -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 11:50 AM To: [EMAIL PROTECTED] Subject: RE: Struts Action Scripting One of the stated benefits is that you don't have to reload your app to see changes in actions. I think the idea is neat but would never use it because Tomcat reloads my app in 3 seconds. David Then you get back to a spageti application ... :) José. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 5:49 PM To: Struts Users Mailing List Subject: Struts Action Scripting Just found this at http://www.alphaworks.ibm.com/tech/strutsscripting From their Overview: The ScriptedAction is a Struts Action class that uses BSF (Bean Scripting Framework) to enable Struts developers to create Struts Actions in the language of their choice. Supported languages include: JavaScript, Jython, Jacl, ActiveScript, PerlScript and others. When specifying the type of an action, the ScriptedAction is specified and the parameter attribute is used to tell the ScriptedAction which script to load and execute. The ScriptedAction uses BSF to setup the script runtime environment with declared variables for the arguments typically passed to the execute method of an action, as well as a context object that provides a way for the script to specify the forward for the action to return. Currently, there is some function for customizing the execution environment of scripts to make the scripting of Actions easier and friendlier by allowing the definition of predefined variables and functions available to all scripts. Future plans include an extension mechanism to allow for the registration of new BSF engines and file extensions for different languages. Cheers, Gustavo DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Action Scripting
Ant's fine for building a production project but if it's taking a long time to compile everything you should consider using a faster development tool. David I use ant. ^^ Ed Yu, Senior Solutions Architect (IBM Certified AIX Administrator), Advanced Solutions Group, Physics Dept., University of South Carolina, Columbia, SC 29208 Office (803)777-8831, FAX (803)777-8833, Email [EMAIL PROTECTED] -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 1:06 PM To: [EMAIL PROTECTED] Subject: RE: Struts Action Scripting True, but I think recompiling is the time consuming part! Recompiling the actions or jsps? If it takes you more than 1 second to compile an action, you're using the wrong tool. Eclipse performs incremental compilation every time you save a .java file so you don't even notice that it's compiling. I've had people ask me how to compile and build projects in eclipse because they didn't realize it was all automated for them! David I've also done a small integration project using BeanShell scripting (for actions), if anyone is interested, I'll be willing to share it! ^ ^ Ed Yu, Senior Solutions Architect (IBM Certified AIX Administrator), Advanced Solutions Group, Physics Dept., University of South Carolina, Columbia, SC 29208 Office (803)777-8831, FAX (803)777-8833, Email [EMAIL PROTECTED] -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 11:50 AM To: [EMAIL PROTECTED] Subject: RE: Struts Action Scripting One of the stated benefits is that you don't have to reload your app to see changes in actions. I think the idea is neat but would never use it because Tomcat reloads my app in 3 seconds. David Then you get back to a spageti application ... :) José. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 5:49 PM To: Struts Users Mailing List Subject: Struts Action Scripting Just found this at http://www.alphaworks.ibm.com/tech/strutsscripting From their Overview: The ScriptedAction is a Struts Action class that uses BSF (Bean Scripting Framework) to enable Struts developers to create Struts Actions in the language of their choice. Supported languages include: JavaScript, Jython, Jacl, ActiveScript, PerlScript and others. When specifying the type of an action, the ScriptedAction is specified and the parameter attribute is used to tell the ScriptedAction which script to load and execute. The ScriptedAction uses BSF to setup the script runtime environment with declared variables for the arguments typically passed to the execute method of an action, as well as a context object that provides a way for the script to specify the forward for the action to return. Currently, there is some function for customizing the execution environment of scripts to make the scripting of Actions easier and friendlier by allowing the definition of predefined variables and functions available to all scripts. Future plans include an extension mechanism to allow for the registration of new BSF engines and file extensions for different languages. Cheers, Gustavo DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Re: validator mask expression language
The regular expressions are run through 2 different regex systems: JavaScript's engine for client side validation and Jakarta ORO for server side (which is Perl compatible). So, to learn about the regex language you should learn Perl's regex syntax (and Javascript but I think they're largely the same). David hi, where can i get help on the mask validator regular expression language --nagi Nagendra Kumar O V S Member Technical Staff Ikigo India Private Ltd. 470-B, Road No. 36, Jubilee Hills, Hyderabad 500033 Contact(O): 23544671 Cell: 98482-41789 _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Correct validator DTD
This one seems to work for me: Because it's backwards compatible with 1.0.2. Struts 1.1 will ship with commons-validator 1.0.2 not 1.1. David !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN http://jakarta.apache.org/commons/dtds/validator_1_1.dtd; With struts 1.1 RC2. Matt -Original Message- From: Rob Leland [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 9:41 PM To: Struts Users Mailing List Subject: Re: Correct validator DTD Raible, Matt wrote: Which is the correct DTD for the Validator: !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN http://jakarta.apache.org/commons/dtds/validator_1_0.dtd; If you are using Validator with struts 1.1 RC 1 or RC2 then it is http://jakarta.apache.org/commons/dtds/validator_1_0_1.dtd OR 1.1? !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Struts Validation Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/validation_1_1.dtd; This is used if you are using the Validator nightly build by itself or have rebuilt struts from its source code against the nightly validator. -Rob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Odd Validator Error Message with 1.1RC2
This is a bug in commons-validator 1.1-dev. Struts 1.1 final will ship with validator 1.0.2 but I will fix this ASAP. David I upgraded to Struts 1.1 RC2 from RC1, and have began seeing the error below when Tomcat starts up. Any ideas as to how to fix this? Validation seems to work just fine, but I don't like seeing messages like this. INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml' Jun 11, 2003 3:11:13 PM org.apache.struts.validator.ValidatorPlugIn initResources INFO: Loading validation rules file from '/WEB-INF/validation.xml' Jun 11, 2003 3:11:14 PM org.apache.struts.validator.ValidatorPlugIn init SEVERE: null java.lang.NullPointerException at java.util.HashMap.init(HashMap.java:210) at org.apache.commons.validator.Field.clone(Field.java:692) at org.apache.commons.validator.ValidatorResources.internalProcessForms(Validat orResources.java:504) at org.apache.commons.validator.ValidatorResources.process(ValidatorResources.j ava:442) at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.ja va:237) at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:161) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 1156) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93 5) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3420) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 21) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j ava:307) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:559 ) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:401) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:358) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Jun 11, 2003 3:11:14 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 8080 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Final word on amp problem in html:link with multiple parameters?
Encoding to amp; is the correct behavior as documented by the W3C. What browser are you using? David I've seen this mentioned in the mailing list archives, but couldn't find a definitive answer. I'm actually using the IBM Websphere Portal Struts Portlet Framework. I believe they're using Struts 1.1 RC1 as their foundation. I'm trying to pass multiple parameters via a map in html:link. I get the first parameter fine, but subsequent parameters are screwed up. As has been mentioned before, it seems that the is being encoded to the html amp; and instead of a parameter called orderNum, I get a parameter called amp%3BorderNum. Is this a bug? Should I be doing something that I'm not? Perhaps it's just not fixed in the Portal implementation? Thanks for any assistance. Tim _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [RETRACTION] PHP version of Struts
IMNSHO I think that it makes things more convoluted and aimless when we are able to shove any 'ol scripting language we want into the mix. Why not ECMA, VB or Perl. Then again, if you don't want it... don't use it :-D I disagree with your last statement. If you're coding a project yourself, you can make sure you stay away from what you consider bad style, confusing constructs, etc. When on a team, or inheriting an old project, it's much different. In my experience, when a language allows too much flexibility you end up with a real mess. One of the best features of Java is the limited amount of allowed language constructs and idioms which leads to easily understandable code. Learning the rules of Java is much easier than learning the rules of C++ or Perl. I realize everyone has their own favorite language but if I wanted to write scripts I wouldn't be using Java to begin with. David Brandon Goodin -Original Message- From: Van Riper, Mike [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 5:05 PM To: Struts Users Mailing List Subject: RE: PHP version of Struts At JavaOne this week one of the announcements about future plans was for scripting language support, specifically in the context of web pages, that will focus initially on PHP support. It was suggested that an initial reference implementation of this would provide PHP support in a future release of Tomcat. This is at the early JSR stage now. So, it would not be of much use any time soon. Still, it seemed worth mentioning in the context of this discussion. The JSR for this is JSR-223, Scripting Pages in Java Web Applications: http://www.jcp.org/en/jsr/detail?id=223 FYI, Van Mike Van Riper mailto:[EMAIL PROTECTED] -Original Message- From: Brandon Goodin [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 3:30 PM To: Struts Users Mailing List Subject: RE: PHP version of Struts It's PHP... what do you think? Brandon Goodin -Original Message- From: Lai, Kenny [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 4:22 PM To: 'Struts Users Mailing List' Subject: RE: PHP version of Struts the question is, is it as good as struts -Original Message- From: Brandon Goodin [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 6:22 PM To: Struts User List Subject: PHP version of Struts Would you use it? http://phrame.sourceforge.net/ Brandon Goodin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [RETRACTION] PHP version of Struts
There's no doubt that accessing Java objects from scripting languages is useful. In fact, I was just looking at Jython and Rhino today. I couldn't think of an app. I could use them in but they may come in handy down the road. David I agree. But, it would be nice to be able to access Java Objects from a scripting language. For example, If someone wanted to use Lucene to index their site, and the site already exists in php. Then it would be appropriate to be able to interact with the Lucene java objects and integrate that into the already existing system. I'm not saying that you should start a project thinking I'll build my web pages with php and my logic with java. That would be foolish. But, I can see where this would be handy in tightening the performance of legacy interaction as systems upgrade. Don't you think? Brandon Goodin -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 6:16 PM To: [EMAIL PROTECTED] Subject: Re: [RETRACTION] PHP version of Struts IMNSHO I think that it makes things more convoluted and aimless when we are able to shove any 'ol scripting language we want into the mix. Why not ECMA, VB or Perl. Then again, if you don't want it... don't use it :-D I disagree with your last statement. If you're coding a project yourself, you can make sure you stay away from what you consider bad style, confusing constructs, etc. When on a team, or inheriting an old project, it's much different. In my experience, when a language allows too much flexibility you end up with a real mess. One of the best features of Java is the limited amount of allowed language constructs and idioms which leads to easily understandable code. Learning the rules of Java is much easier than learning the rules of C++ or Perl. I realize everyone has their own favorite language but if I wanted to write scripts I wouldn't be using Java to begin with. David Brandon Goodin -Original Message- From: Van Riper, Mike [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 5:05 PM To: Struts Users Mailing List Subject: RE: PHP version of Struts At JavaOne this week one of the announcements about future plans was for scripting language support, specifically in the context of web pages, that will focus initially on PHP support. It was suggested that an initial reference implementation of this would provide PHP support in a future release of Tomcat. This is at the early JSR stage now. So, it would not be of much use any time soon. Still, it seemed worth mentioning in the context of this discussion. The JSR for this is JSR-223, Scripting Pages in Java Web Applications: http://www.jcp.org/en/jsr/detail?id=223 FYI, Van Mike Van Riper mailto:[EMAIL PROTECTED] -Original Message- From: Brandon Goodin [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 3:30 PM To: Struts Users Mailing List Subject: RE: PHP version of Struts It's PHP... what do you think? Brandon Goodin -Original Message- From: Lai, Kenny [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 4:22 PM To: 'Struts Users Mailing List' Subject: RE: PHP version of Struts the question is, is it as good as struts -Original Message- From: Brandon Goodin [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 6:22 PM To: Struts User List Subject: PHP version of Struts Would you use it? http://phrame.sourceforge.net/ Brandon Goodin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page
Re: PHP version of Struts
The real advantage of PHP is the number of people that know PHP. The number of people that know jsp/velocity is dwarfed by those that know PHP, thus you can hire cheaper labor and the company saves money. In my experience, cheaper labor = higher cost because you have to rip out all of those scripts within 5 years and replace them with maintainable *applications*. David This technology may not solve any problems for the Java programmer however it would influence a companies decision to go with a Java solution over .Net. -james - Original Message - From: Igor Shabalov [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 8:46 PM Subject: Re: PHP version of Struts Why PHP when I have Java? What real advanteges PHP have compared to Java? On Wed, 11 Jun 2003 16:04:31 -0700, Van Riper, Mike [EMAIL PROTECTED] wrote: At JavaOne this week one of the announcements about future plans was for scripting language support, specifically in the context of web pages, that will focus initially on PHP support. It was suggested that an initial reference implementation of this would provide PHP support in a future release of Tomcat. This is at the early JSR stage now. So, it would not be of much use any time soon. Still, it seemed worth mentioning in the context of this discussion. The JSR for this is JSR-223, Scripting Pages in Java Web Applications: http://www.jcp.org/en/jsr/detail?id=223 FYI, Van Mike Van Riper mailto:[EMAIL PROTECTED] -Original Message- From: Brandon Goodin [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 3:30 PM To: Struts Users Mailing List Subject: RE: PHP version of Struts It's PHP... what do you think? Brandon Goodin -Original Message- From: Lai, Kenny [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 4:22 PM To: 'Struts Users Mailing List' Subject: RE: PHP version of Struts the question is, is it as good as struts -Original Message- From: Brandon Goodin [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 6:22 PM To: Struts User List Subject: PHP version of Struts Would you use it? http://phrame.sourceforge.net/ Brandon Goodin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Igor Shabalov Director of Engineering Exadel Inc. http://www.exadel.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why is dbcp / pool removed?
Isn't GenericDataSource deprecated? Yes, it will be removed in 1.2 but is included in 1.1 for backward compatibility. The one included is not the same as what is in RC1, though, correct? I'm just trying to figure out exactly what is changed and what I need to start experimenting with... I'm not sure what Ted changed but you may be correct that it's not exactly the same. You can still use DBCP, Struts just won't distribute it any more. I recommend using the package distributed with either your container or your database. If you tie your app to your coontainer, then it's not very portable, no? I can develop in Tomcat and publish to JRun with no problems, and I like to maintain that :) You're not tying your app to the container because you configure the DataSource implementation entirely in JNDI (my preference) or struts-config.xml. David I suppose for now a good plan would be to use GenericDataSource and research more reliable and portable options for conn pooling in the future? Perhaps by then DBCP will be cleaned up and a good stand-alone alternative. Matt Kruse _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reasonable to use EJBs for validation in ActionForm validate method?
For validation that can only be done against the database, should this go in the validate method or in the execute method? I usually do it in execute() and keep basic validations in the Validator framework. For example checking that a customer doesn't alerady exist before inserting it, or checking that a user has entered a valid address before the execute method is called to try and create it. Also, with the validator framework, does this just apply to basic (non model based) validation? You could write custom vaildators that do model based work. The validations that come with Struts perform some basic checks on the data before it reaches your model and allow for easy error display. David _ Find a cheaper internet access deal - choose one to suit you. http://www.msn.co.uk/internetaccess - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why is dbcp / pool removed?
Is there a list of the problems that DBCP has? I've started using the BasicDataSource in some of my applications, and am wondering if some of the really wierd behaviour I'm seeing is due to the problems that DBCP has Search bugzilla for open problem tickets. David Thanks. Jerry Jalenak Team Lead, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] -Original Message- From: Kruse, Matt [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 11:50 PM To: '[EMAIL PROTECTED] ' Subject: RE: Why is dbcp / pool removed? Isn't GenericDataSource deprecated? Yes, it will be removed in 1.2 but is included in 1.1 for backward compatibility. The one included is not the same as what is in RC1, though, correct? I'm just trying to figure out exactly what is changed and what I need to start experimenting with... I recommend using the package distributed with either your container or your database. If you tie your app to your coontainer, then it's not very portable, no? I can develop in Tomcat and publish to JRun with no problems, and I like to maintain that :) I suppose for now a good plan would be to use GenericDataSource and research more reliable and portable options for conn pooling in the future? Perhaps by then DBCP will be cleaned up and a good stand-alone alternative. Matt Kruse 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 the following email address: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why is dbcp / pool removed?
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html David Ed Yu wrote: You are better off using JNDI lookup to get the datasource. This is suppose to be universal (Tomcat and Jrun seems to work identical) although I've found a couple of differences among containers. Do you know of a decent how-to document on designs to use this method rather than directly use DBCP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why is dbcp / pool removed?
So, I don't want to use DBCP anymore, but I want to continue using struts-config to define my db so as not to disrupt the current state of the app too much. So I'm learning how the DBCP-independent RC2 handles the db connections all internally, and trying to figure out if that will work and what problems might exist with it. Having some luck so far, but I need to do a lot more playing around to make sure this doesn't replace my old problems with new ones :) Just keep in mind that Struts is getting out of the DataSource implementation business altogether post 1.1. You may want to search for other connection pooling packages to get a more permanent solution. David Matt _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Dependencies
commons-validator uses ORO but Struts doesn't use it directly. David I really dont know, for my case I use SecurityFilter which requires ORO. Why dont you take ORO out of your deployment and see if your app chokes? -Dan - Original Message - From: Doyle, Michael J [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 12:53 PM Subject: RE: Struts Dependencies Thanks for the pointer. Does this mean that Struts is not really dependent on ORO?? -Original Message- From: Dan Tran [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 1:59 PM To: Struts Users Mailing List Subject: Re: Struts Dependencies http://jakarta.apache.org/struts/userGuide/release-notes-1.1-rc2.html But it does not have ORO info -D - Original Message - From: Doyle, Michael J [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 10:21 AM Subject: Struts Dependencies Hi, Does anyone know what version of Jakarta ORO is packaged with the Struts 1.1 RC release? Actually, it would be useful to know the versions of all the dependent libraries in the release. Is there a way to find out from a Jakarta jar what its version is? Thanks in advance! - Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Correct validator DTD
commons-validator 1.1 has not been released yet, it is the development version. You should use the 1_0 or 1_0_2 dtd. David Which is the correct DTD for the Validator: !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN http://jakarta.apache.org/commons/dtds/validator_1_0.dtd; OR 1.1? !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Struts Validation Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/validation_1_1.dtd; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator Problen
You also need to subclass ValidatorForm or use DynaValidatorForm. David Hai I am new to struts.I have created one appplication similar to the one struts-example.ear. when javascript validation tags are added it show one script error --object requiredand then the form submits. ActionForm validation works fine.I have called validation fn similar to that one in example.onsubmit = validateRegistrationForm(this). 1.I have created validation.xml 2.I have copied validator-rules.xml 3.I have added plugin for validator in config. Is there anything to be done in addition to the above steps. Regards Parthasarathy -- From: Rob Leland[SMTP:[EMAIL PROTECTED] Reply To: Struts Users Mailing List Sent: Wednesday, June 11, 2003 9:11 AM To:Struts Users Mailing List Subject: Re: Correct validator DTD Raible, Matt wrote: Which is the correct DTD for the Validator: !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN http://jakarta.apache.org/commons/dtds/validator_1_0.dtd; If you are using Validator with struts 1.1 RC 1 or RC2 then it is http://jakarta.apache.org/commons/dtds/validator_1_0_1.dtd OR 1.1? !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Struts Validation Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/validation_1_1.dtd; This is used if you are using the Validator nightly build by itself or have rebuilt struts from its source code against the nightly validator. -Rob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: strange problem setting up struts
In some versions of struts, you must have an internet connection in order to the validation XML files to validate. I have the problem in 1.1RC1, but I read that it is fixed in the nightly build. In your validator XML files, you can change the URL of the DTD to point to a local disk file, and that should solve the problem (I think!). A better solution is to download commons-validator 1.0.2 or just wait to download Struts 1.1 RC2 when it comes out in a few days. David -Kevin --- Aaron Robinson [EMAIL PROTECTED] wrote: I'm working through the readme with struts rc1.1 and get the following error from both Tomcat and WLS 8.1 when trying to start the servlet container after deploying the struts-examples war. The documentation war has deployed successfuly INFO: Initializing, config='org.apache.struts.webapp.example.ApplicationResource s', returnNull=true 09-Jun-2003 12:17:40 org.apache.struts.webapp.example.memory.MemoryDatabasePlugI n init INFO: Initializing memory database plug in from '/WEB-INF/database.xml' 09-Jun-2003 12:17:40 org.apache.struts.validator.ValidatorPlugIn initResources INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml' 09-Jun-2003 12:17:40 org.apache.struts.validator.ValidatorPlugIn initResources SEVERE: jakarta.apache.org java.net.UnknownHostException: jakarta.apache.org at java.net.InetAddress.getAllByName0(Ljava.lang.String;Z)[Ljava.net.Ine tAddress;(Unknown Source) at java.net.InetAddress.getAllByName0(Ljava.lang.String;)[Ljava.net.Inet Address;(Unknown Source) at java.net.InetAddress.getAllByName(Ljava.lang.String;)[Ljava.net.InetA ddress;(Unknown Source) at weblogic.net.http.HttpClient.openServer(Ljava.lang.String;I)V(HttpCli ent.java:228) at weblogic.net.http.HttpClient.openServer()V(HttpClient.java:292) _ Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using Bean Tag inside html Tag. Urgent
You can't use a tag in another tag's attribute. David Hi, I am facing problem in using bean:write / tag inside html:text /. What I am trying to do is something like this html:text property=userName styleClass=bean:write name=\loginAF\ property=\useStyleClass\ / / I am not getting the output I am expecting. I expect to get the value stored in useStyleClass in styleClass attribute but What I am getting in styleClass is the entire tag i.e. bean:write tag. Any solutions for this problem. Anurag Garg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: strange problem setting up struts
I've updated the struts-examples.war with commons-validator-1.0.2 and still get the problem Then you've configured something incorrectly because it works for me. Make sure your DTD declaration in your xml file is correct. David From: David Graham [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: strange problem setting up struts Date: Mon, 09 Jun 2003 08:04:47 -0600 In some versions of struts, you must have an internet connection in order to the validation XML files to validate. I have the problem in 1.1RC1, but I read that it is fixed in the nightly build. In your validator XML files, you can change the URL of the DTD to point to a local disk file, and that should solve the problem (I think!). A better solution is to download commons-validator 1.0.2 or just wait to download Struts 1.1 RC2 when it comes out in a few days. David -Kevin --- Aaron Robinson [EMAIL PROTECTED] wrote: I'm working through the readme with struts rc1.1 and get the following error from both Tomcat and WLS 8.1 when trying to start the servlet container after deploying the struts-examples war. The documentation war has deployed successfuly INFO: Initializing, config='org.apache.struts.webapp.example.ApplicationResource s', returnNull=true 09-Jun-2003 12:17:40 org.apache.struts.webapp.example.memory.MemoryDatabasePlugI n init INFO: Initializing memory database plug in from '/WEB-INF/database.xml' 09-Jun-2003 12:17:40 org.apache.struts.validator.ValidatorPlugIn initResources INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml' 09-Jun-2003 12:17:40 org.apache.struts.validator.ValidatorPlugIn initResources SEVERE: jakarta.apache.org java.net.UnknownHostException: jakarta.apache.org at java.net.InetAddress.getAllByName0(Ljava.lang.String;Z)[Ljava.net.Ine tAddress;(Unknown Source) at java.net.InetAddress.getAllByName0(Ljava.lang.String;)[Ljava.net.Inet Address;(Unknown Source) at java.net.InetAddress.getAllByName(Ljava.lang.String;)[Ljava.net.InetA ddress;(Unknown Source) at weblogic.net.http.HttpClient.openServer(Ljava.lang.String;I)V(HttpCli ent.java:228) at weblogic.net.http.HttpClient.openServer()V(HttpClient.java:292) _ Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why is dbcp / pool removed?
Just wondering why dbcp/pool is removed from RC2, will they be back for the final release? I have lots of apps that use them and wanted to know what direction this is going. Because no one was willing to fix DBCP. It's really a one man show over there and he was busy doing other things. I took a crack at it and determined the problems (such as trying to recover lost connections from poorly coded apps) ran too deep to fix in a suitable amount of time. Struts 1.1 includes its trusty old GenericDataSource but you can always plugin DBCP if you want. David Thanks Ka-Wai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running Struts in Eclipse w/ Sysdeo Plugin: Digester Error on Startup
I'm using the same setup as you with no problems. Install Tomcat again and don't touch any of its directories. In the Sysdeo Tomcat plugin setup, don't put any of your projects on Tomcat's classpath. David Apologies if this has been answered, but I've already searched the archives and have found no answer. I have also posted to the Tomcat list ... I get the following error when starting up my Web app in Eclipse (2.1) using the latest version of the Sysdeo plugin: 841 [main] ERROR digester.Digester - Digester.getParser: java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) at org.apache.commons.digester.Digester.getFactory(Digester.java:518) at org.apache.commons.digester.Digester.getParser(Digester.java:692) at org.apache.commons.digester.Digester.getXMLReader(Digester.java:908) at org.apache.commons.digester.Digester.parse(Digester.java:1543) at org.apache.catalina.startup.ContextConfig.defaultConfig(ContextConfig.java:548) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:638) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202) To make it this far, I had to put the j2ee.jar in Tomcat's common/lib dir, and I have been sure to *not* include the servlet.jar in both places--it's only in Tomcat's common/lib dir. Also, I have put the xerces.jar in this dir, but to no avail ... Has anyone else encountered such errors? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why is dbcp / pool removed?
Struts 1.1 includes its trusty old GenericDataSource but you can always plugin DBCP if you want. Hold on a second... Isn't GenericDataSource deprecated? Yes, it will be removed in 1.2 but is included in 1.1 for backward compatibility. I just recently switched from using GenericDataSource in my struts-config.xml (by specifying no type=) to explicitly using type=org.apache.commons.dbcp.BasicDataSource because of the docs in GenericDataSource. Is this no longer the recommended approach? If DBCP works for you, then continue using it. It's just not included in the Struts distro anymore. In the future Struts won't distribute *any* connection pooling package, you will have to plug in your favorite implementation. Currently, I'm having some problems with pooling and idle connections which are closed by the db server actually being given back to my app (I suspect). Could this be related to the bugs in dbcp you are talking about? Maybe, this behavior is configurable in DBCP so it may or may not be trying to recover lost connections. Using 1.1RC2, what is the recommended way to acquire pooled db connections? I recommend using the package distributed with either your container or your database. David Matt Kruse _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why is dbcp / pool removed?
im using tomcat. what is included in tomcat then? thanks. Tomcat uses DBCP. Interestingly, no one from Tomcat seems interested in maintaining DBCP. David I recommend using the package distributed with either your container or your database. David - Original Message - From: David Graham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 11:07 AM Subject: RE: Why is dbcp / pool removed? Struts 1.1 includes its trusty old GenericDataSource but you can always plugin DBCP if you want. Hold on a second... Isn't GenericDataSource deprecated? Yes, it will be removed in 1.2 but is included in 1.1 for backward compatibility. I just recently switched from using GenericDataSource in my struts-config.xml (by specifying no type=) to explicitly using type=org.apache.commons.dbcp.BasicDataSource because of the docs in GenericDataSource. Is this no longer the recommended approach? If DBCP works for you, then continue using it. It's just not included in the Struts distro anymore. In the future Struts won't distribute *any* connection pooling package, you will have to plug in your favorite implementation. Currently, I'm having some problems with pooling and idle connections which are closed by the db server actually being given back to my app (I suspect). Could this be related to the bugs in dbcp you are talking about? Maybe, this behavior is configurable in DBCP so it may or may not be trying to recover lost connections. Using 1.1RC2, what is the recommended way to acquire pooled db connections? I recommend using the package distributed with either your container or your database. David Matt Kruse _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator and Tiles...Problem Solved
We really need to figure out a better way of doing things for ValidatorForm and ValidatorActionForm. The differences between the classes are minor and they should probably be only one class. I'm glad you fixed your problem! David David, your email was illuminating. Actually I had a closer look at the code; the [silly!] problem was that I declared a DynaValidatorActionForm in the struts-config.xml file and used a DynaValidatorForm in my action. Now I declared both to be DynaValidatorForm and it works. Thanks, Marco - Original Message - From: David Graham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 08, 2003 4:50 AM Subject: Re: Validator and Tiles I use Tiles and Validator together with no problems. You should never use Javascript as your sole form of validation, it's merely a convenience for the client. Did you subclass ValidatorForm? I've forgotten to do that once or twice and wondered why no validation was happening. David From: Marco Tedone [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-user-list [EMAIL PROTECTED] Subject: Validator and Tiles Date: Sun, 8 Jun 2003 01:47:52 +0100 Hi, I've been through the mailing archive without success. I remember had being used the Validator succesfully in a past; then my web developer started to use javascript to perform the checks so we didn't put attention to Validator any more. Now I'm using tiles for my site and would like to use validator, as I am not a javascript expert. It seems to me that Validator and tiles have some difficulties working together; is that correct? It seems to me to have made all the setup correctly but when I submit the form, nothing happens. I've also read that someone else had the same problem with tiles + Validator working together. If this is not the case, could I proceede to post to the mailing list my code? Regards, Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about maxlength with Validator
This may be do to an arg problem in recent commons-validator nightly builds. I fixed this last night so it should show up in today or tommorrow's commons-validator build. You could also download commons-validator-1.0.2.jar and use that. You should also be aware that Struts will not generate any javascript validations for password fields other than required. The less hackers know about your password requirements the better. Of course, there's nothing stopping you from altering the validator-rules.xml file javascript. David From: Marco Tedone [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-user-list [EMAIL PROTECTED] Subject: Question about maxlength with Validator Date: Sun, 8 Jun 2003 11:03:00 +0100 Hi, now that I got Validator working properly, I'm trying to declare a validation by which an edited field cannot be greater than a certain size, but it doesn't work. Here follows what I've done: In the struts-config.xml file, i declared among the others, a password property in the DynaValidatorForm with the size attribute set to 10 form-property name=password type=java.lang.String size=10 / In the validation.xml file, I declared the validation for my field as follows: field property=password depends=required,maxlength arg0 key=error.required.password/ /field I thought that maxlength would rely on the 'size' attribute declared in the struts-config.xml file. I obtain a message like the following when Validator performs the validation: * Password can not be greater than null characters. What am I doing wrong? Thanks, Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validation Problem
Well, these validations have already been coded for you and can be configured in an xml file by using the Validator. I highly recommend you look into using the validator because it will save you a bunch of time. Your problem may have something to do with setting the fields = in reset. I would put a stdout call in reset to see when it gets called. If your forms are stored in the request (and I maybe even in the session) then you don't need to implement the reset method at all. It's really only needed to reset boolean properties. David From: Thomas Miskiewicz [EMAIL PROTECTED] Reply-To: Thomas Miskiewicz [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Validation Problem Date: Sun, 8 Jun 2003 22:47:25 +0200 Hi! I now have a strange validation problem. I use this ActionForm class: package com.mycompany; import org.apache.struts.action.Action; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionServlet; import org.apache.struts.util.MessageResources; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.lang.String; public class PostTestForm extends ActionForm { private String field1 = ; private String field2 = ; private String field3 = ; private void checkForEmpty(String fieldName, String fieldKey, String value, ActionErrors errors) { if (value.trim().length() == 0) { System.out.println(fieldName + value.trim().length()); ActionError error = new ActionError(error.posttest.field.null, fieldName); errors.add(fieldKey, error); } } private void checkForLength(String fieldName, String fieldKey, String value, int maxLength, ActionErrors errors) { if (value.length() maxLength) { ActionError error = new ActionError(error.posttest.field.length, fieldName); System.out.println(maxLength); errors.add(fieldKey, error); } } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); checkForEmpty(field1, error.field1.empty, getField1(), errors); checkForEmpty(field2, error.field2.empty, getField2(), errors); checkForEmpty(field3, error.field3.empty, getField3(), errors); checkForLength(field1, error.field1.length, getField1(), 5, errors); checkForLength(field2, error.field2.length, getField2(), 5, errors); checkForLength(field3, error.field3.length, getField3(), 5, errors); return errors; } public void reset(ActionMapping mapping, HttpServletRequest request) { field1 = ; field2 = ; field3 = ; } public String getField1() { return field1; } public void setField1(String feld1) { this.field1 = field1; } public String getField2() { return field2; } public void setField2(String field2) { this.field2 = field2; } public String getField3() { return field3; } public void setField3(String field3) { this.field3 = field3; } } Everything works fine except the application always claims, that field1 is empty even if it's not. value.trim().length() always is = 0 with respect to the field1. The content of the HTML-Form looks like this: %@ page language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % %@ taglib uri=/WEB-INF/struts-template.tld prefix=template % html:form action=postTest table border=0 cellpadding=0 cellspacing=0 style=border-collapse:collapse bgcolor=E7E7E7 width=100% height=900px tr td html:errors/ /td /tr tr td input name=field1 type=text size=17 maxlength=32 /td /tr tr td input name=field2 type=text size=17 maxlength=32 /td /tr tr td input name=field3 type=text size=17 maxlength=32 /td /tr tr td input name=submit type=submit value=Submit /td /tr /table /html:form What's wrong??? Regards Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validation Problem
The author is incorrect. Check out http://jakarta.apache.org/struts/faqs/newbie.html#reset for more info. David Well, these validations have already been coded for you and can be configured in an xml file by using the Validator. I highly recommend you look into using the validator because it will save you a bunch of time. I'll do soon. I getting acquainted with Struts working with the book Professional Struts Applications. I still have 14 pages ahead the validator framework. But before I jump to it, I'd like to understand why some basics don't work to gain more confidence in the whole framework. Your problem may have something to do with setting the fields = in reset. I would put a stdout call in reset to see when it gets called. I did that and reset gets called. If your forms are stored in the request (and I maybe even in the session) then you don't need to implement the reset method at all. They're being stored in the request. But wait a second. Why do you mean I don't need to implement the reset method? The guy in the book states: The reset() method is invoked only if the developer has declared that the ActionForm class should be stored in the request. This is necessary because Struts maintains a cache for each of the ActionForm classes. A single instance of an ActionForm class can be shared by multiple users for different reqests at different times. Hence, the developer must implement the reset() method to ensure that the end user never gets some other user's data How does this sound? It's really only needed to reset boolean properties. He doesn't mention that... Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [validator] arg0-arg3 elements need name attribute to display message?
I'm glad someone is doing some work on the validator. And speaking of that, I will most likely be using the validator extensively pretty soon in a new application, which may result in some contributions. Are there specific bugs or feature requests where help is needed? You can query bugzilla for a list of current bugs and enhancements. I'm basically working alone on validator right now but Rob Leland has recently moved the Javascript stuff from Struts over to commons and added a UrlValidator. Here are some things I'm planning for commons-validator 2.0: - Move base Java requirement to 1.4. I tested replacing all of the ORO classes with the Java 1.4 regex equivalents and there was a 50% speed increase. - Change form and field semantics to bean and property to better align the validator with bean validation as opposed to form validation. Forms are just a special case of bean validation. I'm comfortable enough with the current changes to cut a commons-validator-1.1 release after Struts 1.1 goes final. All help and contributions are welcome! David Thanks, John -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Sunday, June 08, 2003 4:52 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [validator] arg0-arg3 elements need name attribute to display message? This is a bug in the recent commons-validator nightly builds. Download commons-validator 1.0.2 or tomorrow's build. I have been doing some major refactoring over in commons-validator and unfortunately broke the arg configuration :-(. On the bright side, in future commons-validator versions you'll be able to define more than 4 replacement args :-). David I've been doing some messing around with the Validator and ran into an issue I haven't seen mentioned on the list yet. I'm using 2 day old nightly builds of Struts and commons-validator. Now, this is my first time trying out the validator so I could be doing something wrong as well. Anyway from all the examples that I have seen, and postings on the list, this is how to define a validator for a form/field: form name=testForm field property=name depends=required arg0 key=testform.name/ /field field property=value depends=required arg0 key=testform.value/ /field /form Now, validation DOES happen, however the message keys (and I only have one bundle) testform.name and testform.value are not used when a validation occurs. Instead I get: null is required. The only way I was able to get the proper message key to work, was to specify the arg* elements like this: arg0 name=required key=testform.name/ In other words, I have to reference the validator name being used in the arg* in order for the message to resolve. This is something that I haven't seen mentioned anywhere in the existing documentation, books, or on the list. Is it a bug or a new requirement? This happens with all Validator form types, and my own Dyna form class. Thanks, John This communication is intended for the use of the individual(s) or entity it was addressed to and may contain confidential and/or privileged information. If the reader of this transmission is not the intended recipient, you are hereby notified that any review, dissemination, distribution or copying of this communication is prohibited. If you receive this communication in error, please notify the sender immediately and delete this communication from your system(s) to which it was sent and/or replicated to. (c) 2003 Sapiens Americas Corp. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This communication is intended for the use of the individual(s) or entity it was addressed to and may contain confidential and/or privileged information. If the reader of this transmission is not the intended recipient, you are hereby notified that any review, dissemination, distribution or copying of this communication is prohibited. If you receive this communication in error, please notify the sender immediately and delete this communication from your system(s) to which it was sent and/or replicated to. (c) 2003 Sapiens Americas Corp. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
Re: Adding server-side validation when using DispatchAction
You need to use either DynaValidatorForm or DynaValidatorActionForm for the Struts validator to work. If you've already configured the validations in the xml files then all you should need to do is use the right Dyna classes. David Ok, maybe I don't understand the Validator system well yet. I would like to apply the server-side and client side validation. (server-side for if client side falls thought for some or other reason) What is the best and easiest way to do this? - Original Message - From: Alen Ribic [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, June 08, 2003 10:57 PM Subject: Adding server-side validation when using DispatchAction Hey all I'm currently combining several similar actions using sublass of DispatchAction class. I'm using the Validator (validator-rules.xml, validation.xml as plugin) for my client-side validation successfully. I'm also using the DynaActionForm for my form bean(s). Since now I don't have a subclass of ActionForm, how do I override the validate() method? Basically, using subclass of ActionForm all the time, I used to place my server-side validation into the validate() method. How do I apply server-side validation when using DynaActionForm and DispatchAction classes? Thanks --Alen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [validator] arg0-arg3 elements need name attribute to display message?
Does that mean that future struts-1.x releases will be unable to use commons-validator 2.x without changing the Struts base requirements to 1.4? Struts would not use commons-validator 2.x in the 1.x series. I have no timeline for changing commons-validator to 2.x anyways. David Gareth. - Change form and field semantics to bean and property to better align the validator with bean validation as opposed to form validation. Forms are just a special case of bean validation. I'm comfortable enough with the current changes to cut a commons-validator-1.1 release after Struts 1.1 goes final. All help and contributions are welcome! David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using struts token
i want to use struts tokens to (un)process duplicate submissions. however, i could not find out anything about using tokens in any of the sample apps that come with struts. 1) is there a sample application which demonstrates using tokens in struts? struts-example uses tokens. You can also look at the javadoc for the Action class for token related methods. 2) i'm not using the struts html tag library to display forms or form controls. would this be a problem? would i have to do extra work if so? html:form renders a hidden token field for submission so you'll need to do that yourself if you don't want to use that tag. David thanx riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Logging.. when to use it
Hi All, I wish to know when to use the logging. What are the application senarios where logging will be useful. I mean to say that what will be the ideal situations where logging can be used. Logging is extremely useful when debugging problems in production applications. I normally setup exception logging to go to a file and to email an administrator. Emailed stack traces are invaluable when trying to debug problems. Struts uses commons-logging to insulate itself from the numerous logging packages users may choose. However, I just use Java 1.4 logging directly in my apps. David I would appreciate an eye opening reply for this. Cheers Vijay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator and Tiles
I use Tiles and Validator together with no problems. You should never use Javascript as your sole form of validation, it's merely a convenience for the client. Did you subclass ValidatorForm? I've forgotten to do that once or twice and wondered why no validation was happening. David From: Marco Tedone [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-user-list [EMAIL PROTECTED] Subject: Validator and Tiles Date: Sun, 8 Jun 2003 01:47:52 +0100 Hi, I've been through the mailing archive without success. I remember had being used the Validator succesfully in a past; then my web developer started to use javascript to perform the checks so we didn't put attention to Validator any more. Now I'm using tiles for my site and would like to use validator, as I am not a javascript expert. It seems to me that Validator and tiles have some difficulties working together; is that correct? It seems to me to have made all the setup correctly but when I submit the form, nothing happens. I've also read that someone else had the same problem with tiles + Validator working together. If this is not the case, could I proceede to post to the mailing list my code? Regards, Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts validator
Also, It looks like Struts run-time does not validate validation.xml against DTD, as a result any typo there are welcome without warnings. This is a problem with commons-validator not validating the xml files. I have been working to fix this but other problems have taken priority. David The problems in the java part of Struts might be solved with any Java IDE, but the problems with XML part becomes a really personal problem of Struts developers. Actually, it was a primary reason we start to develop Struts Studio. Regards, Sergey Smirnov - Exadel Struts Studio - IDE for Struts http://www.exadel.com/strutsStudio - - Original Message - From: David Graham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 6:32 PM Subject: RE: struts validator Beats me, dude. I struggled with it for 3 days and said enough is enough, and wrote my own validations in my Action classes. If you look through the mail archive, you'll see right off that this is what happens to the majority of people trying to get Validator to work. That's one reason I decided to volunteer over on commons-validator. I've made a major effort to cleanup the validator code so that we can fix bugs faster and make it easier to use. I'm definitely interested in fixing problems you have using it but with a description like, it works sometimes but not others is not very helpful. David Good luck, Mark -Original Message- From: Frances Aleah Z. de Guzman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 8:55 PM To: Struts Users Mailing List; Mark Galbreath Subject: Re: struts validator how can i fix it? On Friday 30 May 2003 08:20 pm, Mark Galbreath wrote: That's because the Validator works by magic and you obviously have a hex in your machine. (sometimes I kill myself) Mark -Original Message- From: Frances Aleah Z. de Guzman [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 2:49 AM To: [EMAIL PROTECTED] Subject: struts validator struts validator (client side validation) example is not working in my pc, even the struts example. but it is working with the other pcs in our office. i noticed that when i view the page source there is no javascript generated unlike in the other pc. is there still i have to configure or what? im using struts rc1.1 and j2sdk 1.4.1_02 and tomcat 4.1.24 as the web server and sometimes JBOSS 3.0.6 -- Frances Aleah Z. De Guzman SA/Programmer Ingenium Technology, Inc. http://www.ingenium.com.ph Disclaimer : This message is intended only for the named recipient. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts validator
This was caused by a bug in commons-validator that was fixed some time ago. David hi, Can you please let me know of how do you get rid of this issuse ( i mean setting up the validator so that i need not be connected to the net ) ... Thanks Guru -Original Message- From: Brian McSweeney [mailto:[EMAIL PROTECTED] Sent: 05 June 2003 10:50 To: Struts Users Mailing List Subject: Re: struts validator I had initial trouble setting up the validator, mainly to do with it not working when you try to validate the dtd with a machine not connected to the net. It didn't give a good error explaining this. However, once I realised this was the problem, and set up the validator properly, it works really well. Especially, if, like me, you are new to javascript! Brian - Original Message - From: Mark Galbreath [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, June 05, 2003 5:18 AM Subject: RE: struts validator You know, I just don't get it. I think Validator was a great idea that simply proved wrong in implementation. And I know I am not alone it this assessment. Mark -Original Message- From: Jeff Kyser [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 12:03 AM To: Struts Users Mailing List Subject: Re: struts validator Like I said, I dont use client-side, and its been pretty smooth sailing for me. Sorry your experience was different, but personally, I like it. Especially defining constants for validation masks and using them over and over on lots of different forms in different projects even. And the requiredif has been pretty handy for a number of cases to boot Of course, there are still cases where I need to go to validate() methods in the actions, but they are less and less, just as I use actual FormBeans less and less, now that i halfway grok DynaValidatorForms... cheers, -jeff On Wednesday, June 4, 2003, at 10:40 PM, Mark Galbreath wrote: yeah, well, DUH! When are you guys going to realize that Validator should never have come out here even in beta. It sucks. Mark -Original Message- From: Jeff Kyser [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 9:25 PM To: Struts Users Mailing List Subject: Re: struts validator I only did server-side validations, using v1.1b3, until I saw lots of people complaining that v1.1rc1 wasn;t working for client-side validations. I tried it (rc1) and it didn't work for me either. I haven't messed with the nightly builds - just went back to 1.1b3. Its probably been fixed in the latest, but since 1.1rc2 is coming out soon, figure I'll wait until then to check it out again. -jeff On Wednesday, June 4, 2003, at 08:18 PM, Mark Galbreath wrote: Beats me, dude. I struggled with it for 3 days and said enough is enough, and wrote my own validations in my Action classes. If you look through the mail archive, you'll see right off that this is what happens to the majority of people trying to get Validator to work. Good luck, Mark -Original Message- From: Frances Aleah Z. de Guzman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 8:55 PM To: Struts Users Mailing List; Mark Galbreath Subject: Re: struts validator how can i fix it? On Friday 30 May 2003 08:20 pm, Mark Galbreath wrote: That's because the Validator works by magic and you obviously have a hex in your machine. (sometimes I kill myself) Mark -Original Message- From: Frances Aleah Z. de Guzman [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 2:49 AM To: [EMAIL PROTECTED] Subject: struts validator struts validator (client side validation) example is not working in my pc, even the struts example. but it is working with the other pcs in our office. i noticed that when i view the page source there is no javascript generated unlike in the other pc. is there still i have to configure or what? im using struts rc1.1 and j2sdk 1.4.1_02 and tomcat 4.1.24 as the web server and sometimes JBOSS 3.0.6 -- Frances Aleah Z. De Guzman SA/Programmer Ingenium Technology, Inc. http://www.ingenium.com.ph Disclaimer : This message is intended only for the named recipient. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,
Re: struts validator
Not sure all this talk of validator is that justifiable. I've had no issues generating both the client side and server side validation, and its saved me a lot of work. Like others i think it would be nice to define form beans and validation rules in the same place but I like it as it is, unless anybody has any alternatives? One thing to consider is that Struts validation is based on commons-validator which reads its own xml config file. Moving the validation configuration to struts-config.xml would require us to do all the validator setup in Struts rather than leveraging the commons-validator code. David Thats my 2 pence.. Mark On Thursday, Jun 5, 2003, at 05:24 Europe/London, Jeff Kyser wrote: So jump in and help David fix it. Otherwise, you're likely to wake up and find a large block of cheddar in your bed. :) On Wednesday, June 4, 2003, at 11:18 PM, Mark Galbreath wrote: You know, I just don't get it. I think Validator was a great idea that simply proved wrong in implementation. And I know I am not alone it this assessment. Mark -Original Message- From: Jeff Kyser [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 12:03 AM To: Struts Users Mailing List Subject: Re: struts validator Like I said, I dont use client-side, and its been pretty smooth sailing for me. Sorry your experience was different, but personally, I like it. Especially defining constants for validation masks and using them over and over on lots of different forms in different projects even. And the requiredif has been pretty handy for a number of cases to boot Of course, there are still cases where I need to go to validate() methods in the actions, but they are less and less, just as I use actual FormBeans less and less, now that i halfway grok DynaValidatorForms... cheers, -jeff On Wednesday, June 4, 2003, at 10:40 PM, Mark Galbreath wrote: yeah, well, DUH! When are you guys going to realize that Validator should never have come out here even in beta. It sucks. Mark -Original Message- From: Jeff Kyser [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 9:25 PM To: Struts Users Mailing List Subject: Re: struts validator I only did server-side validations, using v1.1b3, until I saw lots of people complaining that v1.1rc1 wasn;t working for client-side validations. I tried it (rc1) and it didn't work for me either. I haven't messed with the nightly builds - just went back to 1.1b3. Its probably been fixed in the latest, but since 1.1rc2 is coming out soon, figure I'll wait until then to check it out again. -jeff On Wednesday, June 4, 2003, at 08:18 PM, Mark Galbreath wrote: Beats me, dude. I struggled with it for 3 days and said enough is enough, and wrote my own validations in my Action classes. If you look through the mail archive, you'll see right off that this is what happens to the majority of people trying to get Validator to work. Good luck, Mark -Original Message- From: Frances Aleah Z. de Guzman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 8:55 PM To: Struts Users Mailing List; Mark Galbreath Subject: Re: struts validator how can i fix it? On Friday 30 May 2003 08:20 pm, Mark Galbreath wrote: That's because the Validator works by magic and you obviously have a hex in your machine. (sometimes I kill myself) Mark -Original Message- From: Frances Aleah Z. de Guzman [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 2:49 AM To: [EMAIL PROTECTED] Subject: struts validator struts validator (client side validation) example is not working in my pc, even the struts example. but it is working with the other pcs in our office. i noticed that when i view the page source there is no javascript generated unlike in the other pc. is there still i have to configure or what? im using struts rc1.1 and j2sdk 1.4.1_02 and tomcat 4.1.24 as the web server and sometimes JBOSS 3.0.6 -- Frances Aleah Z. De Guzman SA/Programmer Ingenium Technology, Inc. http://www.ingenium.com.ph Disclaimer : This message is intended only for the named recipient. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To
Re: Handling ServletException
The Struts exception handling mechanism only handles exceptions thrown from Action.execute() methods. Your JSP is probably throwing an exception so you need to setup error-page elements in web.xml to point to a friendlier error page. David Hi. I've followed everyones advice and written a custom Exception handler. The exceptionhandler is set up in struts-config to catch all exceptions : !-- Global Exceptions -- global-exceptions exception handler=mypackage.strutsextensions.CustomizedExceptionHandler key=global.error.message scope=request type=java.lang.Exception/ /global-exceptions This works great, but my problem is that sometimes there occures a SerlvetException which is just presented on screen and is not caught by my CustomizedExceptionHandler. I believe that this is because the ServletException is thrown by the container ?? Anyhow, I would like to catch these exceptions as well, and preferably route them to my custom Error handler. Does anyone have some advice on how to handle ServletExceptions to give the user better information ? Best Regards Eirik Kjølsrud, Norway - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: question about struts
You can use a Struts PlugIn to initialize your components and store them in the ServletContext. David hi all, i have been working with JSP model 2 for few years, and now i want to move to struts. i am starting to get acquainted with it, and i need help to face this situation. in my mvc, i am using 2 components, one to connect to R3 and the other for connecting to DB. the lifecycle of those components is the same as my servlet, since those components are not user/session/request specific. in reading docs about struts, i could not figure out where to put those components in the struts framework. of course, i can put them in ActionServlet, but this will require me to modify the code of the ActionServlet. is there any other way to do that other than modifying the code of ActionServlet? hope someone can help... thanx in advance and regards marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: switch statement
You can't use Strings in switch statements. AFAIK, only ints and chars are allowed David Hey everyone, This is more of a Java question than a Struts question, I hope you all don't mind. I'm just wondering if there is any way to use a String for a switch statement, or if you are restricted to the true primitive types. I haven't found a way, but it seems like something that lots of people would want that wouldn't be hard for the Java developers to allow for. Wouldn't you agree? Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: switch statement
If the parameter values all have different first characters you could extract the first char and use that in your switch. David The reason I wanted to do this was to make my Action classes cleaner. I send a parameter to the Action to determine which item to pull from a database, then forward to a certain page. I didn't think I could get the switch to work, it was worth a try though. For a situation like mine, what do you all find to be the best way of doing this? I know I can use a series of if statements, it's just not very pretty... Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 11:38 AM To: Struts Users Mailing List Subject: Re: switch statement Kamholz, Keith (corp-staff) USX wrote: Hey everyone, This is more of a Java question than a Struts question, I hope you all don't mind. Not really, but for future reference I have found this resource to be more helpful for such questions: http://forum.java.sun.com/forum.jsp?forum=31 I'm just wondering if there is any way to use a String for a switch statement, or if you are restricted to the true primitive types. I haven't found a way, but it seems like something that lots of people would want that wouldn't be hard for the Java developers to allow for. Wouldn't you agree? The reason why it doesn't work is probably specific to the implementation of the language (maybe performance reasons), but a lot of people don't miss it -- nor would they agree, I suspect. The reason is that you can usually add behaviors to objects so that a single polymorphic method call can usually eliminate all of the infrastructural work of writing a switch statement, so doing a switch on an object doens't make much sense in that context. Of course, this is not applicable in all senses, such as your case with String which is final Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: switch statement
If the value you're looking up in the database is ultimately an int and you're just using String names to make the code maintainable, you could use a Map to map the names to the ints. That would get rid of all the switches and ifs. David Because having descriptive values for parameters helps make your code more understandable, both for yourself and for others. It's not a big deal, I'll just use the if statements. Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 -Original Message- From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 11:49 AM To: 'Struts Users Mailing List' Subject: RE: switch statement Why don't you send a parameter that can be converted into an int then? -Richard -Original Message- From: Kamholz, Keith (corp-staff) USX [SMTP:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 8:42 AM To: 'Struts Users Mailing List' Subject: RE: switch statement The reason I wanted to do this was to make my Action classes cleaner. I send a parameter to the Action to determine which item to pull from a database, then forward to a certain page. I didn't think I could get the switch to work, it was worth a try though. For a situation like mine, what do you all find to be the best way of doing this? I know I can use a series of if statements, it's just not very pretty... Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 11:38 AM To: Struts Users Mailing List Subject: Re: switch statement Kamholz, Keith (corp-staff) USX wrote: Hey everyone, This is more of a Java question than a Struts question, I hope you all don't mind. Not really, but for future reference I have found this resource to be more helpful for such questions: http://forum.java.sun.com/forum.jsp?forum=31 I'm just wondering if there is any way to use a String for a switch statement, or if you are restricted to the true primitive types. I haven't found a way, but it seems like something that lots of people would want that wouldn't be hard for the Java developers to allow for. Wouldn't you agree? The reason why it doesn't work is probably specific to the implementation of the language (maybe performance reasons), but a lot of people don't miss it -- nor would they agree, I suspect. The reason is that you can usually add behaviors to objects so that a single polymorphic method call can usually eliminate all of the infrastructural work of writing a switch statement, so doing a switch on an object doens't make much sense in that context. Of course, this is not applicable in all senses, such as your case with String which is final Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] web.xml error-page configuration problem
Is this at the top of your jsp? %@ page errorPage=/jsp/error.jsp % David From: Hohlen, John C [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-User (E-mail) [EMAIL PROTECTED] Subject: [OT] web.xml error-page configuration problem Date: Thu, 5 Jun 2003 12:59:26 -0500 I'm using WebLogic 6.1 SP 2 and I can't get the web.xm. error-page configuration to work for exceptions occurring within a JSP. If the exception, occurs in Java code (i.e. non-JSP), the error page works fine. But if it occurs in the JSP, I see a stack trace on the screen instead of forwarding to the error JSP. Here's the setting I have in web.xml file: error-page exception-typejava.lang.Throwable/exception-type location/jsp/error.jsp/location /error-page This should handle every type of exception, right? In my JSP, I'm intentionally creating a null pointer exception. I also tried adding the following to my web.xml file and it still didn't work: error-page exception-typejava.lang.NullPointerException/exception-type location/jsp/error.jsp/location /error-page Any help is greatly appreciated, Thanks, JOHN HOHLEN - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action Form: HashMap
Read the mapped properties section here: http://jakarta.apache.org/struts/faqs/indexedprops.html David From: Ray Madigan [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Action Form: HashMap Date: Thu, 5 Jun 2003 11:00:12 -0700 I have a form that has elements that I do not know the names of ahead of time. I want to have struts scrape the form into a map so the key is the name of the element and the value is the value of the element when it was submitted. I looked for an action form that acted like this. Has anyone done it before, or is there a better way? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] web.xml error-page configuration problem
%@ page errorPage=error.jsp % This is what I'm trying to avoid. I would prefer to only specify this via a single configuration setting in the web.xml. I think that's required. I created a header.jsp file that has all my taglib declarations and the error page declaration and then I include header.jsp in all of my other jsps. David JOHN -Original Message- From: Jimmy Emmanual [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 1:05 PM To: 'Struts Users Mailing List' Subject: RE: [OT] web.xml error-page configuration problem Is you /jsp/error.jsp page a error page? If not it as the Error Page via. %@ page isErrorPage=true % Jimmy -Original Message- From: Hohlen, John C [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 1:59 PM To: Struts-User (E-mail) Subject: [OT] web.xml error-page configuration problem I'm using WebLogic 6.1 SP 2 and I can't get the web.xm. error-page configuration to work for exceptions occurring within a JSP. If the exception, occurs in Java code (i.e. non-JSP), the error page works fine. But if it occurs in the JSP, I see a stack trace on the screen instead of forwarding to the error JSP. Here's the setting I have in web.xml file: error-page exception-typejava.lang.Throwable/exception-type location/jsp/error.jsp/location /error-page This should handle every type of exception, right? In my JSP, I'm intentionally creating a null pointer exception. I also tried adding the following to my web.xml file and it still didn't work: error-page exception-typejava.lang.NullPointerException/exception-type location/jsp/error.jsp/location /error-page Any help is greatly appreciated, Thanks, JOHN HOHLEN - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] web.xml error-page configuration problem
You could point your error-page to a redirected Struts action so that it doesn't show up in a tile. David David: When I add the errorPage directive to my JSP, my error page appeared in the screen b/c I'm using Struts Tiles. The page in which I'm creating a null pointer exception is actually an inner tile on my screen. The functionality that I'm looking for is the ability to forward to separate error screen which doesn't display the stack trace to the user. Thanks, JOHN -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 1:12 PM To: [EMAIL PROTECTED] Subject: Re: [OT] web.xml error-page configuration problem Is this at the top of your jsp? %@ page errorPage=/jsp/error.jsp % David From: Hohlen, John C [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-User (E-mail) [EMAIL PROTECTED] Subject: [OT] web.xml error-page configuration problem Date: Thu, 5 Jun 2003 12:59:26 -0500 I'm using WebLogic 6.1 SP 2 and I can't get the web.xm. error-page configuration to work for exceptions occurring within a JSP. If the exception, occurs in Java code (i.e. non-JSP), the error page works fine. But if it occurs in the JSP, I see a stack trace on the screen instead of forwarding to the error JSP. Here's the setting I have in web.xml file: error-page exception-typejava.lang.Throwable/exception-type location/jsp/error.jsp/location /error-page This should handle every type of exception, right? In my JSP, I'm intentionally creating a null pointer exception. I also tried adding the following to my web.xml file and it still didn't work: error-page exception-typejava.lang.NullPointerException/exception-type location/jsp/error.jsp/location /error-page Any help is greatly appreciated, Thanks, JOHN HOHLEN - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] web.xml error-page configuration problem
Okay, I'll try that. Do you mean the error-page in my web.xml, for example: This is how I set it up. error-page exception-typejava.lang.Throwable/exception-type location/displaySystemError.do/location /error-page Or the @page directive. For example: %@ page errorPage=/displaySystemError.do % I don't see why that wouldn't work either. David Thanks, JOHN -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 1:33 PM To: [EMAIL PROTECTED] Subject: RE: [OT] web.xml error-page configuration problem You could point your error-page to a redirected Struts action so that it doesn't show up in a tile. David David: When I add the errorPage directive to my JSP, my error page appeared in the screen b/c I'm using Struts Tiles. The page in which I'm creating a null pointer exception is actually an inner tile on my screen. The functionality that I'm looking for is the ability to forward to separate error screen which doesn't display the stack trace to the user. Thanks, JOHN -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 1:12 PM To: [EMAIL PROTECTED] Subject: Re: [OT] web.xml error-page configuration problem Is this at the top of your jsp? %@ page errorPage=/jsp/error.jsp % David From: Hohlen, John C [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-User (E-mail) [EMAIL PROTECTED] Subject: [OT] web.xml error-page configuration problem Date: Thu, 5 Jun 2003 12:59:26 -0500 I'm using WebLogic 6.1 SP 2 and I can't get the web.xm. error-page configuration to work for exceptions occurring within a JSP. If the exception, occurs in Java code (i.e. non-JSP), the error page works fine. But if it occurs in the JSP, I see a stack trace on the screen instead of forwarding to the error JSP. Here's the setting I have in web.xml file: error-page exception-typejava.lang.Throwable/exception-type location/jsp/error.jsp/location /error-page This should handle every type of exception, right? In my JSP, I'm intentionally creating a null pointer exception. I also tried adding the following to my web.xml file and it still didn't work: error-page exception-typejava.lang.NullPointerException/exception-type location/jsp/error.jsp/location /error-page Any help is greatly appreciated, Thanks, JOHN HOHLEN - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] web.xml error-page configuration problem
Yes, I am using Tiles and Tomcat and the common header works great. David Hi David, What container are you using and are you using Tiles? I'm using Jboss with Tomcat and I can't put all my taglibs in a common header (there was a discussion about this a while back on the Struts list). Thanks, -Tim -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 2:32 PM To: [EMAIL PROTECTED] Subject: RE: [OT] web.xml error-page configuration problem %@ page errorPage=error.jsp % This is what I'm trying to avoid. I would prefer to only specify this via a single configuration setting in the web.xml. I think that's required. I created a header.jsp file that has all my taglib declarations and the error page declaration and then I include header.jsp in all of my other jsps. David JOHN -Original Message- From: Jimmy Emmanual [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 1:05 PM To: 'Struts Users Mailing List' Subject: RE: [OT] web.xml error-page configuration problem Is you /jsp/error.jsp page a error page? If not it as the Error Page via. %@ page isErrorPage=true % Jimmy -Original Message- From: Hohlen, John C [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 1:59 PM To: Struts-User (E-mail) Subject: [OT] web.xml error-page configuration problem I'm using WebLogic 6.1 SP 2 and I can't get the web.xm. error-page configuration to work for exceptions occurring within a JSP. If the exception, occurs in Java code (i.e. non-JSP), the error page works fine. But if it occurs in the JSP, I see a stack trace on the screen instead of forwarding to the error JSP. Here's the setting I have in web.xml file: error-page exception-typejava.lang.Throwable/exception-type location/jsp/error.jsp/location /error-page This should handle every type of exception, right? In my JSP, I'm intentionally creating a null pointer exception. I also tried adding the following to my web.xml file and it still didn't work: error-page exception-typejava.lang.NullPointerException/exception-type location/jsp/error.jsp/location /error-page Any help is greatly appreciated, Thanks, JOHN HOHLEN - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] web.xml error-page configuration problem
Actually, that doesn't work. I'm getting an IllegalStateException doing %@ page errorPage=/displaySystemError.do % java.lang.IllegalStateException: Cannot forward a response that is already committed I think this is a direct result of using Tiles, right? A portion of the page has already been committed (from the earlier Tiles -- servlets that executed). I think that's right. So, just set it up in error-page. David JOHN -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 1:33 PM To: [EMAIL PROTECTED] Subject: RE: [OT] web.xml error-page configuration problem You could point your error-page to a redirected Struts action so that it doesn't show up in a tile. David David: When I add the errorPage directive to my JSP, my error page appeared in the screen b/c I'm using Struts Tiles. The page in which I'm creating a null pointer exception is actually an inner tile on my screen. The functionality that I'm looking for is the ability to forward to separate error screen which doesn't display the stack trace to the user. Thanks, JOHN -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 1:12 PM To: [EMAIL PROTECTED] Subject: Re: [OT] web.xml error-page configuration problem Is this at the top of your jsp? %@ page errorPage=/jsp/error.jsp % David From: Hohlen, John C [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-User (E-mail) [EMAIL PROTECTED] Subject: [OT] web.xml error-page configuration problem Date: Thu, 5 Jun 2003 12:59:26 -0500 I'm using WebLogic 6.1 SP 2 and I can't get the web.xm. error-page configuration to work for exceptions occurring within a JSP. If the exception, occurs in Java code (i.e. non-JSP), the error page works fine. But if it occurs in the JSP, I see a stack trace on the screen instead of forwarding to the error JSP. Here's the setting I have in web.xml file: error-page exception-typejava.lang.Throwable/exception-type location/jsp/error.jsp/location /error-page This should handle every type of exception, right? In my JSP, I'm intentionally creating a null pointer exception. I also tried adding the following to my web.xml file and it still didn't work: error-page exception-typejava.lang.NullPointerException/exception-type location/jsp/error.jsp/location /error-page Any help is greatly appreciated, Thanks, JOHN HOHLEN - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] web.xml error-page configuration problem
I have this in my jsp: %@ page errorPage=/errors/getErrorPage.do?type=jsp % and this in web.xml: error-page exception-typejava.lang.Exception/exception-type location/errors/getErrorPage.do?type=error/location /error-page I'm using Tiles and this setup is working. However, the error page shows up inside the larger page template because of the tiling. It doesn't go to a separate error page. David I don't think using the error-page will work. That was the original crux of this problem. Run-time exceptions occuring within a JSP aren't getting redirected. Now, I'm back to square 1. Let me know if you have any other ideas. Thanks a lot, JOHN -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 2:19 PM To: [EMAIL PROTECTED] Subject: RE: [OT] web.xml error-page configuration problem Actually, that doesn't work. I'm getting an IllegalStateException doing %@ page errorPage=/displaySystemError.do % java.lang.IllegalStateException: Cannot forward a response that is already committed I think this is a direct result of using Tiles, right? A portion of the page has already been committed (from the earlier Tiles -- servlets that executed). I think that's right. So, just set it up in error-page. David JOHN -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 1:33 PM To: [EMAIL PROTECTED] Subject: RE: [OT] web.xml error-page configuration problem You could point your error-page to a redirected Struts action so that it doesn't show up in a tile. David David: When I add the errorPage directive to my JSP, my error page appeared in the screen b/c I'm using Struts Tiles. The page in which I'm creating a null pointer exception is actually an inner tile on my screen. The functionality that I'm looking for is the ability to forward to separate error screen which doesn't display the stack trace to the user. Thanks, JOHN -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 1:12 PM To: [EMAIL PROTECTED] Subject: Re: [OT] web.xml error-page configuration problem Is this at the top of your jsp? %@ page errorPage=/jsp/error.jsp % David From: Hohlen, John C [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-User (E-mail) [EMAIL PROTECTED] Subject: [OT] web.xml error-page configuration problem Date: Thu, 5 Jun 2003 12:59:26 -0500 I'm using WebLogic 6.1 SP 2 and I can't get the web.xm. error-page configuration to work for exceptions occurring within a JSP. If the exception, occurs in Java code (i.e. non-JSP), the error page works fine. But if it occurs in the JSP, I see a stack trace on the screen instead of forwarding to the error JSP. Here's the setting I have in web.xml file: error-page exception-typejava.lang.Throwable/exception-type location/jsp/error.jsp/location /error-page This should handle every type of exception, right? In my JSP, I'm intentionally creating a null pointer exception. I also tried adding the following to my web.xml file and it still didn't work: error-page exception-typejava.lang.NullPointerException/exception-type location/jsp/error.jsp/location /error-page Any help is greatly appreciated, Thanks, JOHN HOHLEN - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Re: Client-side validation is not working - rich
What happens with that setup? Is any javascript output? David I am having problems enabling client side (JavaScript) validation in struts 1.1rc I have added these lines in my jsp: ... %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % ... html:javascript formName=diaryForm / ... html:form action=/diaryEdit focus=remindUserId onsubmit=return validateDiaryForm(this); ... Is there anything else I need to do to get the client-side JavaScript validation to work. Right now only the server-side is working. Thanks, Richard Conover Developer MountainView Software Products and Services Gallagher Bassett Services, Inc. Phone: 801-544-2446 Ext. 320 Fax: 866-741-0545 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles memory leak
Tiles doesn't leak memory, it consumes a lot of memory under certain conditions. There is a bug report on it in bugzilla. It will not be fixed for 1.1. David Has the tiles memory leak issue been properly rectified in the latest struts release? BAL _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles memory leak
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18237 David From: Brian Lee [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Tiles memory leak Date: Fri, 06 Jun 2003 10:26:44 -0400 Do you know what the bug id is? I can't find it in bugzilla (searching for all bugs for the Tiles Controller). Thanks, BAL From: David Graham [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Tiles memory leak Date: Fri, 06 Jun 2003 07:59:34 -0600 Tiles doesn't leak memory, it consumes a lot of memory under certain conditions. There is a bug report on it in bugzilla. It will not be fixed for 1.1. David Has the tiles memory leak issue been properly rectified in the latest struts release? BAL _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Client-side validation is not working - rich
Make sure you're calling the correct generated javascript function and that the function exists in the page. You could post the javascript specific to your form (not the standard js functions that the tag generates). David The JavaScript is output and is visible when I do view source in IE. Is there anything else that you need to know that would help solve this problem? Rich -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 5:57 PM To: [EMAIL PROTECTED] Subject: Re: Client-side validation is not working - rich What happens with that setup? Is any javascript output? David I am having problems enabling client side (JavaScript) validation in struts 1.1rc I have added these lines in my jsp: ... %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % ... html:javascript formName=diaryForm / ... html:form action=/diaryEdit focus=remindUserId onsubmit=return validateDiaryForm(this); ... Is there anything else I need to do to get the client-side JavaScript validation to work. Right now only the server-side is working. Thanks, Richard Conover Developer MountainView Software Products and Services Gallagher Bassett Services, Inc. Phone: 801-544-2446 Ext. 320 Fax: 866-741-0545 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Tiles] Forwarding To JSP Error Page From Within Tiles (Help!)
I'm also interested in any good ideas on this topic. I didn't spend enough time on this to know I had exhausted all possibilities. I just made my error page a very simple An error occurred statement so that it wouldn't look ugly when included as part of many tiles. I figured that exceptions wouldn't happen too often at the JSP layer because it has no logic in it and since I log all these exceptions I can make sure they're fixed and the user will never see my error page anyways. However, it would be nice to get a better solution. David This is a continuation of a post I submitted yesterday as an off topic subject entiled: [OT] web.xml error-page configuration problem (Special thanks to David Graham for his many replies): Currently, this isn't showing up in the archives so I couldn't provide a link. However, I feel this is no longer an off topic, but rather a Tiles/JSP topic. The issue I'm facing is how to forward to an error page (JSP) when a runtime exception (e.g. NullPointerException) occurs within my JSP Tile. Currently, I've added the following directive to each of my JSPs: %@ page errorPage=/jsp/error.jsp % I'd prefer to only specify this information in one place, but I can't figure out how to do that either. The error-page setting in the web.xml doesn't appear to work for JSPs, just regular Java code inside the web container. Now, when an exception occurs in a Tile JSP, my error screen is displayed, but it's inserted into the page with all the other Tiles displayed as well. This can look really ugly depending on which Tile the exception occurs in. What I would I would prefer to do is automatically forward to a brand new screen. David Graham gave me the idea of redirecting to a Struts action: %@ page errorPage=/displaySystemError.do % But this causes the following exception: java.lang.IllegalStateException: Cannot forward a response that is already committed I think that makes since b/c of the other Tiles (JSP Servlets) that have already been processed and committed HTML to the output writer. So I'm stumped at this point. Please reply if anyone has any bright ideas. Thanks, JOHN - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Exception handling question
How do you get access to the exception that was thrown when your action is called by the container (i.e. from the error-page directive in web.xml)? for example: a custom tag throws an exception, it is caught by the container and the container forwards to my action. so where is the exception object stored now so that my action can log it? For sure I can log that there *was* an exception, but how do I know what it was? After looking back at my app...I'm actually not logging exceptions thrown in JSPs. I use Tiles controllers to load all of my JSP data and I catch and log any exceptions thrown by my controllers. The JSPs only display data so there is little chance of them throwing an exception (unless I've coded the page wrong but I find those errors during development). The Servlet 2.3 spec (section 9.9) doesn't say that the exception is accessible to the error page, neither does Sun's servlet tutorial: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Servlets4.html#64301 There is a standard request attribute name that the exception is stored under. I can't recall the exact name but it's defined in the Servlet spec. I'm assuming that if you map an Action to an error-page definition in web.xml it will have access to that request attribute but I have never tried it. David And if it *is* available somehow to the action specified in the error-page directive in the web.xml, then what would be the reason to use an ExceptionHandler in struts as well, even if it shares the same error-handling code? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts validator
Beats me, dude. I struggled with it for 3 days and said enough is enough, and wrote my own validations in my Action classes. If you look through the mail archive, you'll see right off that this is what happens to the majority of people trying to get Validator to work. That's one reason I decided to volunteer over on commons-validator. I've made a major effort to cleanup the validator code so that we can fix bugs faster and make it easier to use. I'm definitely interested in fixing problems you have using it but with a description like, it works sometimes but not others is not very helpful. David Good luck, Mark -Original Message- From: Frances Aleah Z. de Guzman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 8:55 PM To: Struts Users Mailing List; Mark Galbreath Subject: Re: struts validator how can i fix it? On Friday 30 May 2003 08:20 pm, Mark Galbreath wrote: That's because the Validator works by magic and you obviously have a hex in your machine. (sometimes I kill myself) Mark -Original Message- From: Frances Aleah Z. de Guzman [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 2:49 AM To: [EMAIL PROTECTED] Subject: struts validator struts validator (client side validation) example is not working in my pc, even the struts example. but it is working with the other pcs in our office. i noticed that when i view the page source there is no javascript generated unlike in the other pc. is there still i have to configure or what? im using struts rc1.1 and j2sdk 1.4.1_02 and tomcat 4.1.24 as the web server and sometimes JBOSS 3.0.6 -- Frances Aleah Z. De Guzman SA/Programmer Ingenium Technology, Inc. http://www.ingenium.com.ph Disclaimer : This message is intended only for the named recipient. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts (and JSTL) expression language questions
It is a hard (nearly impossible) task to convince some management teams that in order to use this new (and I think better) technology, we will have to adopt an entirely new paradigm where taglibs perform operations and EL accesses data. I wouldn't say it's a new paradigm. It's faster, easier, and cheaper to use the JSTL than scriptlets and that will definitely motivate mgmt. to support the change :-). David _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using struts tag libraries outside of struts
You should be using the JSTL for many of your custom tags anyways. I think the Struts html taglib is only useful with Struts but I've never tried using it outside of Struts. David Hello. I have to evaluate what we're going to use, Struts, OpenCMS, some other system... I don't have much experience with JSP etc yet. The Struts tag libraries look cool. Is it possible to use them outside of Struts, say by dropping them into a OpenCMS project? Or do they depend on having the Struts framework present? Thanks for your time. Remco Gerlich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] data layer, try-catch-finally, connections
Setting the conn, rs, and s pointers to null in this method is pointless and confuses Java newbies. David public static void closeconn (java.sql.Connection conn, java.sql.Statement s, java.sql.ResultSet rs) throws java.sql.SQLException { try { if (rs != null) { rs.close(); rs = null; } if (s != null) { s.close(); s = null; } if (conn != null) { conn.close(); conn = null; } } catch (java.sql.SQLException e) { closeconn(conn, s, rs, e); } } and if THAT one throws an exception, it calls this: public static void closeconn (java.sql.Connection conn, java.sql.Statement s, java.sql.ResultSet rs, java.sql.SQLException e) throws java.sql.SQLException { if (rs != null) { try { rs.close(); rs = null; } catch (java.sql.SQLException rse) { e.setNextException (rse); rs = null; } } if (s != null) { try { s.close(); s = null; } catch (java.sql.SQLException se) { e.setNextException (se); s = null; } } if (conn != null) { try { conn.close(); conn = null; } catch (java.sql.SQLException ce) { e.setNextException (ce); conn = null; } } throw new java.sql.SQLException (e.getMessage(), e.getSQLState(), e.getErrorCode()); } Crazy, perhaps, but it works quite well. - Original Message - From: Mike Whittaker [EMAIL PROTECTED] To: Struts List [EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 10:14 AM Subject: [OT] data layer, try-catch-finally, connections I guess you've all been here, so can you answer this? you have do a 'finally' to ensure you close the connection/release it back to the pool. In the controller tier this is easy, get the connection in the Filter/RequestProcessor/Action when whatever returns you can finally close it. However this ties it to the controller layer. I want my connections instigated from the business layer. But because so many processes require a connection I will have identical try,catch,finally block all over the place. Any one got a solution to this? Thankyou -- Mike W - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] data layer, try-catch-finally, connections
Everything is pass by value, even pointers :-). David OK, so Java isn't my first language, busted... - Original Message - From: David Graham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 10:25 AM Subject: Re: [OT] data layer, try-catch-finally, connections Setting the conn, rs, and s pointers to null in this method is pointless and confuses Java newbies. David public static void closeconn (java.sql.Connection conn, java.sql.Statement s, java.sql.ResultSet rs) throws java.sql.SQLException { try { if (rs != null) { rs.close(); rs = null; } if (s != null) { s.close(); s = null; } if (conn != null) { conn.close(); conn = null; } } catch (java.sql.SQLException e) { closeconn(conn, s, rs, e); } } and if THAT one throws an exception, it calls this: public static void closeconn (java.sql.Connection conn, java.sql.Statement s, java.sql.ResultSet rs, java.sql.SQLException e) throws java.sql.SQLException { if (rs != null) { try { rs.close(); rs = null; } catch (java.sql.SQLException rse) { e.setNextException (rse); rs = null; } } if (s != null) { try { s.close(); s = null; } catch (java.sql.SQLException se) { e.setNextException (se); s = null; } } if (conn != null) { try { conn.close(); conn = null; } catch (java.sql.SQLException ce) { e.setNextException (ce); conn = null; } } throw new java.sql.SQLException (e.getMessage(), e.getSQLState(), e.getErrorCode()); } Crazy, perhaps, but it works quite well. - Original Message - From: Mike Whittaker [EMAIL PROTECTED] To: Struts List [EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 10:14 AM Subject: [OT] data layer, try-catch-finally, connections I guess you've all been here, so can you answer this? you have do a 'finally' to ensure you close the connection/release it back to the pool. In the controller tier this is easy, get the connection in the Filter/RequestProcessor/Action when whatever returns you can finally close it. However this ties it to the controller layer. I want my connections instigated from the business layer. But because so many processes require a connection I will have identical try,catch,finally block all over the place. Any one got a solution to this? Thankyou -- Mike W - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validator with password fields
Javascript for password fields is intentionally limited for security reasons. The only javascript validation that runs on password fields is the required check. What version are you using? David Hi all, when trying to make a password field required using the validator, the javascript doesn't seem to work. The server side validation does work. Strangely, the javascript validation works in the same form for text fields. Anyone ever encountered this before? Am I just doing something wrong? brian _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Possible Bug in FieldChecks.validateRequiredIf(...)
Thanks for catching this! Please file a bug report so we don't forget to fix it. Thanks, David I have a validation that should be failing (under certain conditions), but is not. I've double checked and triple checked to make sure the setup is correct, and it's still not working correctly. So, I took a look at the code for validateRequiredIf in the org.apache.struts.validator.FieldChecks class. At the end of the method I found this segment of code: if (required) { if ((value != null) (value.length() 0)) { return true; } else { errors.add(field.getKey(), Resources.getActionError(request, va, field)); return false; } } Am I correct in assuming that the following condition ((value != null) (value.length() 0)) should be (!GenericValidator.isBlankOrNull(value)). The reason my check is failing is due to the fact the value I'm checking is all white space (at certain times), and is selected from a select box. Brad Handy - Bradley M. Handy| Office: 517 750 6675 Programmer/Analyst | Email: [EMAIL PROTECTED] Spring Arbor University | - Sun Certified Programmer for the Java 2 Platform - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Exception handling question
Ideally I would like to log all exceptions that occur, and I can create an ExceptionHandler to do this, but it will only catch exceptions that get thrown from within one of my Actions, anything thrown from JSP pages or custom tags won't get caught. (right?) How do most people deal with this? I can set an error-page in the web.xml file that will catch the rest, but then I can't log the exceptions. (or can I?) 1. Factor exception logging code into its own class. 2. Point web.xml error pages to a struts action that invokes that class. 3. Make your ExceptionHandler subclass delegate handling to class defined in step 1. The beauty of OO composition :-). David thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 1.1
Meanwhile, most of the Struts committers are using the Release Candidate in production. We do trust it in our own companies. I am using Struts 1.1 RC1 in production with no problems. The 1.1 release problems are well known and this discussion has been rehashed over and over again. We can only do better in future releases. David -Ted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Collection Implementation
Vector was a poorly designed class that has been replaced by ArrayList. New code should not use Vector. If you need a synchronized list do this instead: List myList = Collections.synchronizedList(new ArrayList()); David Without checking the archives for specific references, I'm still sure I've read on multiple occasions, Don't use Vectors, use ArrayLists. I was under the impression that this was because Vectors are not synchronized. After refactoring, today, I read here that ArrayLists are not synchronized: http://java.sun.com/j2se/1.4.1/docs/api/java/util/ArrayList.html Time to refactor again? I need to be using one of the static Collections.synchronized* methods, right? Beyond using Objects that are synchronized, what difference does it make which implementation of Collection I choose? m __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Collection Implementation
Gee, isn't thread safty an issue with Struts? I thought I should use synchronized Objects in my Actions. Yes, Struts Actions should be thread safe. The approach I suggested is the best practice for creating synchronized Lists. David --- David Graham [EMAIL PROTECTED] wrote: Vector was a poorly designed class that has been replaced by ArrayList. New code should not use Vector. If you need a synchronized list do this instead: List myList = Collections.synchronizedList(new ArrayList()); David Without checking the archives for specific references, I'm still sure I've read on multiple occasions, Don't use Vectors, use ArrayLists. I was under the impression that this was because Vectors are not synchronized. After refactoring, today, I read here that ArrayLists are not synchronized: http://java.sun.com/j2se/1.4.1/docs/api/java/util/ArrayList.html Time to refactor again? I need to be using one of the static Collections.synchronized* methods, right? Beyond using Objects that are synchronized, what difference does it make which implementation of Collection I choose? m __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ValidatorUtil deprecated?
commons-validator has undergone a fairly major overhaul. Struts does not use the new methods because it's based on commons-validator 1.0.2. However, the nightlies are built with nightlies from commons so you're getting the deprecation warnings. David I just downloaded and installed Struts from last night (6/02/2003). Now I'm getting deprecation errors for ValidationUtil, yet the API docs say nothing about what it's been replaced with (http://tinyurl.com/dac9). Any ideas? Also, ValidatorResources has a couple deprecated methods too. ValidatorResources.get(java.util.Locale,java.lang.Object) .getFieldMap() Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat config?
Make sure struts.jar isn't in any of Tomcat's common directories. It should only be in your app's /WEB-INF/lib directory. David From: Frances Aleah Z. de Guzman [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: tomcat config? Date: Tue, 3 Jun 2003 11:10:52 +0800 my problem is killing me already, this is my second post so pls can anyone help me out herebefore im using jboss3.0.6-tomcat4.1.18 and my application is working fine, when i switched to tomcat4.1.18 i got this exception cannot find message resources under key org.apache.struts.action.MESSAGE. it seems that my tomcat is not seeing my classpath. the configurations of my web.xml and struts-config are ok! what could be the problem? how is it its working with jboss? -- Frances Aleah Z. De Guzman SA/Programmer Ingenium Technology, Inc. http://www.ingenium.com.ph Disclaimer : This message is intended only for the named recipient. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts tags vs jstl
I only use the struts html taglib and the JSTL for everything else. The struts-el taglib in the /contrib folder implements the Struts custom tags with EL support so you can use the same language you use in the JSTL. David From: Nathan Coast [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: struts tags vs jstl Date: Tue, 03 Jun 2003 11:36:49 +0800 Hi, I've used struts for a while now and figured I should probably look at the jstl. Theres certainly plenty of common ground to do with programatic control (decisions and looping) and with internationalisation. I'm not sure sql tags in jsp are particularly bright idea but anyway Does anyone have any thoughts on which bits are best to use from each of the taglibs? Also, is there any plan to make the struts tags support the definition of the corresponding jstl tags? The idea being that you'd only have to learn one syntax to use both taglibs, whilst using the struts tags would give you all the additional funcionality that comes with struts. cheers Nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts tags vs jstl
I'm pretty sure that the latest release of Struts includes a subset of Struts tags that have been configured to support the EL Expression language. So would that be the ELEL ;-) ? I once saw a sign advertising a seminar on the FTP Protocol. Acronyms have officially lost all meaning. David This is the expression language that is built into JSTL. I think that only the Struts tags that don't have equivalents in the JSTL have been ported. - Original Message - From: Nathan Coast [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 02, 2003 9:36 PM Subject: struts tags vs jstl Hi, I've used struts for a while now and figured I should probably look at the jstl. Theres certainly plenty of common ground to do with programatic control (decisions and looping) and with internationalisation. I'm not sure sql tags in jsp are particularly bright idea but anyway Does anyone have any thoughts on which bits are best to use from each of the taglibs? Also, is there any plan to make the struts tags support the definition of the corresponding jstl tags? The idea being that you'd only have to learn one syntax to use both taglibs, whilst using the struts tags would give you all the additional funcionality that comes with struts. cheers Nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts IRC online
For the record, I, and every other committer that I've spoken to about this agree that we will never discuss struts-related decisions unless done so on the struts-users or struts-dev lists. I have my reasons and I'm sure others have theirs. It's cool that IRC is setup for those that want to use it but I just don't have the time. I monitor the struts-user and struts-dev lists exclusively. David P Dunham writes: No it doesn't that only happens with certain large servers -Philip -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 12:32 PM To: 'Struts Users Mailing List' Subject: RE: Struts IRC online IRC servers talk to each other and propagate there channels to each other. It doesn't matter what server as long as the channel has been opened for the required time to propagate. Mark -Original Message- From: Chris Halverson [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 1:30 PM To: Struts Users Mailing List Subject: Re: Struts IRC online Mark Galbreath [EMAIL PROTECTED] writes: Just kidding - any IRC server should pick up a new channel within 45 minutes, but I logon to irc.darkmyst.org 6667 Well, any server on the same network, yes. Perhaps that's what he mean (ie. EFnet, DALNet, Openprojects.net, etc.). Therefore, I think the question still stands, but restated as which IRC network? cdh -- Chris D. Halverson http://www.halverson.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- James Mitchell Software Developer/Struts Evangelist http://www.struts-atlanta.org -- James Mitchell Software Developer/Struts Evangelist http://www.struts-atlanta.org -- James Mitchell Software Developer/Struts Evangelist http://www.struts-atlanta.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 1.1
Struts RC 2 should be coming out this week. After that, people will have a chance to test their apps with it and we'll incorporate any show stopping bug fixes. Struts 1.1 final is not far off after that :-). David I'm not going to ask when Struts 1.1 will be released because I know the stock answer. I'm going to ask what we need to do to get it released as soon as possible? Our company has a policy of not using software that hasn't had a final release, therefore we've been stuck with Struts 1.0. We can't switch to 1.1 in development, because we don't know how many months (or years) it will be before it's done. We can't hold up our production dates because of Struts 1.1. So, my question is, what exactly are we waiting for for the Struts 1.1 release? What can we do to get it there as soon as possible? We'd be willing to put some time into it to get it released. Using it in our production applications is out of the question though. I know this is a little harsh, but I have lost count of how long we've been waiting. At least 7 Struts books have been released since Struts 1.1 beta was released. (it's funny that all of them say that 1.1 will be out once the book is in print. :) Other web frameworks have gone from nothing to having released software during the beta of 1.1. I want quality software as much as the next guy, but was Struts 1.0 so poorly designed that it takes so long to come out with the next MINOR version? OK, flame away, but I hope we can get someone tell us exactly what we need to do to stop the hold up and get 1.1 released. Please let us know. Thanks Jay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Basic CRUD
The html taglib would not evaluate a bean:write tag within the onclick event. That's why I had to add the bean:define and a setKey() javascript function. Do you mean something like this didn't work: html:form onclick=bean:write.../... ? That's invalid JSP syntax and is not a defect in the html taglib or any other JSP taglib, the page compiler just won't compile it. You may have meant something else though... David If anyone is interested in more details, send me an email, or answer to this post and I'll post the details. Thanks. -Eric --- In [EMAIL PROTECTED], Eric Miles [EMAIL PROTECTED] wrote: Chicks that don't lay eggs are still good for cooking, eh? ;-) Jing, Your source code is Open Source licensing, right? Not going to sue me when I resell or make $$$ off your code?!? Although, Carrier looks like a nice product, my hope was to do the grunt work myself, to get a feel for persisting objects through struts and to do it via several methods. Once I can get the correct object from the view to the action, everything should work nice. On the backend, I'm persisting objects by using a stateless session EJB talking to Hibernate. Plus, using XDoclet is the best thing since Ant. I'll post back when I get this thing hammered out. Thanks for the feedback. -Eric --- In [EMAIL PROTECTED], Andrew Hill [EMAIL PROTECTED] wrote: Yeh, alright. Fair enough. So your license does allow him to extract that particular code out of the Carrier source , and use it in his own product without having to join the Carrier group etc... if he wants to distribute whatever it is he is writing? -Original Message- From: Jing Zhou [mailto:[EMAIL PROTECTED] Sent: Thursday, 29 May 2003 13:36 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Basic CRUD - Original Message - From: Andrew Hill [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 9:57 PM Subject: RE: Basic CRUD Mate, that answer is about as useful as a chook that doesnt lay eggs. If you go answering peoples _struts_ questions on the _struts list_ by carping on about how great some product of yours is then you will make yourself unpopular very quickly. Have you ever thought someone might be interested in a *general* purpose CRUD algorithm? We got such an algorithm with its core codes open for every one. -Original Message- From: Jing Zhou [mailto:[EMAIL PROTECTED] Sent: Thursday, 29 May 2003 12:43 To: Struts Users Mailing List Subject: Re: Basic CRUD -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, 28 May 2003 3:02 p.m. To: [EMAIL PROTECTED] Subject: Basic CRUD I am putting together a simple web app that performs CRUD operations on a database table. The web app consists of 1 jsp page which handles all CRUD actions. The first part of the page contains a form with 2 fields and 'create' and 'retrieve' buttons. Both these functions work fine. When a 'retrieve' (select id,field1,field2 from table1) is done, a table is rendered with the resultset on the same page. For each record of the recordset, there exists an 'update' and 'delete' button. The problem is how do I tell my action class which record to act on? The difficulty of this kind of problems is that there is no *standard* way to handle CRUD operations in general. However, the just unveiled Carrier allows you to visually compose hyper action wizards. In particular, the demo for the Ant Project Configuration has a lot of CRUD operations. If I understand your business problem, here is a very similar situation: an Ant project may contain several targets, so there are CRUD operations on the targets. For each target, there are several tasks. So we have CRUD operations on the tasks. For each task, there might be several nested attributes, so more CRUD operations. Some we do it on the same page, some we do it on different page in the demo. There are total of 39 pages just for this demo with nested level up to 5. This demo is done exclusively within Struts. No javascript! Even there is no custom code for this demo. You compose the Ant Project Configuration as hyper action wizards completely within Carrier rich client. And any submited forms will be automatically persisted and restored for you as necessary. The algorithms that makes this happen is called Wheels. When you download Carrier at www.netspread.com, the source codes for the Wheels will be available for you. Jing -- -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- -
Re: 281177: Struts 1.1
1) Is it mandatory to restart the application if I hav changed one action class or form ? With Tomcat I've found that most code changes require an app reload but some do not. I believe it has something to do with adding methods vs. changing the internals of a method but I could certainly be wrong. David _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Justifying Struts
1) I think the separation of presentation (view) from the model and controller has gone too far (or probably is not done well in Struts). For example, I like to have my front end developers do form (field) validation. These developers should not have to write beans to do this (all examples I've seen so far do form validation in Java beans). This somewhat contradicts the J2EE development model where application developers, who are basically scripters (not OO developers), do the front end work. It has not gone too far. If you don't like MVC, you've chosen the wrong tool. You don't need Struts or Java, just use some scripting language like PHP. Form validation is done via an xml config. file and many times there is no code required. This is known as the Validator and is based on the Jakarta commons-validator. You need to subclass ValidatorForm or use DynaValidatorForm. 2) There is just too much junk to write to do a simple form. The samples I've seen have involve too many files to do a simple form. Plus, why should I have to write a new bean for each form. Why can't the bean either be generated automatically or there be a general purpose bean (with properties that are created dynamically) that works for all forms? You can do this with DynaForms. You configure each been in struts-config.xml and Struts handles it as if you coded a Java class. This approach leads to 1 config file for beans and the rest of the app (struts-config.xml), 1 config file for validation (validation.xml), and 1 Action class to handle the submitted form. 3) We already separate business logic nicely, usually by encapsulating the logic in beans or EJBs. By the time the application developers get to work writing JSP/HTML, they are not writing any business logic. So why add the overhead of Struts (or any other framework)? JSPs should not talk to EJBs directly, that is a known best practice. Struts is a web tier controller framework for turning web requests into business layer calls. 4) Because we separate out business logic into beans and EJBs, Java is simply used as a scripting langauge in our JSPs - in just the same way that VBScript is used in Active Server Pages. We try not to confuse the object oriented language called Java, with the scripting language called Java that we use in JSPs. We use a very small subset of Java in JSPs. There is no Java scripting language, there is only Java the OO language. Using scriptlets in JSPs is now considered an obsolete technique for many reasons you can find on the net. 5) Based on #4, I don't particularly care for taglibs either. Again, we are simply using Java to do simple scripting. Loops are probably the most complex thing we do. So why add the extra overhead of taglibs. A loop is a loop whether it has the syntax of Java or a taglib. Plus, if I want my front-end developers to get any experience with serious development, I'd rather have them dealing with Java as opposed to taglibs, which have no value in the real world of programming. I'm not sure what you mean by this; Java webapps are real world programming. The JSTL provides a common set of reusable taglibs that all Java web programmers are expected to know. 6) Performance is unknown. I've looked through the mail archives and have seen requests for performance figures, but no answers (plenty of folks pushing Struts though). Performance is known to be quite good but no one has taken the time to get actual numbers. Feel free to do this analysis and let us know the results. The only reason people push Struts is because they've found it useful and are excited about using it. Struts will most definitely not be the weakest link in your webapps performance. Database access and network speeds are usually the 2 slowest components. It sounds like you have the wrong expectations for Struts/Java web programming. This is not designed as a scripting environment. MVC webapps are designed to solve the numerous maintenance and productivity problems associated with scripted apps in PHP, ASP, Perl, etc. David Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action Chaining - how to avoid?
There are, however, situations where the second screen really has nothing to do with the first. For example, an Order screen and an OrderItem screen. When navigating from Order to OrderItem, I should not go directly to OrderItem.jsp for two reasons. The OrderItemForm is unrelated to the OrderForm and should not be part of the OrderForm object. Given this, it *could* still be ok to go to OrderItem.jsp when it uses it's own Form object, but not if you need to pass through OrderItemAction to verify the user is logged in. The other options are action chaining from the OrderAction to the OrderItem mapping, or linking from the Order.jsp to the OrderItem mapping, both of which are considered bad. What else is there? Why is an order unrelated to its items? I would have one class called OrderForm that contained a List or array of all the items being ordered. One ActionForm object does not necessarily map to one HTML form. You can split up the view however you like but store all the data in one form object. David m --- David Graham [EMAIL PROTECTED] wrote: So if I understand what you're suggesting, I put multiple html forms into editPage.jsp, one of which maps to ConfirmEditAction. Not bad, although, what I have in this form now is a drop down for the user to specify what they intend to do. Sorry, I think the steps would actually be like this: GetEditPageAction -- editPage.jsp -- GetConfirmPageAction -- confirm.jsp -- SaveFormAction -- index.jsp Just use different submit buttons for different actions like Update and Delete. Your SaveFormAction will perform different operations based on which button they pressed. Also, if I want to use this single, generic, confirmation page in multiple places, which I do, I'll have to use scriptlet rather than the html:form tag to render the correct action attribute to take them back to the edit they came from, right? Then you will also need a generic SaveFormAction to save the data from your generic confirm page. You might look at using DispatchAction to use one action to route to different pages based on a request parameter. David m --- David Graham [EMAIL PROTECTED] wrote: If my need, for example, is to go from an Edit X screen, to a Confirm X deletion screen, how is this related to business logic, and how would I refactor? GetEditPageAction -- editPage.jsp -- ConfirmEditAction -- index.jsp David _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: A question long not raised....
There's a vote underway now on struts-dev for releasing 1.1 RC2. So far there are 3 binding +1 votes (including mine :-). David Hi All Just want to raise a question that does not seem to have been asked for a while When should we be expecting official release Struts 1.1? Hope we don't get the same automated response. Fred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action Chaining - how to avoid?
You have to take that relationship on faith. Perhaps it's not the best example, but suffice it to say that I have many-to-many types of relationships in my data, and that the Forms are best segregated for re-use. It is highly inefficient for me to make a separate form for each combination of data relationship. Futhermore, there are many levels involved here. Distributions have Shipments, Shipments have Orders, Orders Have Items, Items have Tasks, Tasks have TaskDetails. Are you really suggesting I put all this in one Form? If I make a screen to query for TaskDetails which then uses the same jsp to display the results as the one that is linked to by the Task screen, then I must use this giant Form with mostly inconsequential fields, and add my TaskDetail query screen specifics to it, too. If you have a generic query result page then you need to supply it with a generic result bean to display the data. Your TaskDetailQueryForm object is handled by your TaskDetailQueyAction which then puts your generic result bean in the request and forwards to the result page. I don't see why you would need action chaining here. David Where does it end? My other options are to make a new jsp, or make a jsp with some really nasty scriptlet in it to handle different forms. Right? --- David Graham [EMAIL PROTECTED] wrote: There are, however, situations where the second screen really has nothing to do with the first. For example, an Order screen and an OrderItem screen. When navigating from Order to OrderItem, I should not go directly to OrderItem.jsp for two reasons. The OrderItemForm is unrelated to the OrderForm and should not be part of the OrderForm object. Given this, it *could* still be ok to go to OrderItem.jsp when it uses it's own Form object, but not if you need to pass through OrderItemAction to verify the user is logged in. The other options are action chaining from the OrderAction to the OrderItem mapping, or linking from the Order.jsp to the OrderItem mapping, both of which are considered bad. What else is there? Why is an order unrelated to its items? I would have one class called OrderForm that contained a List or array of all the items being ordered. One ActionForm object does not necessarily map to one HTML form. You can split up the view however you like but store all the data in one form object. David m --- David Graham [EMAIL PROTECTED] wrote: So if I understand what you're suggesting, I put multiple html forms into editPage.jsp, one of which maps to ConfirmEditAction. Not bad, although, what I have in this form now is a drop down for the user to specify what they intend to do. Sorry, I think the steps would actually be like this: GetEditPageAction -- editPage.jsp -- GetConfirmPageAction -- confirm.jsp -- SaveFormAction -- index.jsp Just use different submit buttons for different actions like Update and Delete. Your SaveFormAction will perform different operations based on which button they pressed. Also, if I want to use this single, generic, confirmation page in multiple places, which I do, I'll have to use scriptlet rather than the html:form tag to render the correct action attribute to take them back to the edit they came from, right? Then you will also need a generic SaveFormAction to save the data from your generic confirm page. You might look at using DispatchAction to use one action to route to different pages based on a request parameter. David m --- David Graham [EMAIL PROTECTED] wrote: If my need, for example, is to go from an Edit X screen, to a Confirm X deletion screen, how is this related to business logic, and how would I refactor? GetEditPageAction -- editPage.jsp -- ConfirmEditAction -- index.jsp David _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL
Re: Form validation over multiple pages
With a little further investigation I see that the page value does not get set in the validationForm using html:hidden approach as outlined below. Ie, this doen't work: html:hidden name=validateForm property=page value=1 / When I print out the value of the page field in the action, it is still set to zero. How do you set the page property? Also, this seems to imply the validator is VERY shaky over multiple pages. For example, the properties on my second page are marked as required, and they don't get validated in the first action (this seems to show that the page based validation is working), yet on the second page, the associated action tries to validate the page 1 properties!!! I believe the server side validation validates any page = the current page and the client side javascript just validates the current page. David Arrrg!! What's going on! Has anyone got this to work? Brian - Original Message - From: Brian McSweeney [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, May 29, 2003 2:42 PM Subject: Form validation over multiple pages Hi all, I'm almost there with using the validator over several pages with a single form. However I'm getting a strange little error. The first page is validating fine, and it doesn't seem to try to validate the info required on the second page - correct. However once I try to validate the second page, the javascript validates correctly, but the server side validation returns an error saying the first page's required field needs validating. I think it might be because I'm not sure how to pass the page parameter to the action. I've tried using a html:hidden tag. Anyway, snippets from the jsps, struts config and validation.xml file are included below. If someone could help me out I'd be very grateful. Thanks very much, Brian. My first jsp named validatestep1.jsp looks like: html:javascript formName=validateForm page=1/ html:form action=/secure/validateStep1.jspa onsubmit=return validateValidateForm(this); method=post html:hidden name=validateForm property=page value=1 / table trtdusername/td tdhtml:text name=validateForm property=userName //td /tr tr td colspan=2 align=center html:image border=0 page=/images/button_submit.gif/ /td /tr /table /html:form My second jsp named validatestep2.jsp looks like html:javascript formName=validateForm page=2/ html:form action=/secure/validateStep2.jspa onsubmit=return validateValidateForm(this); method=post html:hidden name=validateForm property=page value=2 / table tr tdcredit card with no spaces or dashes/td tdhtml:text name=validateForm property=creditCard //td /tr tr td colspan=2 align=center html:image border=0 page=/images/button_submit.gif/ /td /tr /table /html:form in my struts config I have action path=/secure/validateStep1 type=ValidateStep1Action name=validateForm scope=session input=/validatestep1.jsp unknown=false validate=true forward name=success path=/validatestep2.jsp redirect=false / and then action path=/secure/validateStep2 type=ValidateStep2Action name=validateForm scope=session input=/validatestep2.jsp unknown=false validate=true forward name=success path=/validated.jsp redirect=false / In my validation.xml file I have form name=validateForm field property=userName depends=required,minlength page=1 field property=creditCard depends=required,creditCard page=2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URGENT: javax.servlet.ServletException: BeanUtils.populate
FYI, marking posts as URGENT is generally considered rude as it implies your question is more important than everyone elses. The error message indicates a problem populating your form bean from the request parameters. Are having the problem when submitting the form or displaying it? Is your form control named correctly? David I have an error that I have been working on for 3 solid days. i have searched the archives, but can't find my issue resolved anywhere. I have an array of objects (ContactDto[]) that I need to display. I actually have the full list I send in (userContacts), and the list of objects selected in the alertForm (alertContacts). I can display the form for an initial addAlert() just fine. I have not gotten any further. I do not seem t even get to my add() method ever. And even if I turn the log level to debug, I do not seem to get any more information on the stacktrace. Please help me on this as I am very frustrated and confused. StackTrace for alertForm Load, and then submission: == 10:59:25,965 INFO [AlertActions] userContacts[] length: 3 10:59:25,975 INFO [AlertActions] == 10:59:25,975 INFO [AlertActions] Must be a new alert then 10:59:25,985 INFO [AlertActions] == 10:59:25,985 INFO [AlertActions] alertDto: {alertId= userId=1 subject= startDate=null reoccurring= gracePeriodDays= gracePeriodHours= endingDate=Thu May 29 10:59:24 CEST 2003 startingLocation=null endingLocation=null status= safeConfirm= details= noteToContactees=} 10:59:25,995 INFO [AlertActions] == 10:59:45,944 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true 10:59:45,944 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true 10:59:45,954 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true 10:59:45,954 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true 10:59:45,984 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true 11:00:55,504 INFO [SecurityContextFilter] processing request /alert.do 11:00:55,544 ERROR [SecurityContextFilter] Exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1098) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:816) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420) at com.baselogic.yoursos.struts.ExtendedActionServlet.process(ExtendedActionServlet.java:53) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342) at com.baselogic.yoursos.security.SecurityContextFilter.doFilter(SecurityContextFilter.java:102) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334) at com.baselogic.yoursos.user.UserPreferenceFilter.doFilter(UserPreferenceFilter.java:46) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507) at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) at org.mortbay.http.HttpServer.service(HttpServer.java:863) at org.jboss.jetty.Jetty.service(Jetty.java:460) at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455) alertActions.java::add(...): (LookupDispatchAction) = public ActionForward add(
Re: Action Chaining - how to avoid?
My jsps currently assume use of the form specified in the mapping from html:form action=mapping. I suppose it's not a problem to always include the name property in my tags, and assign that the generic form bean name. It's a little bothersome though that the action writer needs to know what kind of object to create where for each local forward, and that pulling the data from the model is now duplicated in this action and in the generic form. My current design forwards with the UID of the data as a request parameter, the form is created for me, I populate it from the model in the reset method, then the other request paramters are populated for me, just like when the generic form is submitted. Seems a lot more straightforward, and I can still use a local forward to keep the navigation contained in the struts-config, and avoid form population anomalies, if I do this: forward = new ActionForward((mapping.findForward(forward)).getName()+?UID=+UID,true); What does the forward forward map to? If it's another Action then that's considered action chaining, if it's a jsp then it's fine. Chaining actions isn't a good idea but if it works for you in this case, use it. David _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Logging per class or system?
I have seen in the archives, details about how to specify debug for, say Digester, but info for xerces. I have only seen examples of lines to add, but not sure where to add them, or examples of them. Does anyone have an example of commons logging that will set different levels for different classes/systems? commons-logging doesn't provide this configuration. You need to consult the docs for the underlying logging package you're using. David Thanks... Mick Knutson _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javax.servlet.ServletException: BeanUtils.populate
I couldn't find any HTML field called alertContacts in your JSP. If you want alertContacts to hold the selected values, you need to have a form control called alertContacts. I normally populate the list from a collection I store in the session or request and use a form bean property to save what the user submitted. David Sorry, but this is urgent to me, and am very sorry to imply anything toward, or against anyone else. I am having this error when I submit the form. I can display the form seemingly fine. I have about 19 forms that are fairly similiar currently, and they all submit just fine. I have gone through this with a fine tooth comb, but am not seeing any differences in the Husted.com examples for LookupDispatchAction. I also see other people that have the error, but seem to have much more stack trace, and I have no idea what the cause would/should actually be. So, I have started to remove items from the form, like the multi-select, but that did not seem to help. From: David Graham [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: URGENT: javax.servlet.ServletException: BeanUtils.populate Date: Thu, 29 May 2003 12:34:23 -0600 FYI, marking posts as URGENT is generally considered rude as it implies your question is more important than everyone elses. The error message indicates a problem populating your form bean from the request parameters. Are having the problem when submitting the form or displaying it? Is your form control named correctly? David I have an error that I have been working on for 3 solid days. i have searched the archives, but can't find my issue resolved anywhere. I have an array of objects (ContactDto[]) that I need to display. I actually have the full list I send in (userContacts), and the list of objects selected in the alertForm (alertContacts). I can display the form for an initial addAlert() just fine. I have not gotten any further. I do not seem t even get to my add() method ever. And even if I turn the log level to debug, I do not seem to get any more information on the stacktrace. Please help me on this as I am very frustrated and confused. StackTrace for alertForm Load, and then submission: == 10:59:25,965 INFO [AlertActions] userContacts[] length: 3 10:59:25,975 INFO [AlertActions] == 10:59:25,975 INFO [AlertActions] Must be a new alert then 10:59:25,985 INFO [AlertActions] == 10:59:25,985 INFO [AlertActions] alertDto: {alertId= userId=1 subject= startDate=null reoccurring= gracePeriodDays= gracePeriodHours= endingDate=Thu May 29 10:59:24 CEST 2003 startingLocation=null endingLocation=null status= safeConfirm= details= noteToContactees=} 10:59:25,995 INFO [AlertActions] == 10:59:45,944 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true 10:59:45,944 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true 10:59:45,954 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true 10:59:45,954 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true 10:59:45,984 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true 11:00:55,504 INFO [SecurityContextFilter] processing request /alert.do 11:00:55,544 ERROR [SecurityContextFilter] Exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1098) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:816) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420) at com.baselogic.yoursos.struts.ExtendedActionServlet.process(ExtendedActionServlet.java:53) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342) at com.baselogic.yoursos.security.SecurityContextFilter.doFilter(SecurityContextFilter.java:102) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334) at com.baselogic.yoursos.user.UserPreferenceFilter.doFilter(UserPreferenceFilter.java:46
Re: [WAY OT] Hashtable implementation
Hashtable is a legacy collection that has been replaced by the HashMap class. You might check commons-collections for such a class and if it's not there you could contribute the code. David Hey, I know this is probably a really stupid question but i am looking for a Hashtable (or similar) that will store multiple objects under the same key. I wrote a superficial implementation myself (put, size and get methods only) based on the Hashtable, but I am interested to know if there is something out there already implementing this functionality. Thanks, Denis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] Barracuda 1.2.0 Released!
I normally wouldn't post this type of info to the Struts list, but since a number of you have asked to be kept abreast of Barracuda develpments, I figured I would let you know that the long awaited stable release of Barracuda 1.2.0 is finally here! IMO, people interested in Barracuda developments should subscribe to whatever mailing list you publish. This really has nothing to do with Struts and, at best, should be posted as [OT]. Thanks, David You can download it at: http://barracudamvc.org/downloads/ A lot has changed since the 1.1.1 release. Barracuda moved to http://www.barracudamvc.org , the source has been refactored, there now exist two contrib packages with reusable code and example webapps to show off their functionality, numerous bugs have been fixed, quite a few new features have been added and many features improved, and deployment of Barracuda and BarracudaDiscRack is now incredibly simplified. See the most important changes here... http://barracudamvc.org/Barracuda/docs/changes.html#1_2_0_Release_Notes and here... http://barracudamvc.org/BarracudaDiscRack/docs/changes.html For a more detailed explanation of the changes, see http://barracudamvc.org/Barracuda/javadocs/org/enhydra/barracuda/A_Changes_H istory.html For information on building and deploying Barracuda, see... http://barracudamvc.org/Barracuda/docs/build_deploy.html And, of course, don't forget to try out the new contrib apps. See... http://barracudamvc.org/Barracuda/docs/contrib_package.html All this information, and more, is available at: http://barracudamvc.org/Barracuda/index.html and here... http://barracudamvc.org/BarracudaDiscRack/docs/index.html Thanks to everyone on the BarraucdaMVC team for all your hard work and thanks to all the users who continue to utilize this great project! Oh, and special thanks to those who donated hosting, time, money, and effort to make barracudamvc.org possible. http://www.visi.com/~hoju/barracuda/donations.html Enjoy! Christian -- Christian Cryder [EMAIL PROTECTED] Internet Architect, ATMReports.com Barracuda - http://barracudamvc.org -- Coffee? I could quit anytime, just not today - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [ANN] Barracuda 1.2.0 Released!
It's not that I'm upset by post but this is a very high traffic list and I'm trying to keep it focused on Struts. David Wow, give the guy a break! He prefixed the post with [ANN] and he indicates that a number of Struts users have encouraged him to post this information here. Simon -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 27, 2003 12:09 PM To: [EMAIL PROTECTED] Subject: Re: [ANN] Barracuda 1.2.0 Released! I normally wouldn't post this type of info to the Struts list, but since a number of you have asked to be kept abreast of Barracuda develpments, I figured I would let you know that the long awaited stable release of Barracuda 1.2.0 is finally here! IMO, people interested in Barracuda developments should subscribe to whatever mailing list you publish. This really has nothing to do with Struts and, at best, should be posted as [OT]. Thanks, David You can download it at: http://barracudamvc.org/downloads/ A lot has changed since the 1.1.1 release. Barracuda moved to http://www.barracudamvc.org , the source has been refactored, there now exist two contrib packages with reusable code and example webapps to show off their functionality, numerous bugs have been fixed, quite a few new features have been added and many features improved, and deployment of Barracuda and BarracudaDiscRack is now incredibly simplified. See the most important changes here... http://barracudamvc.org/Barracuda/docs/changes.html#1_2_0_Rele ase_Notes and here... http://barracudamvc.org/BarracudaDiscRack/docs/changes.html For a more detailed explanation of the changes, see http://barracudamvc.org/Barracuda/javadocs/org/enhydra/barracu da/A_Changes_H istory.html For information on building and deploying Barracuda, see... http://barracudamvc.org/Barracuda/docs/build_deploy.html And, of course, don't forget to try out the new contrib apps. See... http://barracudamvc.org/Barracuda/docs/contrib_package.html All this information, and more, is available at: http://barracudamvc.org/Barracuda/index.html and here... http://barracudamvc.org/BarracudaDiscRack/docs/index.html Thanks to everyone on the BarraucdaMVC team for all your hard work and thanks to all the users who continue to utilize this great project! Oh, and special thanks to those who donated hosting, time, money, and effort to make barracudamvc.org possible. http://www.visi.com/~hoju/barracuda/donations.html Enjoy! Christian -- Christian Cryder [EMAIL PROTECTED] Internet Architect, ATMReports.com Barracuda - http://barracudamvc.org -- Coffee? I could quit anytime, just not today - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Performance - Any Benchmarks?
They seem to be itching for benchmarks though, so I'll give it to them by building a single, then multi-servlet app and using Introscope with some load test simulators. I was hoping somebody in a situation such as myself already had done it. It's a shame that you're required to do this because an explanation of how Java threading works should suffice. Simply put, it doesn't matter how many servlet instances exist, it only matters how many threads are running through one instance at a time. David Now the next matter of opposition I'm getting is does struts work well in a distributed environment for example load balancing. I will post this a separate thread with what I have told them already. Craig R. McClanahan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Thu, 22 May 2003, Tin Pham wrote: Date: Thu, 22 May 2003 00:09:09 -0400 From: Tin Pham [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Struts Performance - Any Benchmarks? Hi, I have been scouring the internet with no results. Does anybody have any resources on the performance of Struts applications. Any benchmarks versus standard development. One bottle-neck brought up by members of my team is the single action servlet everything must pass through. Are there currently or going to be programming solutions to this? If your team believes that this issue is a bottleneck, then some training and a more complete understanding of how multithreading works in Java might be appropriate -- the fact that a single instance of the action servlet (and of the actions themselves) has zero impact on performance, and it reduces memory consumption of your app by avoiding useless extra copies. For example, maybe we can have more than one action servlet and use a different mapping.. ie, instead of *.do, *.jspx ? But then would global forwards from the two different actions still work? This won't work, but not for performance reasons -- Struts supports only a single mapping to the controller servlet, and only one controller servlet per webapp. Personally, I argue that we should simply go to load balancing if it comes to that and adding more servlets wouldn't do much anyway. From my rudimentary undestanding of java servlets, other resources will choke on you way before the single servlet chokes anyhow. See above -- the most important factors in webapp performance have nothing to do with this issue at all. In fact, the most important factors are typically: * Overall application architecture (things like caching where it is appropriate, but not doing premature optimization -- there are lots of good books on optimizing server-side Java apps around to draw ideas from). * Database performance (be sure to use connection pooling effectively) * Network performance * The quality of the code generated by your JSP page compiler for pages using lots of custom tags. Craig McClanahan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]