Re: which way..struts using tiles?
Tiles and JSP has worked quite well for me. I especially like using Tiles controllers to attach view preparation behavior directly to the tile instead of worrying about setting up the data in every place that uses the tile. David --- "Butt, Dudley" <[EMAIL PROTECTED]> wrote: > Hi all, > > Just need some info on what you guys are using out there, and what > strategy is working the best for you. > Lets say i want to use Struts and I need to get a nice webapp out there. > The system is potentially large so I'm going to need some sort of > build/generation tools. What are you guys using for your presentation > look and feel. How are you getting your pages generated? Any ideas will > be > greatly appreciated!! > Many thx > > > NOTICE: > > This message contains privileged and confidential information intended > only for the person or entity to which it is addressed. > Any review, retransmission, dissemination, copy or other use of, or > taking of any action in reliance upon this information by persons or > entities other than the intended recipient, is prohibited. > > If you received this message in error, please notify the sender > immediately by e-mail, facsimile or telephone and thereafter delete the > material from any computer. > > The New Africa Capital Group, its subsidiaries or associates do not > accept liability for any personal views expressed in this message. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: debate over Struts vs other frameworks
--- "Butt, Dudley" <[EMAIL PROTECTED]> wrote: > Hi all, > I know this must be a topic of discussion that has raged on for a long > time, but i'm throwing it out there again, what u say people? Pick the framework that works best for you. This topic usually leads to people making incorrect statements about the frameworks so the best way to find out about them is to try them out. Struts may not be the right framework for everyone but it certainly is the best I've used. David > > > NOTICE: > > This message contains privileged and confidential information intended > only for the person or entity to which it is addressed. > Any review, retransmission, dissemination, copy or other use of, or > taking of any action in reliance upon this information by persons or > entities other than the intended recipient, is prohibited. > > If you received this message in error, please notify the sender > immediately by e-mail, facsimile or telephone and thereafter delete the > material from any computer. > > The New Africa Capital Group, its subsidiaries or associates do not > accept liability for any personal views expressed in this message. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using JSTL tags instead of Struts tags
--- "Davidson, Glenn" <[EMAIL PROTECTED]> wrote: > David, > Thanks David, I do stand corrected. I must have misread some of the > earlier > emails, so the offensive tags are part of the JSTL. Since it the JSTL is > coming from Sun it is not surprising that is includes some garbage. I > still > saw some fine folks arguing in favor of these features. There's no point in complaining about JSTL sql tags on the Struts users mailing list. We can't remove them from the taglib but we can choose to not use them. The JSTL's sql tags have their place in very small apps and proof-of-concept apps. If they bring more people to the Java platform, I consider them a worthwhile addition. However, I choose not to use them as they lead to unmaintainable apps. David > What about JSF, > will > there be support in JSF for embedding business or data logic into the > presentation layer? If so why? > > Glenn > > -Original Message- > From: David Graham [mailto:[EMAIL PROTECTED] > Sent: Friday, July 11, 2003 4:07 PM > To: Struts Users Mailing List > Subject: RE: Using JSTL tags instead of Struts tags > > > --- "Davidson, Glenn" <[EMAIL PROTECTED]> wrote: > > I recently saw the term "Dog Food" and found it amusing. I might not > be > > using it correctly in this context ( I just might be eating some dog > > food > > with my prior email :-) ) . What I was trying to get across is that > just > > because there are other languages/technologies that allow programmers > to > > build applications in a poor manner, that in itself should not be used > > to > > justify the addition of features that would allow Struts based > > applications > > to be built in the same manner. I chose struts as the framework for > our > > web > > development specifically because it didn't allow the type of mixing of > > logic > > and presentation that was mentioned earlier in this thread. If I > wanted > > to > > mix logic and presentation I would use PHP, it makes it very easy to > do > > that. If struts is going to be MVC, then let's keep it MVC. > > This discussion has had little to do with Struts and much to do with the > JSTL. > > David > > > > > > > > > > -Original Message- > > From: Mark Lowe [mailto:[EMAIL PROTECTED] > > Sent: Friday, July 11, 2003 11:30 AM > > To: Struts Users Mailing List > > Subject: Re: Using JSTL tags instead of Struts tags > > > > > > I'm familiar with the tech idiom "dog-food" .. but I have no idea what > > > it is you're talking about please can you explain what you understand > > by dog-food coding? > > > > If your saying what I think you are are you sure you're not choking on > > > some? > > > > > > On Friday, July 11, 2003, at 02:36 PM, Davidson, Glenn wrote: > > > > > Please tell me that this is the start of a new urban legend and a > > joke. > > > There are people who like "Dog food" coding (see PHP, Perl) but this > > > > should > > > not be used as an excuse to pollute what Struts stands for. I > > > understand > > > that you want to increase the acceptance of Struts but history has > > > shown > > > that as soon as you start down the slippery slope of including "Dog > > > Food" > > > features you become the technology providers that you currently make > > > > fun of. > > > I humbly request that you reconsider SQL tags and other "Dog Food" > > > features. > > > Struts has made a great start and up till now the direction has been > > > > solid. > > > No "Dog Food" please! > > > > > > Glenn > > > > > > -Original Message- > > > From: Mark Galbreath [mailto:[EMAIL PROTECTED] > > > Sent: Thursday, July 10, 2003 7:20 PM > > > To: 'Struts Users Mailing List' > > > Subject: RE: Using JSTL tags instead of Struts tags > > > > > > > > > I think this approach is bullshit. Why would you develop "SQL" tags > > > > to get > > > access to the db from the view? You are contradicting > yourself...this > > > > > is > > > exactly what PERL and PHP do. This is not good programming > practice! > > > > > > Mark > > > > > > -Original Message- > > > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] > > > Sent: Thursday, July 10, 2003 6:38 PM
RE: Using JSTL tags instead of Struts tags
--- "Davidson, Glenn" <[EMAIL PROTECTED]> wrote: > I recently saw the term "Dog Food" and found it amusing. I might not be > using it correctly in this context ( I just might be eating some dog > food > with my prior email :-) ) . What I was trying to get across is that just > because there are other languages/technologies that allow programmers to > build applications in a poor manner, that in itself should not be used > to > justify the addition of features that would allow Struts based > applications > to be built in the same manner. I chose struts as the framework for our > web > development specifically because it didn't allow the type of mixing of > logic > and presentation that was mentioned earlier in this thread. If I wanted > to > mix logic and presentation I would use PHP, it makes it very easy to do > that. If struts is going to be MVC, then let's keep it MVC. This discussion has had little to do with Struts and much to do with the JSTL. David > > > > -Original Message- > From: Mark Lowe [mailto:[EMAIL PROTECTED] > Sent: Friday, July 11, 2003 11:30 AM > To: Struts Users Mailing List > Subject: Re: Using JSTL tags instead of Struts tags > > > I'm familiar with the tech idiom "dog-food" .. but I have no idea what > it is you're talking about please can you explain what you understand > by dog-food coding? > > If your saying what I think you are are you sure you're not choking on > some? > > > On Friday, July 11, 2003, at 02:36 PM, Davidson, Glenn wrote: > > > Please tell me that this is the start of a new urban legend and a > joke. > > There are people who like "Dog food" coding (see PHP, Perl) but this > > should > > not be used as an excuse to pollute what Struts stands for. I > > understand > > that you want to increase the acceptance of Struts but history has > > shown > > that as soon as you start down the slippery slope of including "Dog > > Food" > > features you become the technology providers that you currently make > > fun of. > > I humbly request that you reconsider SQL tags and other "Dog Food" > > features. > > Struts has made a great start and up till now the direction has been > > solid. > > No "Dog Food" please! > > > > Glenn > > > > -Original Message- > > From: Mark Galbreath [mailto:[EMAIL PROTECTED] > > Sent: Thursday, July 10, 2003 7:20 PM > > To: 'Struts Users Mailing List' > > Subject: RE: Using JSTL tags instead of Struts tags > > > > > > I think this approach is bullshit. Why would you develop "SQL" tags > > to get > > access to the db from the view? You are contradicting yourself...this > > > is > > exactly what PERL and PHP do. This is not good programming practice! > > > > Mark > > > > -Original Message- > > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] > > Sent: Thursday, July 10, 2003 6:38 PM > > > > On Thu, 10 Jul 2003, David Geary wrote: > > > >> Date: Thu, 10 Jul 2003 15:22:17 -0600 > >> From: David Geary <[EMAIL PROTECTED]> > >> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > >> To: Struts Users Mailing List <[EMAIL PROTECTED]> > >> Subject: Re: Using JSTL tags instead of Struts tags > >> > >> On Thursday, Jul 10, 2003, at 15:18 America/Denver, Mark Galbreath > >> wrote: > >> > >>> Is this the same David Geary that wrote, among others, "Advanced > >>> JavaServer Pages?" > >> > >> Yes. > > > > David was also a member of the JSR-52 expert group (JSTL), and he's on > > > the > > JSR-127 expert group (JavaServer Faces) as well. > > > > I've never been a fan of having SQL tags (especially the updating > > ones) in > > JSTL, for all the obvious reasons. However, there are a whole bunch > of > > developers in the world who are used to model 1 style development (VB, > > > PHP, > > PERL, Cold Fusion, ...), and it would not be fair for expert groups to > > ignore the needs of those developers, simply because we might not like > > > what > > people will do with the result. This was a case where the group > > creating > > the standard was actually listening to what users wanted. > > > > Beyond that, it *is* feasible to separate business logic and > > presentation > > logic into separate JSP pages, and enjoy the fact that the page is > > automatically recompiled without needing the app to be restarted. > > Couple > > that with the fact that Struts lets you say that a particular > > really does a RequestDispatcher.include(), and you've suddenly got the > > ability to program Actions as JSP pages ... sort of a mind twisting > > approach, but it seems like it would be feasible in scenarios where > the > > business logic is simple enough to be scripted in JSP tags that are > > only > > used for their side effects, not for their output (which would get > > thrown > > away anyway when Struts ultimately forwards to the presentation JSP). > > > In > > such a scenario, having SQL access tags would make a lot of sense. > > > >> > >> > >> david > > > > Craig > > > > ---
Re: Declarative Exception Handling
--- Qasim Khawaja <[EMAIL PROTECTED]> wrote: > I have defined an exception in the action mapping declaration but the > ide I am using (eclipse) is insisting that I throw an exception or > surround with a try catch. Am I missing something here? Your code is potentially throwing an exception that you need to either handle locally or throw out of the method. David > > Q > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using JSTL tags instead of Struts tags
--- David Geary <[EMAIL PROTECTED]> wrote: > On Thursday, Jul 10, 2003, at 14:40 America/Denver, David Graham wrote: > > >> The work that you do with JSTL, and therefore in JSP pages instead of > >> actions, involves activities like iterating over data, conditional > >> tests, accessing URLs, i18n, xml manipulation and database access. > >> Except for database updates and transactions, all of those activities > >> are well within the perview of a view. > > > > So you're advocating placing some database logic in the view and some > > > in > > Java classes? I've had to maintain apps written that way and it was a > > complete nightmare. The view has absolutely no business querying the > > database in all but the simplest apps (3 pages max). > > No, I'm just saying that reading the database from a view is sometimes > a viable alternative for smaller applications, especially if you > encapsulate reading the database within the view itself. Then you're only advocating this approach for apps that don't update database data at all, they just view it. Given an app that doesn't update data, is around the 3-5 page mark, and doesn't have to support multiple database types, I agree with you. I have yet to come across any app that fits that description though. David > > I realize I'm bucking traditional wisdom but I don't like to see > lumped together with and . > The last two are much more offensive than the first. > > > david > > > > > David > > > >> > >> > >> david > >> > >>> > >>> I'm open to views against mine, and I also wouldn't dismiss the > >>> advise > >> > >>> of the folks who developed struts, but whenever I read "use JSLT" it > >>> seems to me a step backwards. > >>> > >>> On Thursday, July 10, 2003, at 03:05 PM, Hookom, Jacob wrote: > >>> > >>>> > >>>> Start using it and you will :-). The expression language is the > >>>> best > >>>> thing since sliced bread. > >>>> > >>>> David > >>>> I agree, I'm even using the EL parser to do stuff on completely > >>>> different > >>>> layers for scripting logic. Also, you can VERY easily use JSTL's > >>>> parsing > >>>> objects in your own tags to make them a little more flexible. > >>>> Jacob > >>>> > >>>>> > >>>>> - Keith > >>>>> > >>>>> > >>>>> -Original Message- > >>>>> From: David Graham [mailto:[EMAIL PROTECTED] > >>>>> Sent: Thursday, July 10, 2003 9:51 AM > >>>>> To: Struts Users Mailing List > >>>>> Subject: RE: Using JSTL tags instead of Struts tags > >>>>> > >>>>> > >>>>> I don't have any documentation but the only Struts taglibs I use > >>>>> are > >>>>> html > >>>>> and tiles. I replaced my usage of the bean tags with the > >>>>> > >>>>> tag and the Struts logic tags are all replaced with a combination > > >>>>> of > >> > >>>>> the > >>>>> and tags plus the expression language. > >>>>> > >>>>> The JSPs are remarkably easy to maintain and debug using this > >>>>> strategy > >>>>> because there aren't any scriptlets or complicated business logic > > >>>>> in > >>>>> them. > >>>>> > >>>>> David > >>>>> > >>>>> --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > >>>>>> I'd be interested in finding out about this too. > >>>>>> > >>>>>> > >>>>>> -Original Message- > >>>>>> From: White, Joshua A (HTSC, CASD) > >>>>> [mailto:[EMAIL PROTECTED] > >>>>>> Sent: Thursday, July 10, 2003 7:30 AM > >>>>>> To: 'Struts Users Mailing List' > >>>>>> Subject: Using JSTL tags instead of Struts tags > >>>>>> > >>>>>> > >>>>>> A previous thread had encouraged me to look into JSTL. It looks > >>>>>> lik
Re: Using JSTL tags instead of Struts tags
> The work that you do with JSTL, and therefore in JSP pages instead of > actions, involves activities like iterating over data, conditional > tests, accessing URLs, i18n, xml manipulation and database access. > Except for database updates and transactions, all of those activities > are well within the perview of a view. So you're advocating placing some database logic in the view and some in Java classes? I've had to maintain apps written that way and it was a complete nightmare. The view has absolutely no business querying the database in all but the simplest apps (3 pages max). David > > > david > > > > > I'm open to views against mine, and I also wouldn't dismiss the advise > > > of the folks who developed struts, but whenever I read "use JSLT" it > > seems to me a step backwards. > > > > On Thursday, July 10, 2003, at 03:05 PM, Hookom, Jacob wrote: > > > >> > >> Start using it and you will :-). The expression language is the best > >> thing since sliced bread. > >> > >> David > >> I agree, I'm even using the EL parser to do stuff on completely > >> different > >> layers for scripting logic. Also, you can VERY easily use JSTL's > >> parsing > >> objects in your own tags to make them a little more flexible. > >> Jacob > >> > >>> > >>> - Keith > >>> > >>> > >>> -Original Message- > >>> From: David Graham [mailto:[EMAIL PROTECTED] > >>> Sent: Thursday, July 10, 2003 9:51 AM > >>> To: Struts Users Mailing List > >>> Subject: RE: Using JSTL tags instead of Struts tags > >>> > >>> > >>> I don't have any documentation but the only Struts taglibs I use are > >>> html > >>> and tiles. I replaced my usage of the bean tags with the > >>> > >>> tag and the Struts logic tags are all replaced with a combination of > > >>> the > >>> and tags plus the expression language. > >>> > >>> The JSPs are remarkably easy to maintain and debug using this > >>> strategy > >>> because there aren't any scriptlets or complicated business logic in > >>> them. > >>> > >>> David > >>> > >>> --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > >>>> I'd be interested in finding out about this too. > >>>> > >>>> > >>>> -Original Message- > >>>> From: White, Joshua A (HTSC, CASD) > >>> [mailto:[EMAIL PROTECTED] > >>>> Sent: Thursday, July 10, 2003 7:30 AM > >>>> To: 'Struts Users Mailing List' > >>>> Subject: Using JSTL tags instead of Struts tags > >>>> > >>>> > >>>> A previous thread had encouraged me to look into JSTL. It looks > >>>> like > >>>> there > >>>> are several tags which I could use instead of Struts tags. Has > >>>> anyone > >>>> come > >>>> across any documentation about experiences doing this (benefits, > >>>> drawbacks, > >>>> caveats)? Anyone care to share their experience? > >>>> > >>>> Joshua > >>>> > >>>> > >>>> This communication, including attachments, is for the exclusive use > > >>>> of > >>> > >>>> addressee and may contain proprietary, confidential or privileged > >>>> information. If you are not the intended recipient, any use, > >>>> copying, > >>>> disclosure, dissemination or distribution is strictly prohibited. > If > >>>> you are not the intended recipient, please notify the sender > >>>> immediately by return email and delete this communication and > >>>> destroy > >>>> all > >>>> copies. > >>>> > >>>> > >>>> > > >>>> - > >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>>> For additional commands, e-mail: > [EMAIL PROTECTED] > >>>> > >>>> > > >>>> - > >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>
RE: Struts 1.1 Bug? "PlugIn" Objects Not Serializable
--- "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote: > > > On Thu, 10 Jul 2003, David Graham wrote: > > > Date: Thu, 10 Jul 2003 09:24:15 -0700 (PDT) > > From: David Graham <[EMAIL PROTECTED]> > > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>, > > [EMAIL PROTECTED] > > To: Struts Users Mailing List <[EMAIL PROTECTED]> > > Subject: RE: Struts 1.1 Bug? "PlugIn" Objects Not Serializable > > > > --- "Hohlen, John C" <[EMAIL PROTECTED]> wrote: > > > That's exactly my problem. I have a distributable application using > > > Struts 1.1. Struts is storing an object in the ServletContext that > is > > > not serializable. What am I supposed to do, remove it? That would > > > probably cause Struts not to function properly. > > > > Open an enhancement request and we'll look at what it would take to > make > > the standard plugins serializable. I don't think the interface should > be > > serializable because there might be plugins that use databases or > other > > non-serializable objects. > > > > My personal opinion is that app servers which require ServletContext > attributes to be Serializable are broken, because the servlet spec only > requires this for *session* attributes. That being said, we probably > need > to address this reality, but it is still irritating. My understanding was that distributable apps required ServletContext attributes to be Serializable as well. Is that incorrect? I'll go look at the spec again... David > Craig __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts 1.1 Bug? "PlugIn" Objects Not Serializable
--- "Hohlen, John C" <[EMAIL PROTECTED]> wrote: > That's exactly my problem. I have a distributable application using > Struts 1.1. Struts is storing an object in the ServletContext that is > not serializable. What am I supposed to do, remove it? That would > probably cause Struts not to function properly. Open an enhancement request and we'll look at what it would take to make the standard plugins serializable. I don't think the interface should be serializable because there might be plugins that use databases or other non-serializable objects. David > > Thanks, > > JOHN > > -Original Message- > From: David Graham [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 10, 2003 10:47 AM > To: Struts Users Mailing List > Subject: Re: Struts 1.1 Bug? "PlugIn" Objects Not Serializable > > > --- "Hohlen, John C" <[EMAIL PROTECTED]> wrote: > > > I'm encountering a "serialization" error due to Plug-In objects, in > my > > case, the "org.apache.struts.validator.ValidatorPlugIn" not being > > serializable. An array of plug-ins are stored in "application" scope > in > > the "ActionServlet.initModulePlugIns()" method. However, the "PlugIn" > > interface does not implement "serializable" nor do any of the > > implementing subclasses (ModuleConfigVerifier, TilesPlugin, > > ValidatorPlugIn). Anybody have any ideas for a possible workaround? > > > JOHN > > > P.S. I checked Bugzilla database and did not see this error. I will > > add if others concur with this. > > Only objects stored in the session are required to be Serializable. > Distributable apps require objects in the ServletContext to be > Serializable as well. > > David > > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > __ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 1.1 Bug? "PlugIn" Objects Not Serializable
--- "Hohlen, John C" <[EMAIL PROTECTED]> wrote: > > I'm encountering a "serialization" error due to Plug-In objects, in my > case, the "org.apache.struts.validator.ValidatorPlugIn" not being > serializable. An array of plug-ins are stored in "application" scope in > the "ActionServlet.initModulePlugIns()" method. However, the "PlugIn" > interface does not implement "serializable" nor do any of the > implementing subclasses (ModuleConfigVerifier, TilesPlugin, > ValidatorPlugIn). Anybody have any ideas for a possible workaround? > > JOHN > > P.S. I checked Bugzilla database and did not see this error. I will > add if others concur with this. Only objects stored in the session are required to be Serializable. Distributable apps require objects in the ServletContext to be Serializable as well. David > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using JSTL tags instead of Struts tags
--- Laurent PETIT <[EMAIL PROTECTED]> wrote: > Hello, > > From: "David Graham" <[EMAIL PROTECTED]> > > No, it doesn't encourage poor programming. Anyone can abuse the tags > but > > it's up to your designers to use them for view logic. If you provide > > beans that perform the business logic, the page designers will have no > > reason to implement that logic in the view. > > Yeah, maybe in a perfect world, with always up to date good developers, > it > may be possible that they won't abuse technologies and break layers ... > > ... in a perfect world, maybe. > > But my 'little' experience told me that if there's a way to do things > quicker (at the cost of 'good programming practices'), you will end up > with > an unmaintainable piece of program ... > > So I really understand what Mark is afraid of, because I had to be a > maintainer of such bad layered applications. This problem is not specific to JSTL. You can write poor JSPs with the Struts tags as well. David > > (I find in practice, it's almost impossible to keep bad programmers -or > not > up to date with the more recent technos- away from applications) > > -- > Laurent > > > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html spaces
--- Ben Anderson <[EMAIL PROTECTED]> wrote: > maybe this is a more genearl html/xml question - not really sure > > > > > Why are you using the JSTL's tag but not the tag? is a straightforward replacement of the tag. David > > so this sets link to equal /mypath/somewhere/ myfile.htm > obviously this puts a space in there and won't work. > I know this will work: > > > > but does anyone know if there's a way to continue to the next line > without > inserting a space? > Thanks, > Ben Anderson > > _ > 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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using JSTL tags instead of Struts tags
--- Mark Lowe <[EMAIL PROTECTED]> wrote: > I started using JSTL but found that it encouraged site builders to > start embedding logic in JSP's. While I can see that JSLT is more > powerful, isn't it true to say that it encourages breaking with the > view-controller demarcation? No, it doesn't encourage poor programming. Anyone can abuse the tags but it's up to your designers to use them for view logic. If you provide beans that perform the business logic, the page designers will have no reason to implement that logic in the view. > > I find the struts tags on the other hand, used with zero scriptlet > tolerance, forces you to do all the work in your action servlets. > > I'm open to views against mine, and I also wouldn't dismiss the advise > of the folks who developed struts, but whenever I read "use JSLT" it > seems to me a step backwards. It's a huge step *forwards* from the Struts tags. The JSTL is far more powerful and easier to use. Plus, it's a standard so every Java web developer is expected to know it. David > > On Thursday, July 10, 2003, at 03:05 PM, Hookom, Jacob wrote: > > > > > Start using it and you will :-). The expression language is the best > > thing since sliced bread. > > > > David > > I agree, I'm even using the EL parser to do stuff on completely > > different > > layers for scripting logic. Also, you can VERY easily use JSTL's > > parsing > > objects in your own tags to make them a little more flexible. > > Jacob > > > >> > >> - Keith > >> > >> > >> -Original Message- > >> From: David Graham [mailto:[EMAIL PROTECTED] > >> Sent: Thursday, July 10, 2003 9:51 AM > >> To: Struts Users Mailing List > >> Subject: RE: Using JSTL tags instead of Struts tags > >> > >> > >> I don't have any documentation but the only Struts taglibs I use are > >> html > >> and tiles. I replaced my usage of the bean tags with the > >> > >> tag and the Struts logic tags are all replaced with a combination of > >> the > >> and tags plus the expression language. > >> > >> The JSPs are remarkably easy to maintain and debug using this > strategy > >> because there aren't any scriptlets or complicated business logic in > >> them. > >> > >> David > >> > >> --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > >>> I'd be interested in finding out about this too. > >>> > >>> > >>> -Original Message- > >>> From: White, Joshua A (HTSC, CASD) > >> [mailto:[EMAIL PROTECTED] > >>> Sent: Thursday, July 10, 2003 7:30 AM > >>> To: 'Struts Users Mailing List' > >>> Subject: Using JSTL tags instead of Struts tags > >>> > >>> > >>> A previous thread had encouraged me to look into JSTL. It looks > like > >>> there > >>> are several tags which I could use instead of Struts tags. Has > >>> anyone > >>> come > >>> across any documentation about experiences doing this (benefits, > >>> drawbacks, > >>> caveats)? Anyone care to share their experience? > >>> > >>> Joshua > >>> > >>> > >>> This communication, including attachments, is for the exclusive use > >>> of > >> > >>> addressee and may contain proprietary, confidential or privileged > >>> information. If you are not the intended recipient, any use, > copying, > >>> disclosure, dissemination or distribution is strictly prohibited. If > >>> you are not the intended recipient, please notify the sender > >>> immediately by return email and delete this communication and > destroy > >>> all > >>> copies. > >>> > >>> > >>> > - > >>> 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] > >>> > >> > >> > >> __ > >> Do you Yahoo!? > >> SBC Yahoo! DSL - Now only $29.95 per month! > >
Re: JSTL and JSF What does the future hold?
--- "Davidson, Glenn" <[EMAIL PROTECTED]> wrote: > Many of us a new to Struts and have limited time to learn new > technologies. > I have heard some (not a lot) of hype for Java Server Faces. Being new > and > having to learn this technology what recommendation can you give? Should > we > skip JSTL? JSF is not a replacement for JSTL. You should most definitely use the JSTL tags in your app instead of Struts specific tags. > Should we jump to JSF? JSF hasn't been released yet so you can't jump to it just yet. I highly recommend trying it out though. David > Many of you on this list are actually > creating these new technologies and we look to you for some guidance. > > Thanks > > Glenn > > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using JSTL tags instead of Struts tags
--- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > There isn't really any business logic with the struts tags either, and > there's generally no need for scriptlets. I don't know anything about > JSTL, > but I'm just not seeing the advantage here. At least not yet. Start using it and you will :-). The expression language is the best thing since sliced bread. David > > - Keith > > > -Original Message- > From: David Graham [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 10, 2003 9:51 AM > To: Struts Users Mailing List > Subject: RE: Using JSTL tags instead of Struts tags > > > I don't have any documentation but the only Struts taglibs I use are > html > and tiles. I replaced my usage of the bean tags with the > tag and the Struts logic tags are all replaced with a combination of the > and tags plus the expression language. > > The JSPs are remarkably easy to maintain and debug using this strategy > because there aren't any scriptlets or complicated business logic in > them. > > David > > --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > > I'd be interested in finding out about this too. > > > > > > -Original Message- > > From: White, Joshua A (HTSC, CASD) > [mailto:[EMAIL PROTECTED] > > Sent: Thursday, July 10, 2003 7:30 AM > > To: 'Struts Users Mailing List' > > Subject: Using JSTL tags instead of Struts tags > > > > > > A previous thread had encouraged me to look into JSTL. It looks like > > there > > are several tags which I could use instead of Struts tags. Has anyone > > come > > across any documentation about experiences doing this (benefits, > > drawbacks, > > caveats)? Anyone care to share their experience? > > > > Joshua > > > > > > This communication, including attachments, is for the exclusive use of > > > addressee and may contain proprietary, confidential or privileged > > information. If you are not the intended recipient, any use, copying, > > disclosure, dissemination or distribution is strictly prohibited. If > > you are not the intended recipient, please notify the sender > > immediately by return email and delete this communication and destroy > > all > > copies. > > > > > > - > > 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] > > > > > __ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using JSTL tags instead of Struts tags
I don't have any documentation but the only Struts taglibs I use are html and tiles. I replaced my usage of the bean tags with the tag and the Struts logic tags are all replaced with a combination of the and tags plus the expression language. The JSPs are remarkably easy to maintain and debug using this strategy because there aren't any scriptlets or complicated business logic in them. David --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > I'd be interested in finding out about this too. > > > -Original Message- > From: White, Joshua A (HTSC, CASD) [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 10, 2003 7:30 AM > To: 'Struts Users Mailing List' > Subject: Using JSTL tags instead of Struts tags > > > A previous thread had encouraged me to look into JSTL. It looks like > there > are several tags which I could use instead of Struts tags. Has anyone > come > across any documentation about experiences doing this (benefits, > drawbacks, > caveats)? Anyone care to share their experience? > > Joshua > > > This communication, including attachments, is for the exclusive use of > addressee and may contain proprietary, confidential or privileged > information. If you are not the intended recipient, any use, copying, > disclosure, dissemination or distribution is strictly prohibited. If > you are not the intended recipient, please notify the sender > immediately by return email and delete this communication and destroy > all > copies. > > > - > 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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Use of Static Methods
--- "Paananen, Tero" <[EMAIL PROTECTED]> wrote: > > > > OO programs should be made up of objects passing > > > > messages to other objects, not calling global functions. > > > > > >I would argue a Singleton is no better in this respect. > > > > > >The fact that they're instantiated into an object, > > >don't make Singletons any less "global" than static > > >methods. > > > > Yes, it does. You can code a singleton and change the code without > > changing the interface. You cannot do that with static > > methods. Static > > must remain static, the singleton can change, depending on > > how you code it. > > I understand and appreciate the benefits of Singleton > objects over static methods. Let's rephrase my comment > to what I should've said in the first place :) > > "The USE of the Singleton class is still no less >global than using static methods." > > Foo.getInstance().bar(); > // vs. > Foo.bar(); > > Huge difference... That's not the only way to use a Singleton. A Singleton could be returned from a factory which certainly makes it less global in use than a static method. David > > -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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Use of Static Methods
--- "NYIMI Jose (BMB)" <[EMAIL PROTECTED]> wrote: > Just to clarify, Perl is not a procedural language !!! > You can implement any OO features (abstraction,inheritance,polymorphisme > etc ...) with Perl > http://www.manning.com/Conway/index.html > http://www.manning.com/getpage.html?project=conway&filename=Chapters.html > http://www.perl.com/pub/a/2003/06/13/design1.html > Yes, technically, you can do OOP in Perl. I'm not interested in starting nor participating in a language debate but anyone using Perl for OOP is using the wrong tool. David > José. > > -Original Message- > From: David Graham [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 09, 2003 9:06 PM > To: Struts Users Mailing List > Subject: RE: [OT] Use of Static Methods > > > --- "Paananen, Tero" <[EMAIL PROTECTED]> wrote: > > > OO programs should be made up of objects passing > > > messages to other objects, not calling global functions. > > > > I would argue a Singleton is no better in this respect. > > > > The fact that they're instantiated into an object, > > don't make Singletons any less "global" than static > > methods. > > They are instantiated into objects which means you can change the > specific type, method implementations, etc. without the app knowing > instead of calling a global function. If I wanted to do procedural > programming I'd be using Perl, not Java. > > David > > > > > > -TPP - I trim my responses, it saves bits > > > > - > > 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] > > > > > __ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > 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. > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Use of Static Methods
--- Brian Lee <[EMAIL PROTECTED]> wrote: > >From: David Graham <[EMAIL PROTECTED]> > >Reply-To: [EMAIL PROTECTED] > >To: Struts Users Mailing List <[EMAIL PROTECTED]> > > > > > > > > 2) It is not correct to say that static methods can't be overriden. > They > > > can > > > be overridden with another static method. You can't override a > static > > > method > > > to be non-static, however. > > > >That's incorrect. Static methods cannot be overridden. > > Actually, that's incorrect. Static method can be overridden. > > foo.java > public class foo{ > public static void bar(){} > } > > baz.java > public class baz extends foo{ > public static void bar(){} > } > > compiles Of course that compiles. You've hidden the definition from foo, *not* overridden it. There is a huge difference. David > > _ > The new MSN 8: advanced junk mail protection and 2 months FREE* > http://join.msn.com/?page=features/junkmail > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Use of Static Methods
--- "Paananen, Tero" <[EMAIL PROTECTED]> wrote: > > OO programs should be made up of objects passing > > messages to other objects, not calling global functions. > > I would argue a Singleton is no better in this respect. > > The fact that they're instantiated into an object, > don't make Singletons any less "global" than static > methods. They are instantiated into objects which means you can change the specific type, method implementations, etc. without the app knowing instead of calling a global function. If I wanted to do procedural programming I'd be using Perl, not Java. David > > -TPP - I trim my responses, it saves bits > > - > 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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Use of Static Methods
--- "Yee, Richard K,,DMDCWEST" <[EMAIL PROTECTED]> wrote: > I and a lot of other developers would disagree with the statement > "Static methods are evil for many reasons including philosophical > (they're > not OO) and practical (you can't override their behavior)." > > 1) Whenever you write a method that only accesses static data of a > class, > you should declare the method as static. Yes you could declare it static; however, accessing static data isn't a sufficient condition for making a method static. > > 2) It is not correct to say that static methods can't be overriden. They > can > be overridden with another static method. You can't override a static > method > to be non-static, however. That's incorrect. Static methods cannot be overridden. > > 3) There are many cases where using the static modifier on a method is > totally appropriate. Typically, they are used on methods that provide a > very > specific functionality that will never change. How can you possibly judge that functionality will never change in a particular method? Except in very limited circumstances you can never assume that. Just look at the assumption used in designing RequestUtils as static methods for an example. > Using the static modifier > on > such methods also reduces the overall memory footprint of an > application. That's a red herring argument. The class is loaded regardless of static or non-static method calls. A basic Java object is 8 bytes of memory. Are you going to give up on design principles for 8 lousy bytes? OO programs should be made up of objects passing messages to other objects, not calling global functions. David > > Regards, > > Richard > > > > > > -Original Message- > From: David Graham [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 09, 2003 9:22 AM > To: Struts Users Mailing List > Subject: RE: [OT] Use of Static Methods > > > > > > One of my programmers asked me whether or not it is OK to define > > helper methods as 'static' - and I realized that I didn't know the > > answer. So I guess the question is, in a web application, can common > > code be factored out > > to a helper class and marked as 'static'? > > Static methods are evil for many reasons including philosophical > (they're > not OO) and practical (you can't override their behavior). You should > use a > Singleton class with non-static methods. > > Struts' RequestUtils class is a good example of why you should never use > static methods. Developers want to override their behavior but can't > because everything is static. > > David > > > Are there any major problems > > with > > doing this? I should know the answer, but just can't put my thumb on > > it right now 8) > > > > TIA! > > > > Jerry Jalenak > > Team Lead, Web Publishing > > LabOne, Inc. > > 10101 Renner Blvd. > > Lenexa, KS 66219 > > (913) 577-1496 > > > > [EMAIL PROTECTED] > > > > > > This transmission (and any information attached to it) may be > > confidential and is intended solely for the use of the individual or > > entity to which it is > > addressed. If you are not the intended recipient or the person > > responsible for > > delivering the transmission to the intended recipient, be advised that > > you have > > received this transmission in error and that any use, dissemination, > > forwarding, > > printing, or copying of this information is strictly prohibited. If > you > > have > > received this transmission in error, please immediately notify LabOne > at > > the > > following email address: [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] > > > > > __ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Use of Static Methods
--- Erik Price <[EMAIL PROTECTED]> wrote: > > > David Graham wrote: > > > Static methods are evil for many reasons including philosophical > (they're > > not OO) and practical (you can't override their behavior). You should > use > > a Singleton class with non-static methods. > > And the generally accepted way to get a reference to the singleton is > with a static "getInstance" method, right? Yep, that's the one use case that I accept the use of static methods :-). > Is there any way to make an > anonymous subclass of a Singleton that uses a static method to get the > instance? For example: > > > public class SubclassSingleton { > >public static void main(String[] args) { > MySingleton ms = new MySingleton() { >int doSomething() { > return 42; >} > } > > MySingleton inst = ms.getInstance(); > System.out.println(ms.doSomething()); >} > } > > class MySingleton { > >static MySingleton me; > >static getInstance() { > if (MySingleton.me == null) >MySingleton.me = new MySingleton(); > > return MySingleton.me; >} > >int doSomething() { > return 8; >} > } > > > > This simple code doesn't work, because even if you subclass the > singleton and override one of the methods, the getInstance() method will > > create a base-class MySingleton. And since this method is static, it > can't be overridden. So while singletons are useful, you can't use them > > in anonymous subclasses (as far as I can tell), which makes them > difficult to use with mock object unit testing. The AbstractFactory and FactoryMethod patterns are applicable in this situation. David > > Please someone point out the flaw in my reasoning, it has bothered me > for quite a while and I'd love to be proven wrong. > > > > Erik > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validator validwhen not working?
Are you using a nightly build after 1.1 final? ValidWhen was not included with 1.1. David --- "Poon, Johnny" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to use validwhen, so that it's only valid when either all > three > related fields are empty or are filled, it's valid; otherwise not. > ssn_1, > ssn_2, and ssn_3 are the field names. For some reason, when I put this > in, > none of the validation takes place, not even required, minlength, > maxlength, > nor mask, which all worked before I put validwhen in there. Did I do > anything wrong? > > Here's the one of the fields in my validation.xml file: > > > > > > > > > > > test > ( (*this* == null) and (ssn_2 == null) and (ssn_3 > == null) ) > > > minlength > 3 > > > maxlength > 3 > > > mask > ^\d*$ > > > > Thanks. > > JP. > > > ** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > the system manager. > ** > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Use of Static Methods
--- Yansheng Lin <[EMAIL PROTECTED]> wrote: > I gave this a bit of thought before. I felt in some situations, static > methods > and instances are preferred. For example, if you want to synchronize a > query > method. Or in some situations where overriding is rare, i.e., > java.util.Calendar. How do you know overriding is rare for any particular class? Widely used code such as Java and Struts cannot assume anything about how developers will want to use the classes so you should always (even for internal code) make classes as flexible as possible. David > > > -----Original Message- > From: David Graham [mailto:[EMAIL PROTECTED] > Sent: July 9, 2003 10:22 AM > To: Struts Users Mailing List > Subject: RE: [OT] Use of Static Methods > > > > > > One of my programmers asked me whether or not it is OK to define > helper > > methods as 'static' - and I realized that I didn't know the answer. > So > > I > > guess the question is, in a web application, can common code be > factored > > out > > to a helper class and marked as 'static'? > > Static methods are evil for many reasons including philosophical > (they're > not OO) and practical (you can't override their behavior). You should > use > a Singleton class with non-static methods. > > Struts' RequestUtils class is a good example of why you should never use > static methods. Developers want to override their behavior but can't > because everything is static. > > David > > > Are there any major problems > > with > > doing this? I should know the answer, but just can't put my thumb on > it > > right now 8) > > > > TIA! > > > > Jerry Jalenak > > Team Lead, Web Publishing > > LabOne, Inc. > > 10101 Renner Blvd. > > Lenexa, KS 66219 > > (913) 577-1496 > > > > [EMAIL PROTECTED] > > > > > > This transmission (and any information attached to it) may be > > confidential and > > is intended solely for the use of the individual or entity to which it > > is > > addressed. If you are not the intended recipient or the person > > responsible for > > delivering the transmission to the intended recipient, be advised that > > you have > > received this transmission in error and that any use, dissemination, > > forwarding, > > printing, or copying of this information is strictly prohibited. If > you > > have > > received this transmission in error, please immediately notify LabOne > at > > the > > following email address: [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] > > > > > __ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Use of Static Methods
> > One of my programmers asked me whether or not it is OK to define helper > methods as 'static' - and I realized that I didn't know the answer. So > I > guess the question is, in a web application, can common code be factored > out > to a helper class and marked as 'static'? Static methods are evil for many reasons including philosophical (they're not OO) and practical (you can't override their behavior). You should use a Singleton class with non-static methods. Struts' RequestUtils class is a good example of why you should never use static methods. Developers want to override their behavior but can't because everything is static. David > Are there any major problems > with > doing this? I should know the answer, but just can't put my thumb on it > right now 8) > > TIA! > > Jerry Jalenak > Team Lead, Web Publishing > LabOne, Inc. > 10101 Renner Blvd. > Lenexa, KS 66219 > (913) 577-1496 > > [EMAIL PROTECTED] > > > This transmission (and any information attached to it) may be > confidential and > is intended solely for the use of the individual or entity to which it > is > addressed. If you are not the intended recipient or the person > responsible for > delivering the transmission to the intended recipient, be advised that > you have > received this transmission in error and that any use, dissemination, > forwarding, > printing, or copying of this information is strictly prohibited. If you > have > received this transmission in error, please immediately notify LabOne at > the > following email address: [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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] JSTL
--- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > I apologize if this is a bit off topic, and if it is a bit of a newbie > question. > I've never used JSTL before, and I'm not sure exactly what it is. Is it > built into standard JSP technology (thus usable without any add-ons), or > is > it a tag lib that you have to download and put in your project? It's a taglib specification that vendors can implement. Apache has an implementation available here: http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html David > > - Keith > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tag inside a tag
--- [EMAIL PROTECTED] wrote: > > Is it a limitation of HTML or struts tag implementation? > Does struts 1.1 solve this issue (JSTL or otherwise). It has nothing to do with HTML or Struts. This is a syntax error according to the JSP spec which means that no tag library can use a tag as another tag's attribute value. David > > Kishan > > > > > > "Benjamin Stewart" <[EMAIL PROTECTED]> on 09/07/2003 11:39:09 > > Please respond to "Struts Users Mailing List" ><[EMAIL PROTECTED]> > > To:"Struts Users Mailing List" <[EMAIL PROTECTED]> > cc: > > Subject:Re: Tag inside a tag > > you cant use tags inside tags... I discovered this recently :-( There > are > ways around it using jstl etc. > > [EMAIL PROTECTED] writes: > > > Hi, > > > > Can I specify a disabled attribute of a text tag using another tag. > > > > For example: > > > name="form" property="textDisabled" value="yes">disabled > > /> > > > > Here I have to disable the text depending upon the property > > "textDisabaled". The above thing is not working. > > > > Has anyone tried this thing before. I am using struts 1.02. > > > > Thanks in advance, > > > > Kishan > > > > > > > > > > > > NOTICE - This message is intended only for the use of the > > addressee named above and may contain privileged and > > confidential information. If you are not the intended recipient > > of this message you are hereby notified that you must not > > disseminate, copy or take any action based upon it. If you > > received this message in error please notify HIC immediately. > > Any views expressed in this message are those of the individual > > sender, except where the sender specifically states them to be > > the views of HIC. > > > > > > > > - > > 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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: generic SQL implementation
This question is better suited for the commons-user mailing list. Here's a typical JDBC usage: Map mappers = new HashMap(); mappers.put("testMapper","org.apache.commons.mapper.TestMapper"); MapperFactory factory = new MapperFactory(mappers); DataSource ds = // get DataSource here JdbcMapperFactoryListener jdbcListener = new JdbcMapperFactoryListener(ds); factory.addMapperFactoryListener(jdbcListener); // All code up to this point would be done once at app. startup, this code // would be run when you want to persist a new object Mapper mapper = factory.getMapper("testMapper"); mapper.create(persistThisObject); David --- Yansheng Lin <[EMAIL PROTECTED]> wrote: > I don't quite understand the data access part of the Mapper project. > How do you > initialize a new Jdbc connection? Shouldn't there be a JdbcFactory > class > similar to MapperFactory class, where you could pass the connection > properties? > > + public JdbcFactoryTest(String, java.util.Properties) { > + } > > similar to the following test: > > public MapperFactoryTest(String name) { > super(name); > > this.mappers.put("testMapper", > "org.apache.commons.mapper.TestMapper"); > this.mappers.put( > "java.util.ArrayList", > "org.apache.commons.mapper.TestMapper"); > } > > > -Original Message- > From: David Graham [mailto:[EMAIL PROTECTED] > Sent: July 7, 2003 10:24 AM > To: Struts Users Mailing List > Subject: Re: generic SQL implementation > > > Mapper doesn't have a real website yet but you can view the source > online > at: > http://cvs.apache.org/viewcvs.cgi/jakarta-commons-sandbox/mapper/ > > You could also check it out of the cvs repository. > > David > > --- Vinay <[EMAIL PROTECTED]> wrote: > > David, > > > > Can you give me the URL for the mapper, this might be the one I am > > looking > > for ,even though I wanted to implement the API on my own. > > > > Thanks a lot > > VInay > > - Original Message - > > From: "David Graham" <[EMAIL PROTECTED]> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > > Sent: Monday, July 07, 2003 11:35 AM > > Subject: Re: generic SQL implementation > > > > > > > There is a Mapper project in the commons sandbox that might help > you. > > It > > > allows you to store SQL in a properties file to remove it from your > > code. > > > Also, it acts as a layer between your app and your persistence > > technology > > > so you can swap in an O/R mapping tool, EJBs, etc if you decide > > against > > > using JDBC in the future. It also, makes using JDBC a breeze and > > removes > > > much error prone and repetitive code from your app. > > > > > > David > > > > > > > > > --- Vinay <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Has anybody implemented a generic implementation for querying > > databases > > > > during runtime. I am using DAO's for data access layer. But I > want > > to > > > > furthur move the database logic to down one more layer of > > abstraction.I > > > > am dealing with different kinds of database (eg. let's say a > MySQL, > > MS > > > > Access and another not SQL at all ,index sequential files). I want > > the > > > > DAO to access the database during runtime. So I want my DAO to be > > > > independent of the SQL statements.The Database Interfrace would > talk > > to > > > > either MySQL,or Oracle or any other database.So that there is no > > need > > > > to have DAO for each database syntax, rather , this should be > > handled > > > > by a API thru an interface. > > > > > > > > Here's and examples > > > > > > > > Let's say for select statement , we supply table name, column > names, > > > > where cluase , and's etc > > > > > > > > The following method should handle the query > > > > > > > > List getSelect(String tablename, List columnnames, List > > Orderby,.) > > > > etc { > > > > > > > > > > > > return queryresult > > > > } > > > > > > > > > > > > Any ideas appreciated > > > > Thank you > > > > Vinay > > > >
Re: generic SQL implementation
Mapper doesn't have a real website yet but you can view the source online at: http://cvs.apache.org/viewcvs.cgi/jakarta-commons-sandbox/mapper/ You could also check it out of the cvs repository. David --- Vinay <[EMAIL PROTECTED]> wrote: > David, > > Can you give me the URL for the mapper, this might be the one I am > looking > for ,even though I wanted to implement the API on my own. > > Thanks a lot > VInay > - Original Message - > From: "David Graham" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Monday, July 07, 2003 11:35 AM > Subject: Re: generic SQL implementation > > > > There is a Mapper project in the commons sandbox that might help you. > It > > allows you to store SQL in a properties file to remove it from your > code. > > Also, it acts as a layer between your app and your persistence > technology > > so you can swap in an O/R mapping tool, EJBs, etc if you decide > against > > using JDBC in the future. It also, makes using JDBC a breeze and > removes > > much error prone and repetitive code from your app. > > > > David > > > > > > --- Vinay <[EMAIL PROTECTED]> wrote: > > > > > > > > > Has anybody implemented a generic implementation for querying > databases > > > during runtime. I am using DAO's for data access layer. But I want > to > > > furthur move the database logic to down one more layer of > abstraction.I > > > am dealing with different kinds of database (eg. let's say a MySQL, > MS > > > Access and another not SQL at all ,index sequential files). I want > the > > > DAO to access the database during runtime. So I want my DAO to be > > > independent of the SQL statements.The Database Interfrace would talk > to > > > either MySQL,or Oracle or any other database.So that there is no > need > > > to have DAO for each database syntax, rather , this should be > handled > > > by a API thru an interface. > > > > > > Here's and examples > > > > > > Let's say for select statement , we supply table name, column names, > > > where cluase , and's etc > > > > > > The following method should handle the query > > > > > > List getSelect(String tablename, List columnnames, List > Orderby,.) > > > etc { > > > > > > > > > return queryresult > > > } > > > > > > > > > Any ideas appreciated > > > Thank you > > > Vinay > > > > > > __ > > Do you Yahoo!? > > SBC Yahoo! DSL - Now only $29.95 per month! > > http://sbc.yahoo.com > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: generic SQL implementation
There is a Mapper project in the commons sandbox that might help you. It allows you to store SQL in a properties file to remove it from your code. Also, it acts as a layer between your app and your persistence technology so you can swap in an O/R mapping tool, EJBs, etc if you decide against using JDBC in the future. It also, makes using JDBC a breeze and removes much error prone and repetitive code from your app. David --- Vinay <[EMAIL PROTECTED]> wrote: > > > Has anybody implemented a generic implementation for querying databases > during runtime. I am using DAO's for data access layer. But I want to > furthur move the database logic to down one more layer of abstraction.I > am dealing with different kinds of database (eg. let's say a MySQL, MS > Access and another not SQL at all ,index sequential files). I want the > DAO to access the database during runtime. So I want my DAO to be > independent of the SQL statements.The Database Interfrace would talk to > either MySQL,or Oracle or any other database.So that there is no need > to have DAO for each database syntax, rather , this should be handled > by a API thru an interface. > > Here's and examples > > Let's say for select statement , we supply table name, column names, > where cluase , and's etc > > The following method should handle the query > > List getSelect(String tablename, List columnnames, List Orderby,.) > etc { > > > return queryresult > } > > > Any ideas appreciated > Thank you > Vinay __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javascipt error in IE
--- Adam Hardy <[EMAIL PROTECTED]> wrote: > Well, I just upgraded to IE6 (SP1) and I don't get any errors for credit > > card nor required, nor in fact any errors at all. I just checked to make > > sure javascript errors were notified. > > I seem to have wiped out IE5.5, which I wanted to keep for testing. I > installed IE6 in a different directory, but if I launch IE5 with the > iexplore.exe from the original directory, I still get IE6. Is there some > > trick to doing this? AFAIK, it's fairly impossible to have multiple IE versions on the same box. MS apparently doesn't care about web developers testing on multiple versions of their browser. David > > Huang, Andy wrote: > > No, this error happen for all form validations I used, including > required, > > credit card, and zip code validator. > > > > Althought the problem is not fatal, since if I turn off > > "Display a notification about every script error" in advanced tab of > > IE internet options, the pop-up error message will just be silent, > > and proper error message still display for user input (which I thought > > shouldn't went thru, because of the javascript error) > > > > But this not acceptable for production use. > > > > Any ideas? > > > > > > -Original Message- > > From: Adam Hardy > > To: Struts Users Mailing List > > Sent: 7/4/2003 5:43 AM > > Subject: Re: javascipt error in IE > > > > You mean the error comes from the email-validation? > > > > Richard Mixon wrote: > > > >>Andy, I too would like to know how to fix this when using the > > > > validator > > > >>Javascripts. In most cases it appears to be benign, but irritating. > > > > I've got > > > >>on or two forms that it really does break though. > >> > >>Hope someone has an clue. > >> > >>- Richard > >> > >>-Original Message- > >>From: Huang, Andy [mailto:[EMAIL PROTECTED] > >>Sent: Thursday, July 03, 2003 2:19 PM > >>To: '[EMAIL PROTECTED]' > >>Subject: RE: javascipt error in IE > >> > >> > >>No one experience this problem??? > >> > >>-Original Message- > >>From: Huang, Andy > >>Sent: Thursday, July 03, 2003 1:46 PM > >>To: '[EMAIL PROTECTED]' > >>Subject: javascipt error in IE > >> > >> > >>I got an "Error: Object Expected" in IE 6, but run without any problem > > > > in > > > >>Netscape or Opera. > >> > >>I have a login form with onsubmit="return validateLoginForm(this);" > >>to validate the login email address and password (I have included the > > > > html > > > >>souce code snippet below) > >> > >>My guess is that the IE browser having problem to read > > > > staticJavascript.jsp > > > >>when it load the page. > >> > >>Any help will be appreciated > >> > >> > >> > > > onsubmit="return > > > >>validateLoginForm(this);"> > >> > >> > >> > >> Email Address: > >> > >> > >> > > > value=""> > > > >> > >> > >> > >> > >> > >> Password: > >> > >> > >> >>value=""> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >>- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > > === message truncated === __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is Action Instantiated Once?
--- Billy Ng <[EMAIL PROTECTED]> wrote: > Hi folks, > > I have a address book page that has the previous and next buttons. I > notice if 2 different users try to access the address books, last one > who clicks on the button always get what it should display. This sounds > very like they are both are using the same Action. > > The address book action extends a ActionBase that extends Strut's > Action. Would anybody tell me if Strut will instantiates a new acton > everytime it is called? Actions are Singletons. They are only instantiated once and reused for the life of the app. This is why your Actions must be thread safe and not use instance variables to hold state. David > Did I miss something on the configuration to > make it thread dependent? > > Thanks! > > Billy Ng __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More Validation Problems
> Kamholz, Keith (corp-staff) USX wrote: > > Does the required option of the validator check to see if the field is > null > > or an empty string? The field is first stripped of all leading and trailing whitespace. If the field is null or "" the required validation will fail. David > >Maybe this is why my validations have been > passing when > > they shouldn't, because I initialize all my properties to "". > > I hope I've finally found my problem! > > > > - Keith > > > > > > -Original Message- > > From: Adam Hardy [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, July 02, 2003 5:20 PM > > To: Struts Users Mailing List > > Subject: Re: More Validation Problems > > > > > > wait til you graduate onto struts validator, you'll have a ball then > ;) > > > > Nathan Ewing wrote: > > > >>Omg I figured it out :) > >> > >>In my validation, to see if someone had filled in a required field I > was > >>checking to see if the field was null. Because of this whenever the > form > >>displayed the bean would be created with null fields and errors would > > > > display. > > > >>Then when I hit submit it would make the blank field "" instead of > null so > > > > I > > > >>wouldn't get an error :) > >> > >> Nathan > >> > >> > >>--- Nathan Ewing <[EMAIL PROTECTED]> wrote: > >> > >> > >>>Well I figured out why I was getting a validation error. I was > returning > > > > a > > > >>>null error if there were no errors. > >>> > >>>Unfortunately now I find my real problem. > >>> > >>>My form shows correctly (more or less), but if I hit submit instead > of > > > > just > > > >>>popping back up with validation errors it goes to the Action class > behind > > > > it. > > > >>>Shouldn't it by default show my form, then if I enter wrong data just > show > >>>the > >>>form again with the errors, and then if it passes with no errors it > should > > > > go > > > >>>to the action class for processing? > >>> > >>> 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] > >> > >> > > > > > > > > - > > 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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Big Javabean?
--- "Poon, Johnny" <[EMAIL PROTECTED]> wrote: > Hi > > There are 2 quick questions. > > 1) I'm considering making one huge javabean that will have 100+ fields. > This bean will be share in the session across up to 23 different screen. > I > think this is probably the cleanest way, as the same field might show up > in > different screens. I don't think this will be a problem, however, I > have > never heard or made one single bean with that many fields. Have you > seen or > done that? Have you heard of any problem that might or have cause? It will be confusing for people to maintain a class that large. You should break your beans into logically separate classes. > > 2) Also, since I'm on this note, I noticed if I have a variable name > "mI" > (stands for middle initial), therefore having getMI() and setMI(..), > struts > does not recognize those getter and setter because it is actually > expecting > getiM() and setiM(). I got around it by renaming my variable > "middleInitial", so that the getter and setter are getMiddleInitial() > and > setMiddleInitial(). This works fine. I'm just wondering if anyone out > there aware of this or am I missing anything in the JavaBean standard? Struts relies on commons-beanutils to find the bean properties. Having a variable named mI is an absolutely terrible idea anyways and middleInitial is much more descriptive. David > > Thanks. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] CCValidation
--- Denis Avdic <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to validate credcard numbers entered by my customers. > Most of them can be validated easily using Lunh method, > but I am running into a problem when the customer tries to use a > business credcard (or so the boss tells me). Should business credcards > number be verifiable by Luhn method (used in the validator), or do > I have to write something special, and if so, what is it? I believe *all* credit card numbers can be validated using the Luhn method. The validator also checks that the card is one of several vendors which may be your problem. The supported card types are AMEX, VISA, Discover, and Master Card. David > > I figured that a lot of struts people have dealt with this, and I am > interested in what you all know, > > Thank you, > > Denis > > PS. I am writing CredCard because struts-user spam filter keeps > rejecting any email that has the full name in it. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validation doesn't validate
--- Michael Muller <[EMAIL PROTECTED]> wrote: > > I can't get the validation framework to do anything. > > I'm speculating that the validation.xml file isn't being read; I tried > putting a rule that doesn't exist and then some arbitrary syntactically > incorrect text in the file, and I didn't get an error anywhere I could > find. On the other hand, there is a message like this: Currently, commons-validator doesn't validate your xml file against the DTD so you won't see a syntax error. > > INFO: Loading validation rules file from '/WEB-INF/validation.xml' > > in the console log. And no errors. No errors in the localhost_log, > either. So maybe it *is* reading the validation file. > > My form bean name matches my validation form name, which matches the > name in my action mapping. I have validate=true in my action mapping. > I have a validation rule defined for a field on the form. (Two, > actually: required and integer.) Nothing. > > I'm using a DynaValidatorActionForm, in case that matters. You need to use DynaValidatorForm. David > Oh, and this > > is RC1 of 1.1 running in tomcat 4.1. > > Help! I'm sure this is a common problem, and I'll be embarassed when I > learn what it is, but I'm stuck. > > Thanks, > > -- Mike > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why html:text don't have filter attribute
--- Macleod Lee <[EMAIL PROTECTED]> wrote: > In html:options has one attribute "filter" for filter sensitive > characters in HTML. > > Why in html:text don't have this attribute and how can I avoid filter in > html:text ?? > This issue has an enhancement request open for it: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16804 David __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Repost: Validator indexed property not working in Struts 1.1 Final Release
--- "Wu, Feng" <[EMAIL PROTECTED]> wrote: > Thanks, I have opened a bug report on item one, it is at > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21254. Regarding the > second item, is there a paticular reason that the validator is designed > to "stops validating a list of values on the first failure"? It's not really designed that way, it just doesn't work right now. I haven't investigated what it would take to make this work yet. David > This > morning I actually modified Validator.java so that it validates all > memebers of the list and saves error messages for them all. So now I > get it to display like this: > > value is mandatory > value is mandatory > value is mandatory > > This is of course not very clear to the user, because I really wanted is > to display: > > nameList value 1 is mandatory > nameList value 2 is mandatory > nameList value 3 is mandatory > > I guess I still need to figure out a way of contructing the error > messages in a different way so that it works for both indexed and > non-indexed property. > > On the other hand, the validwhen rules that's supposed to come after 1.1 > final, will it be able to handle this kind of validation? How difficult > it would be possible to plug that piece into Strut 1.1? The reason I > ask is because it will be much difficult for me to sell to the > management the idea of delivering our project on nightly build than on > Struts 1.1 final. > > > Thanks a lot. > > Feng > > > -Original Message- > From: David Graham [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 01, 2003 3:21 PM > To: Struts Users Mailing List > Subject: Re: Repost: Validator indexed property not working in Struts > 1.1 Final Release > > > --- "Wu, Feng" <[EMAIL PROTECTED]> wrote: > > Seems like my previous email to the list did not make it. Here it > goes > > again. Thanks. > > > > By the way, I can work around the problem of nested:messagePresent not > > finding the ActionError by mannualy generating the property attribute > > like this: > > > > > > But this kind of defeated the purpose of nested tags, does it? > > It is indeed broken in 1.1 final and 1.1 RC2 (1.1 RC1 works fine). > Please > open a bug report on the tag so we can track this in bugzilla. > > > > > I still could not figure out why there is only ActionError (for > property > > nameList[0].value) is in request scope when I should have three, since > > nameList[1].value and nameList[2].value are blank and should fail > > validation. > > This is a current limitation of the validator. It stops validating a > list > of values on the first failure. > > David > > > > > Thank you. > > > > Feng > > > > -Original Message- > > From: Wu, Feng > > Sent: Monday, June 30, 2003 5:08 PM > > To: > > Subject: Validator indexed property not working in Struts 1.1 Final > > Release > > > > > > Hi, > > > > First, great works on Struts 1.1 final release. Just in time since we > > are designing a major project using Struts. > > > > Got a couple questions regarding validator and indexed properties in > > Struts 1.1 final release: > > > > 1. Seems that the validation of indexed property in struts-validator > > application (in type.jsp) is broken. Specifically the page has an > > indexed property nameList[].value. After I switched to Struts 1.1 > > final, the error message no longer shows up. Does any one has the > same > > problem? I knew this was working in RC1. > > > > In request scope, I saw ActionError saved for property > > nameList[0].value. In type.jsp the following code is used to output > > errors for this property: > > > > > > > > > > > > > > > > > > > > > > It seems nested:message can no longer match up "value" with > > "nameList[0].value". > > > > Any expert opinions on this? > > > > 2. Related (this is not 1.1 final release specific), say I want to > > display error messages for all the members of an indexed property, > i.e., > > in the type.jsp example, I want to display like: > > > > * nameList value 1 is mandatory > > * nameList value 2 is mandatory > > * nameList value 3 is mandatory > > > > instead of just displaying "nameList value is mandatory" only once > even
Re: Validation Problems
--- Adam Hardy <[EMAIL PROTECTED]> wrote: > What is it about action mappings? People seem to think they cost money > or something. Every struts project I've done had hundreds. If you need > two action mappings, don't worry about it. I think somebody worked out > once that tomcat would only start to show performance degradation once > the action mappings total reached 100,000. > > I suppose you have to make sure you keep them grouped together in > struts-config.xml to stop the file getting unmanageable, but that's the > only disadvantage I can think of. You can use multiple struts-config.xml files to cleanly group your definitions. David > As far as I'm concerned, I'd always > rather change some config statement than change code and recompile. > > But your action error is playing up still right? I presume if you take > the html:errors tag out of the jsp, there is no exception? Post the tag > here. Also, check your application resources file for the error > messages, the header and the footer. > > Adam > > Nathan Ewing wrote: > > Upgraded, didn't help. > > > > Nathan > > > > --- Nathan Ewing <[EMAIL PROTECTED]> wrote: > > > >>Actually version 1.1.b3 Maybe I should try the final release. > >> > >> Nathan > >> > >>--- Wendy Smoak <[EMAIL PROTECTED]> wrote: > >> > >>>Nathan wrote: > >>> > I'm trying to set up struts validation (using the validate() > function in > >>> > >>>the > >>> > actionForm) and I'm getting a few problems. > First, as soon as I open the form it shows the validation errors. > It doesn't wait until I fill out the form. Is there a way to prevent > >> > >>this? > >> > >>>Search the archives, this has come up before. One way is to override > the > >>>'validate' method and only call super.validate() when appropriate. > >>> > >>> > Second if I fill out the form correctly (and hence there would be no > > validation errors) I get a null pointer exception on the: > org.apache.struts.taglib.html.ErrorsTag.doStartTag(ErrorsTag.java:239) > tag. > >>> > >>>What version of Struts? I am not seeing this behavior at all. > >>> > >>>-- > >>>Wendy Smoak > >>>Applications Systems Analyst, Sr. > >>>Arizona State University, PA, IRM > >>> > >>> > >> > >> > >>- > >>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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Repost: Validator indexed property not working in Struts 1.1 Final Release
--- "Wu, Feng" <[EMAIL PROTECTED]> wrote: > Seems like my previous email to the list did not make it. Here it goes > again. Thanks. > > By the way, I can work around the problem of nested:messagePresent not > finding the ActionError by mannualy generating the property attribute > like this: > > > But this kind of defeated the purpose of nested tags, does it? It is indeed broken in 1.1 final and 1.1 RC2 (1.1 RC1 works fine). Please open a bug report on the tag so we can track this in bugzilla. > > I still could not figure out why there is only ActionError (for property > nameList[0].value) is in request scope when I should have three, since > nameList[1].value and nameList[2].value are blank and should fail > validation. This is a current limitation of the validator. It stops validating a list of values on the first failure. David > > Thank you. > > Feng > > -Original Message- > From: Wu, Feng > Sent: Monday, June 30, 2003 5:08 PM > To: > Subject: Validator indexed property not working in Struts 1.1 Final > Release > > > Hi, > > First, great works on Struts 1.1 final release. Just in time since we > are designing a major project using Struts. > > Got a couple questions regarding validator and indexed properties in > Struts 1.1 final release: > > 1. Seems that the validation of indexed property in struts-validator > application (in type.jsp) is broken. Specifically the page has an > indexed property nameList[].value. After I switched to Struts 1.1 > final, the error message no longer shows up. Does any one has the same > problem? I knew this was working in RC1. > > In request scope, I saw ActionError saved for property > nameList[0].value. In type.jsp the following code is used to output > errors for this property: > > > > > > > > > > > It seems nested:message can no longer match up "value" with > "nameList[0].value". > > Any expert opinions on this? > > 2. Related (this is not 1.1 final release specific), say I want to > display error messages for all the members of an indexed property, i.e., > in the type.jsp example, I want to display like: > > * nameList value 1 is mandatory > * nameList value 2 is mandatory > * nameList value 3 is mandatory > > instead of just displaying "nameList value is mandatory" only once even > though all three fields are blank. Is there a simple way of doing that? > Again, looks like only nameList[0].value is used as the key to save an > ActionError when all three fields are blank (thus all warranting error > messages). > > Is it the designed behavior to save only one ActionError for indexed > property no matter how many actual members of the indexed property > actually have? > > Thanks very much. > > Feng > > > > > *** > This e-mail and any files transmitted with it are intended > solely for the use of the addressee. This e-mail may > contain confidential and/or legally privileged information. > Any review, transmission, disclosure, copying, or any action > taken or not taken, by other than the intended recipient, in > reliance on the information, is prohibited. If you received > this e-mail in error, notify the sender and delete this e-mail > (and any accompanying material) from your computer and > network. In addition, please be advised that 21st Century > Insurance Group reserves the right to monitor, access and > review all messages, data and images transmitted through > our electronic mail system. By using our e-mail system, you > consent to this monitoring. > *** > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FieldChecks.validateMinLengths()
Remove the attribute because that's not supported. What text are you typing into the input box? David --- Adam Hardy <[EMAIL PROTECTED]> wrote: > > > depends="integer"> > > > depends="minlength,maxlength" > bundle="alternate"> > > resource="false"/> > resource="false"/> > >maxlength >16 > > > minlength >2 > > > > > > Copied more or less from the struts-example app > > David Graham wrote: > > What is your validation setup for that field and what are you entering > > into it? The struts-validator app seems to be working fine. > > > > David > > > > > > --- Adam Hardy <[EMAIL PROTECTED]> wrote: > > > >>I shutdown and deleted my deploys and builds and recompiled and > >>redeployed everything, and I have the html:javascript static=true tag > in > >> > >>the staticJavascript.jsp which I link into my page with the script > tag, > >>so I am pretty confident I don't have any old version of the static > >>javascript cached or generated anywhere. (I am on 1.1 final) > >> > >>The javascript is still giving me "must be min length" validation > errors > >> > >>when I try to submit a blank field though. > >> > >>Should the static javascript taglib still be in a seperate file like > in > >>the example app? > >> > >>Adam > >> > >>David Graham wrote: > >> > >>>Client and server checks should be the same in 1.1 final. If you > >>>generated the static javascript and stored it in a file, make sure > you > >>>regenerate it after upgrading to 1.1 final. > >>> > >>>David > >> > >> > >>- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > > > > > > > > __ > > Do you Yahoo!? > > SBC Yahoo! DSL - Now only $29.95 per month! > > http://sbc.yahoo.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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts - subproject
--- objectworlds <[EMAIL PROTECTED]> wrote: > > I have been informed that Jakarta Struts framework is a subproject of > jakarta. > Jakarta tomcat must also be a subproject of Jakarta. > Does this mean that Tomcat is always current with Struts framework ? The similarities between Tomcat and Struts end at both living under the Jakarta umbrella. One is a server and the other is a web application framework. There is no relationship between their version numbers. > There are also a number of commercial application servers which also > implement struts framework. Servers do not "implement" Struts. You can use Struts in your apps on any J2EE compliant server. > Do these application servers follow tomcat ? No. David > > > [EMAIL PROTECTED] wrote: > > >1) separate (more distinctly) view from logic/maintainability > >2) performance > >3) scalability/reuse of code > > > > > >Brandon Goodin > > > >-Original Message- > >From: objectworlds [mailto:[EMAIL PROTECTED] > >Sent: Monday, June 30, 2003 8:24 PM > >To: Struts Users Mailing List > >Subject: Re: Struts - concepts - is it true ? - model 1 & model 2 > > > > > > > >According to text main difference between model 1 and model 2 is that > >model 2 uses a servlet as the controller with model 1 using JSP. > > > >If that information is correct why did the change take place ? > > > > > >[EMAIL PROTECTED] wrote: > > > > > > > >>--- objectworlds <[EMAIL PROTECTED]> wrote: > >> > >> > >> > >> > >>>Hi, > >>> > >>>I have some material on the struts framework and I want to check if > what > >>> > >>>I have read is true. > >>>That way I will continue to follow the material I have on Struts > >>>framework. > >>> > >>>- The struts framework Model 2 is a variant of MVC software design > >>>pattern when used with web applications. > >>>- The struts framework keeps multiple views with multiple users up > to > >>>date so that when > >>>the data changes so does the view. This is also known as the > publisher - > >>> > >>>subscriber pattern because it > >>>helps keep the subscribers synchronized with the publisher. > >>> > >>> > >>> > >>> > >>This implies a push model but HTTP is a pull model with clients > requesting > >>fresh data from the server. The other statements are correct. > >> > >>David > >> > >> > >> > >> > >> > >>>- The struts framework allows the decoupling of business logic , > control > >>> > >>>and presentation. > >>>- Struts also allows one to change Internationalise the application > >>>based on the locale of the user. > >>> > >>> > >>> > >>>- > >>>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>>For additional commands, e-mail: [EMAIL PROTECTED] > >>> > >>> > >>> > >>> > >>> > >>__ > >>Do you Yahoo!? > >>SBC Yahoo! DSL - Now only $29.95 per month! > >>http://sbc.yahoo.com > >> > >>- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > >> > >> > > > > > > > > -- > Your favorite stores, helpful shopping tools and great gift ideas. > Experience the convenience of buying online with [EMAIL PROTECTED] > http://shopnow.netscape.com/ > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FieldChecks.validateMinLengths()
--- Adam Hardy <[EMAIL PROTECTED]> wrote: > Oh. I see. But the client-side validation does not behave this way. > > I have just max and min length specified, and with javascript on, I > cannot submit if the field is blank. Client and server checks should be the same in 1.1 final. If you generated the static javascript and stored it in a file, make sure you regenerate it after upgrading to 1.1 final. David > > David Graham wrote: > > This is actually a good thing :-). Minlength will only fail if there > is > > some text in the control and it's less than the minimum length. If > you > > want it to fail with no data you need to use the required validation. > By > > separating these validations you can make a field optional and if the > user > > fills it in, it has to be more than minlength characters. > > > > David > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FieldChecks.validateMinLengths()
--- Adam Hardy <[EMAIL PROTECTED]> wrote: > I started using struts validator. I just copied a bunch of stuff from > the struts example and started using that, and found that the minlength > validation actually returns true when the text field is blank. > > This was my first attempt and I was trying to make sure I had got the > validator plug-in functioning correctly, so I actually spent a few hours > > hunting down the reason why my blank field was passing validation even > though the minlength had been set to 1. > > I discovered in the source code that this is normal behaviour - surely > that can't be the case? I would expect a blank field to fail validation > for minimum length. Or is this actually the case for reasons I'm not > aware of? This is actually a good thing :-). Minlength will only fail if there is some text in the control and it's less than the minimum length. If you want it to fail with no data you need to use the required validation. By separating these validations you can make a field optional and if the user fills it in, it has to be more than minlength characters. David > > Thanks > Adam > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts - concepts - is it true ?
--- objectworlds <[EMAIL PROTECTED]> wrote: > Hi, > > I have some material on the struts framework and I want to check if what > > I have read is true. > That way I will continue to follow the material I have on Struts > framework. > > - The struts framework Model 2 is a variant of MVC software design > pattern when used with web applications. > - The struts framework keeps multiple views with multiple users up to > date so that when > the data changes so does the view. This is also known as the publisher - > > subscriber pattern because it > helps keep the subscribers synchronized with the publisher. This implies a push model but HTTP is a pull model with clients requesting fresh data from the server. The other statements are correct. David > - The struts framework allows the decoupling of business logic , control > > and presentation. > - Struts also allows one to change Internationalise the application > based on the locale of the user. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Booleans
--- "Jamie M. Guillemette" <[EMAIL PROTECTED]> wrote: > I can turn them on via a check box on my form.. but i cant seem to turn > them > off is there a trick ? http://jakarta.apache.org/struts/faqs/newbie.html#checkboxes David > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Empty Result Set
--- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > Does the ResultSet have to be scrollable for this to work? > I'm getting an error that tells me that my result set isn't scrollable. > I > think it's weird because I can make a call on rs.next() in a while loop > using a default resultset without a problem. Confusing... I don't set any special properties on the ResultSet and it works fine. David > > - Keith > > > -Original Message- > From: David Graham [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 25, 2003 1:35 PM > To: Struts Users Mailing List > Subject: Re: [OT] Empty Result Set > > > boolean isEmpty = !rs.next(); > > David > > --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > > Hey everyone, > > This isn't really a struts question, but it's applicable. I'm just > > wondering how to find out if a ResultSet is empty or not after I > execute > > my > > query. I've searched online, but I'm having a hard time finding much > of > > anything. > > Can I just use: > > > > if (myResultSet.next() ) > > { > > empty = false; > > } > > else > > { > > empty = true; > > } > > > > > > Would that work or would that not do what I'm looking for? > > Any help would be appreciated, thanks! > > > > - Keith > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > __ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validation and internet wierdness
This was a bug in commons-validator that was fixed a while back. It can't find a local DTD so it looks on the web. David --- Benjamin Stewart <[EMAIL PROTECTED]> wrote: > Greetings, > I am sending this to struts, as this is the context in which I found the > > "issue" I am having, but I suppose this may be a tomcat wide thing. > Anways. I find that when I am using the struts-example application (The > Mailreader Demo), when the server that is running tomcat has a route to > the internet, and I attempt to submit a form without all the field being > > added, the validation causes a javascript window to come up and tells me > > that there are required fields. If I stop the tomcat server, remove the > route to internet and start the tomcat server, running the same > application causes the validation error to be shown as HTML on the form > after the page is submitted (ie. No javascript). > > I also found that if my tomcat server is not running on a machine > connected to the internet then i get an exception generated (no route to > > host) when I start the server. It appears to work fine, but I was > interested to know why this was the case. > > I have done a search trying to work out why this is the case, but > couldnt find anything. Can somebody offer me a pointer or two. > > Thanks for your help. > > Regards > Ben Stewart > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Checking for a null property
--- "Jindal, Ashwini" <[EMAIL PROTECTED]> wrote: > Affan, > > Where does this C: tag come from??? The c tags are part of the JSTL. David > > ...AJ > > -Original Message- > From: Affan Qureshi [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 25, 2003 4:18 AM > To: Struts Users Mailing List > Subject: Re: Checking for a null property > > > Save yourself all the trouble and use > Affan > - Original Message - > From: "Varun Garg" <[EMAIL PROTECTED]> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > Sent: Wednesday, June 25, 2003 3:24 AM > Subject: RE: Checking for a null property > > > > I think you can use empty also, but present also works for me. > > > > The documentation also suggests that > > property - Checks for the existence of a non-null property value, > > returned by a property getter method on the JSP bean (in any scope) > that > > is specified by the name attribute. Property references can be simple, > > nested, and/or indexed. > > > > I have used the empty more for collections to make sure there is > > something in there. > > > > Varun > > > > > > -Original Message- > > From: Mick Knutson [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, June 24, 2003 5:04 PM > > To: [EMAIL PROTECTED] > > Subject: RE: Checking for a null property > > > > > > But doesn't the present tag just check whether the property is > present, > > and > > not if it is null or not? I was having some strange actions with this. > > > > > > > > --- > > Thanks... > > Mick Knutson > > --- > > > > > > > > > > > > >From: "Varun Garg" <[EMAIL PROTECTED]> > > >Reply-To: "Struts Users Mailing List" > <[EMAIL PROTECTED]> > > >To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > > >Subject: RE: Checking for a null property > > >Date: Tue, 24 Jun 2003 17:00:28 -0500 > > > > > > > > > > > > > > > > > > > > >-Original Message- > > >From: Jindal, Ashwini [mailto:[EMAIL PROTECTED] > > >Sent: Tuesday, June 24, 2003 4:57 PM > > >To: [EMAIL PROTECTED] > > >Subject: Checking for a null property > > >Importance: High > > > > > > > > >Anyone, > > > > > >Can anyone please help me with the following situation? > > > > > >I am trying to display the Agent's full Name. Now it works fine as > long > > > > >as the Agent has a valid full Name. As soon as Agent is null, I get a > > >Null Pointer. I want to check > > > > > > > > > > > > if the agent is null > > > then do something > > > > > >Can please tell me how I can make this check? > > > > > >Thank you, > > >...AJ > > > > > >- > > >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] > > > > > > > > - > > 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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Empty Result Set
boolean isEmpty = !rs.next(); David --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > Hey everyone, > This isn't really a struts question, but it's applicable. I'm just > wondering how to find out if a ResultSet is empty or not after I execute > my > query. I've searched online, but I'm having a hard time finding much of > anything. > Can I just use: > > if (myResultSet.next() ) > { > empty = false; > } > else > { > empty = true; > } > > > Would that work or would that not do what I'm looking for? > Any help would be appreciated, thanks! > > - Keith > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validate Client side(Javascript) code shows up in the page
The javascript you posted is clearly within tags. What appears on your screen? David --- "Mounagurusamy, Jayakumar (HAL)" <[EMAIL PROTECTED]> wrote: > Struts version 1.1rc2 > > > > -Original Message- > From: David Graham [<a href="mailto:[EMAIL">mailto:[EMAIL</a> PROTECTED] > Sent: Wednesday, June 25, 2003 9:29 AM > To: Struts Users Mailing List > Subject: Re: Validate Client side(Javascript) code shows up in the page > > > What version are you using? This sounds like a bug that was fixed some > time ago. > > David > > --- "Mounagurusamy, Jayakumar (HAL)" <[EMAIL PROTECTED]> > wrote: > > Hello, > > > > I got the following configuration in the struts-config.xml, > > > > <plug-in className="org.apache.struts.validator.ValidatorPlugIn"> > > <set-property property="pathnames" > > value="WEB-INF/resources/validator/validator-rules.xml, > > WEB-INF/resources/validator/apisValidation.xml" /> > > </plug-in> > > > > when I go to the html page the JavaScript code shows up in the page > > which > > suppose not to be there. When look into the source code through view > > source, > > I see the following code and remaining out side the <script> tag? I am > > not > > sure what configuration I miss?? > > > > <script type="text/javascript" language="JavaScript"> > > <!-- > > var focusControl = > > document.forms["apisLogonForm"].elements["bookingNumber"]; > > > > if (focusControl.type != "hidden") { > > focusControl.focus(); > > } > > // --> > > > > > > thanks > > > > Jay > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > __ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validate Client side(Javascript) code shows up in the page
What version are you using? This sounds like a bug that was fixed some time ago. David --- "Mounagurusamy, Jayakumar (HAL)" <[EMAIL PROTECTED]> wrote: > Hello, > > I got the following configuration in the struts-config.xml, > > > value="WEB-INF/resources/validator/validator-rules.xml, > WEB-INF/resources/validator/apisValidation.xml" /> > > > when I go to the html page the JavaScript code shows up in the page > which > suppose not to be there. When look into the source code through view > source, > I see the following code and remaining out side the tag? I am > not > sure what configuration I miss?? > >