Re: Urgent help needed
It can be done in old versions of internet explorer, but other than that, it can't be done. And in most cases if you think you need it, you're approaching a problem the wrong way. Can you elaborate on what you're trying to achieve? -- "His comrades fought beside him, Van Owen and the rest... But of all the thompson gunners- Roland was the best." Josh McDonald Analyst Programmer Information Technology Ph: 61 7 3006 6460 Email: [EMAIL PROTECTED] >>> [EMAIL PROTECTED] 19/01/2006 4:12:22 pm >>> Hi, Can anybody tell me how can I detect the browser's close button. & which works across all browsers. I have a requirement wherein I have to perform some steps if the browser window is closed. Some code example would be appreciated. Please help me it's urgent. Thanks & Regards, Meenakshi. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** Messages included in this e-mail and any of its attachments are those of the author unless specifically stated to represent WorkCover Queensland. The contents of this message are to be used for the intended purpose only and are to be kept confidential at all times. This message may contain privileged information directed only to the intended addressee/s. Accidental receipt of this information should be deleted promptly and the sender notified. This e-mail has been scanned by Sophos for known viruses. However, no warranty nor liability is implied in this respect.
Urgent help needed
Hi, Can anybody tell me how can I detect the browser's close button. & which works across all browsers. I have a requirement wherein I have to perform some steps if the browser window is closed. Some code example would be appreciated. Please help me it's urgent. Thanks & Regards, Meenakshi. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload via struts
http://wiki.apache.org/struts/StrutsFileUpload Niall - Original Message - From: "David Thielen" <[EMAIL PROTECTED]> Sent: Thursday, January 19, 2006 1:32 AM > Hi; > > Is the best way to do this still FormFile and anyone have a url to a > good/correct example? (I've written tons of enterprise level java code, but > never a file upload or browse button.) > > Thanks - dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
file upload via struts
Hi; Is the best way to do this still FormFile and anyone have a url to a good/correct example? (I've written tons of enterprise level java code, but never a file upload or browse button.) Thanks - dave David Thielen www.windwardreports.com 303-499-2544
how to construct dynamic html:select html:options
my form will construct different number of combo boxes on the screen. for example user will enter 3 and submit the form. then the coming form will show 3 combo boxes. how can i do that with struts. The number of combo boxes is not static so i can not define to action form my combo boxes so can not create setter and getter methods. what is the way for that? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Intro to JSTL
I think that jsp 2.1 is all part of the new j2ee stuff, and has been brought more in line with jsf (1.2). The #{foo.bar} notion from jsf and ${foo.bar} have been aligned with unified EL (expression language), so all those bits of code where you need a bit of room to move can be done using jstl and the form base stuff jsf. Basically I think its the case that JSP2 and JSF will be (kind of) part of the thing, anyone who wants to create a J2EE 1.5 (I think thats the number) will need to support both. In terms of stuts and jstl,as already mentioned, you can do everything but the form stuff (html taglib). There're also nested tags to consider. Nested tags save a lot of jstl to do the same thing. Mark On 1/18/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > On 1/18/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: > > On 1/18/06, Laurie Harper <[EMAIL PROTECTED]> wrote: > > > > > > It might be worth noting that the WebWork integration for Struts Action > > > 2.0 will introduce another expression syntax, OGNL (?). But any > > > investment you make now in JSTL will still be valid as JSTL should work > > > in any JSP regardless of what framework you're using. > > > > > > JSTL expressions are also universal in JSP 2.0 (you can put them anywhere, > > not just in tag attributes of JSTL tags), and are a very similar to value > > binding and method binding expressions in JSF. > > > > I would consider the JSTL tags to be successors for the Struts "bean" and > > "logic" tag libraries, for the most part. They do not deal with HTML tags, > > however (although JSF tags do). > > Now, when JSF is part of J2EE, will JSP be improved or it will > stagnate at JSP 2.0 level? > > In particular I mean what you wrote about, that JSTL does not replace > Struts html tags. That is, JSTL (1) does not generate element names > that reflect hierarchy of backing beans, and (2) it does not process > input by means of BeanUtils or something similar to stuff raw request > parameters back into beans. > > Is something like this on a drawing board for a next JSP spec? > > Michael. > > - > 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]
Re: Intro to JSTL
On 1/18/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: > On 1/18/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > In particular I mean what you wrote about, that JSTL does not replace > > Struts html tags. That is, JSTL (1) does not generate element names > > that reflect hierarchy of backing beans, and (2) it does not process > > input by means of BeanUtils or something similar to stuff raw request > > parameters back into beans. > > > > Is something like this on a drawing board for a next JSP spec? > > > Nope ... that's what JSF is for :-). This is sad. OS/2 deja vu (not that JSP spec is that big a deal comparing to OS/2). Well, I can still use Struts html taglib to generate fields' names, and I can build a request parser on top of BeanUtils and Struts RequestUtils, but it won't be a standard thing. I don't think that stopping JSP development (besides JSF compatibility issues) in favor of JSF is a positive thing. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Intro to JSTL
On 1/18/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: > > > Because JSP 1.2 --> 2.0 was such a big change, there was not a lot of need > to fundamentally enhance JSP this time around. Instead, most of the effort > was expended on unifying the expression language syntax and semantics > between JSF and JSP expressions (so that they always mean the same thing), > as well as extracting out the expression language programmatic APIs into a > separate package so that one could reuse this in a different context. > I should mention one other area that got a *lot* of attention. Because JSF 1.0/1.1 came *after* JSP 2.0 (so we couldn't change it), there were some annoying interoperability problems between JSF and JSP, such as dealing with intermixed template text and component tags, and working with things like JSTL's . To a large extent, these issues have been addressed, so using JSF 1.2 and JSP 2.1 together will feel much more smooth to the developer. Craig
Re: Intro to JSTL
On 1/18/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > On 1/18/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: > > On 1/18/06, Laurie Harper <[EMAIL PROTECTED]> wrote: > > > > > > It might be worth noting that the WebWork integration for Struts > Action > > > 2.0 will introduce another expression syntax, OGNL (?). But any > > > investment you make now in JSTL will still be valid as JSTL should > work > > > in any JSP regardless of what framework you're using. > > > > > > JSTL expressions are also universal in JSP 2.0 (you can put them > anywhere, > > not just in tag attributes of JSTL tags), and are a very similar to > value > > binding and method binding expressions in JSF. > > > > I would consider the JSTL tags to be successors for the Struts "bean" > and > > "logic" tag libraries, for the most part. They do not deal with HTML > tags, > > however (although JSF tags do). > > Now, when JSF is part of J2EE, will JSP be improved or it will > stagnate at JSP 2.0 level? The version of JSF that goes into Java EE 5 is 1.2, and the corresponding JSP version is 2.1. Both are in proposed final draft status today, and are unlikely to change much. Because JSP 1.2 --> 2.0 was such a big change, there was not a lot of need to fundamentally enhance JSP this time around. Instead, most of the effort was expended on unifying the expression language syntax and semantics between JSF and JSP expressions (so that they always mean the same thing), as well as extracting out the expression language programmatic APIs into a separate package so that one could reuse this in a different context. In particular I mean what you wrote about, that JSTL does not replace > Struts html tags. That is, JSTL (1) does not generate element names > that reflect hierarchy of backing beans, and (2) it does not process > input by means of BeanUtils or something similar to stuff raw request > parameters back into beans. > > Is something like this on a drawing board for a next JSP spec? Nope ... that's what JSF is for :-). Michael. Craig - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Intro to JSTL
On 1/18/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: > On 1/18/06, Laurie Harper <[EMAIL PROTECTED]> wrote: > > > > It might be worth noting that the WebWork integration for Struts Action > > 2.0 will introduce another expression syntax, OGNL (?). But any > > investment you make now in JSTL will still be valid as JSTL should work > > in any JSP regardless of what framework you're using. > > > JSTL expressions are also universal in JSP 2.0 (you can put them anywhere, > not just in tag attributes of JSTL tags), and are a very similar to value > binding and method binding expressions in JSF. > > I would consider the JSTL tags to be successors for the Struts "bean" and > "logic" tag libraries, for the most part. They do not deal with HTML tags, > however (although JSF tags do). Now, when JSF is part of J2EE, will JSP be improved or it will stagnate at JSP 2.0 level? In particular I mean what you wrote about, that JSTL does not replace Struts html tags. That is, JSTL (1) does not generate element names that reflect hierarchy of backing beans, and (2) it does not process input by means of BeanUtils or something similar to stuff raw request parameters back into beans. Is something like this on a drawing board for a next JSP spec? Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts JSTL & EL
Servlet 2.4 lets you use EL all over the place in JSPs? That rocks me, can someone please send me a link to some good examples of just how out-there you can get? -Josh -- "His comrades fought beside him, Van Owen and the rest... But of all the thompson gunners- Roland was the best." Josh McDonald Analyst Programmer Information Technology Ph: 61 7 3006 6460 Email: [EMAIL PROTECTED] >>> [EMAIL PROTECTED] 19/01/2006 7:23:17 am >>> On 1/18/06, David Thielen <[EMAIL PROTECTED]> wrote: > Hello; > > I am using: > Tomcat 5.5 - so I assume servlet 2.4 > JSTL - 1.1.2 > Struts - 1.2.8 > > So I assume I can just ignore the old struts-el part and just use the > default struts and jstl jar files? JSTL 1.0 is a separate tag library; the EL is available within JSTL tags only; Struts has its own support for EL in Struts-EL library, as well as DisplayTag. JSTL 1.1 is part of JSP 2.0 spec, so JSP 2.0 container like Tomcat 5 supports JSTL tags out of the box. What is even better, the container supports EL expressions all around your page, not just in JSTL tags, so there is no need in Struts-EL library. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** Messages included in this e-mail and any of its attachments are those of the author unless specifically stated to represent WorkCover Queensland. The contents of this message are to be used for the intended purpose only and are to be kept confidential at all times. This message may contain privileged information directed only to the intended addressee/s. Accidental receipt of this information should be deleted promptly and the sender notified. This e-mail has been scanned by Sophos for known viruses. However, no warranty nor liability is implied in this respect.
Re: Intro to JSTL
On 1/18/06, Laurie Harper <[EMAIL PROTECTED]> wrote: > > It might be worth noting that the WebWork integration for Struts Action > 2.0 will introduce another expression syntax, OGNL (?). But any > investment you make now in JSTL will still be valid as JSTL should work > in any JSP regardless of what framework you're using. JSTL expressions are also universal in JSP 2.0 (you can put them anywhere, not just in tag attributes of JSTL tags), and are a very similar to value binding and method binding expressions in JSF. I would consider the JSTL tags to be successors for the Struts "bean" and "logic" tag libraries, for the most part. They do not deal with HTML tags, however (although JSF tags do). L. Craig
Re: [shale] clay problem with 20060117
> Try adding a span that spans your span :-) > > > > > I think that should fix it for now. It looks like the symbol table is built > after That fixed it, thanks Gary. > I agree that this is a bug and hopefully my diagnosis is correct. Please > file a > bugzilla ticket on this one. I will create a ticket for this one.
Re: Globally available variables
Hello On Jan 18, 2006, at 7:41 AM, Martin Ravell wrote: Is there a simple way to put an object into a globally available spot for access by any current session? Something like the session.setAttribute() method? I have some info that I'd like to be able to load up and then have accessed by any user logged into my app. I'm thinking of a cache type of deal. Ideally writeable by any of the sessions. App is Struts, Hibernate and Spring running on JBoss/Tomcat. Three ideas come to my mind... 1 Use an "Application Context" variable. Watch out! there is thread safety involved 2 Wire it using spring. 3 The old an reliable final public static thing, which might be even easier Any ideas will be much appreciated. Regards Marty Regards Marcelo Morales - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts JSTL & EL
On 1/18/06, David Thielen <[EMAIL PROTECTED]> wrote: > Hello; > > I am using: > Tomcat 5.5 - so I assume servlet 2.4 > JSTL - 1.1.2 > Struts - 1.2.8 > > So I assume I can just ignore the old struts-el part and just use the > default struts and jstl jar files? JSTL 1.0 is a separate tag library; the EL is available within JSTL tags only; Struts has its own support for EL in Struts-EL library, as well as DisplayTag. JSTL 1.1 is part of JSP 2.0 spec, so JSP 2.0 container like Tomcat 5 supports JSTL tags out of the box. What is even better, the container supports EL expressions all around your page, not just in JSTL tags, so there is no need in Struts-EL library. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Intro to JSTL
Wicket had OGNL expressions in 1.0 version, but they decided to drop it, supposedly for performance reasons. I did not follow the details. Michael. On 1/18/06, Laurie Harper <[EMAIL PROTECTED]> wrote: > It might be worth noting that the WebWork integration for Struts Action > 2.0 will introduce another expression syntax, OGNL (?). But any > investment you make now in JSTL will still be valid as JSTL should work > in any JSP regardless of what framework you're using. > > L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [shale] clay problem with 20060117
>From: Ryan Wynn <[EMAIL PROTECTED]> > > I just upgraded to struts-shale-20060117 and I think I may have found > a bug. I am now getting an exception > > component identifier's first character must be a letter or an > underscore ('_')! But it is "@" > > > managed-bean-name="person"> > > allowBody="false" id="@kaolinId"> > > > > > > The weird thing is that I have other components that declare the id as > a symbol like above and they work. I just have a problem with this > one. I ran the code through the debugger and noticed that the > clayContext does not get kaolinId=personGenderId in it's symbol map at > the time of CreateComponentCommand execute. But the display element's > symbol map does contain the symbol kaolinId=personGenderId. The > problem is that replaceMnemonic uses the symbol map from the > clayContext and not from the displayElement. > > Any ideas why this would have worked before but not now? Did > something change that I am not aware of? I made some changes that will be in tonights build that has to do with how the property values are pushed to the components but it won't be in the 0117 nightly. Try adding a span that spans your span :-) I think that should fix it for now. It looks like the symbol table is built after the component id is set which works for the rest of the attributes. The symbol "kaolinId" is assigned to the component that is being created so it doesn't already exist in the context. The id has to be set before the component can be added to the component tree and it seems like the component has to be added to the tree to allow binding value attributes to be set (not 100% on the last part of that one). But, we can move up the logic that builds the symbol table prior to resolving the component id. I agree that this is a bug and hopefully my diagnosis is correct. Please file a bugzilla ticket on this one. > > Thanks, > Ryan Gary
Re: Intro to JSTL
It might be worth noting that the WebWork integration for Struts Action 2.0 will introduce another expression syntax, OGNL (?). But any investment you make now in JSTL will still be valid as JSTL should work in any JSP regardless of what framework you're using. L. Gary Feidt wrote: Thanks for the quick responses, but is using JSTL with Struts the next logical step to using just Struts? Or is Struts going in another direction in the future? Gary [EMAIL PROTECTED] 1/18/2006 8:33:39 AM >>> Gary Feidt wrote the following on 1/18/2006 9:28 AM: I've been developing Struts applications for a couple of years (the last using Struts 1.2.4), but have not used JSTL. Is JSTL the next logical progression? Is there a good place to start learning JSTL? Any good books, or web sites? I liked this book Core JSTL: Mastering the JSP Standard Tag http://www.amazon.com/gp/product/0131001531/sr=1-2/qid=1137594704/ref=pd_bbs_2/103-2890725-8241447?%5Fencoding=UTF8 Also as a quick reference this PDF is great: http://www.jadecove.com/jstl-quick-reference.pdf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts JSTL & EL
Hello; I am using: Tomcat 5.5 - so I assume servlet 2.4 JSTL - 1.1.2 Struts - 1.2.8 So I assume I can just ignore the old struts-el part and just use the default struts and jstl jar files? And for struts tags, do I use just the html (and maybe bean) tags? Thanks - dave Ps - this has all evolved quite a bit in the last 12 - 18 months when I last used it - nice to see stuff advance so fast. David Thielen www.windwardreports.com 303-499-2544 -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 18, 2006 1:31 PM To: Struts Users Mailing List Subject: Re: Struts JSTL & EL On 1/18/06, David Thielen <[EMAIL PROTECTED]> wrote: > I've been looking and can't find it - there is an "EL" version of either > Struts or JSTL from what I rememeber and I think the recommendation is a do > want to use it. What is it, do I want it, and where do I get it? > > Also, any rec's for books on the latest version of Struts, JSTL, and/or JSP? > All my books are for the previous versions. First, what version of Struts, and what version of the Servlet spec are you working with? For Servlet 2.3, you'll want a JSTL 1.0 implementation, and Struts-EL, which is in the 'contrib' directory of the Sruts 1.2 distribution. For Servlet 2.4, it's JSTL 1.1 and you can just use the normal Struts tags since the container will evaluate the expressions. -- Wendy - 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]
RE: Struts JSTL & EL
David Thielen asked: > > I've been looking and can't find it - there is an "EL" > version of either Struts or JSTL from what I rememeber and I > think the recommendation is a do want to use it. What is it, > do I want it, and where do I get it? EL is "Expression Language" and it'll make your JSPs easier and less verbose. See http://struts.apache.org/struts-el/index.html and http://www.phptr.com/articles/article.asp?p=30946&rl=1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts JSTL & EL
On 1/18/06, David Thielen <[EMAIL PROTECTED]> wrote: > I've been looking and can't find it - there is an "EL" version of either > Struts or JSTL from what I rememeber and I think the recommendation is a do > want to use it. What is it, do I want it, and where do I get it? > > Also, any rec's for books on the latest version of Struts, JSTL, and/or JSP? > All my books are for the previous versions. First, what version of Struts, and what version of the Servlet spec are you working with? For Servlet 2.3, you'll want a JSTL 1.0 implementation, and Struts-EL, which is in the 'contrib' directory of the Sruts 1.2 distribution. For Servlet 2.4, it's JSTL 1.1 and you can just use the normal Struts tags since the container will evaluate the expressions. -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Starting with struts again
This is great!! Thanks - dave David Thielen www.windwardreports.com 303-499-2544 -Original Message- From: Rick R [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 17, 2006 7:05 PM To: Struts Users Mailing List Subject: Re: Starting with struts again David Thielen wrote: > Any books, online articles, etc. of what to use and how to structure the > code? I have some examples here http://www.learntechnology.net/ If you've already coded some struts apps before, start with the CRUD lesson. -- Rick - 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]
Struts JSTL & EL
Hi; I've been looking and can't find it - there is an "EL" version of either Struts or JSTL from what I rememeber and I think the recommendation is a do want to use it. What is it, do I want it, and where do I get it? Also, any rec's for books on the latest version of Struts, JSTL, and/or JSP? All my books are for the previous versions. Thanks - dave David Thielen www.windwardreports.com 303-499-2544
[shale] clay problem with 20060117
I just upgraded to struts-shale-20060117 and I think I may have found a bug. I am now getting an exception component identifier's first character must be a letter or an underscore ('_')! But it is "@" This is on the following component. The weird thing is that I have other components that declare the id as a symbol like above and they work. I just have a problem with this one. I ran the code through the debugger and noticed that the clayContext does not get kaolinId=personGenderId in it's symbol map at the time of CreateComponentCommand execute. But the display element's symbol map does contain the symbol kaolinId=personGenderId. The problem is that replaceMnemonic uses the symbol map from the clayContext and not from the displayElement. Any ideas why this would have worked before but not now? Did something change that I am not aware of? Thanks, Ryan
Re: cannot find bean error, when cliked on submit button
fea jabi wrote the following on 1/18/2006 9:24 AM: request.set("List1 ", List1 ); Is this exactly what you are trying to type? (Is there even a set method in Request? Also note the extra space you have before the closing quote.) You want request.setAttribute("List1", List1 ); Don't forget if you use "List1" as the name you'll have to pull it out as "List1" on the JSP. (Side note, in Java instance variables are usually declared starting with a lowercase letter so I'd declare ArrayList Lis1 as 'list1') -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Intro to JSTL
JSTL is a great tool. I have been using it for 1 1/2 years. It is easy to use and learn. Here is even a better book if you want to learn the core language in around 200 pages: http://www.amazon.com/gp/product/0126567557/qid=1137607645/sr=2-3/ref=pd_bbs _b_2_3/102-9083545-6464912?s=books&v=glance&n=283155 __ Senior Programmer Analyst, Tax Distributed Systems Development Tax & Compliance Development, ADP IT Phone: (909) 592-6411 Ext. 3863 e-mail: [EMAIL PROTECTED] -Original Message- From: Gary Feidt [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 18, 2006 7:32 AM To: user@struts.apache.org Subject: Re: Intro to JSTL Thanks for the quick responses, but is using JSTL with Struts the next logical step to using just Struts? Or is Struts going in another direction in the future? Gary >>> [EMAIL PROTECTED] 1/18/2006 8:33:39 AM >>> Gary Feidt wrote the following on 1/18/2006 9:28 AM: > I've been developing Struts applications for a couple of years (the > last using Struts 1.2.4), but have not used JSTL. Is JSTL the next > logical progression? Is there a good place to start learning JSTL? Any > good books, or web sites? I liked this book Core JSTL: Mastering the JSP Standard Tag http://www.amazon.com/gp/product/0131001531/sr=1-2/qid=1137594704/ref=pd_bbs _2/103-2890725-8241447?%5Fencoding=UTF8 Also as a quick reference this PDF is great: http://www.jadecove.com/jstl-quick-reference.pdf -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Confidentiality Statement: This email/fax, including attachments, may include confidential and/or proprietary information and may be used only by the person or entity to which it is addressed. If the reader of this email/fax is not the intended recipient or his or her agent, the reader is hereby notified that any dissemination, distribution or copying of this email/fax is prohibited. If you have received this email/fax in error, please notify the sender by replying to this message and deleting this email or destroying this facsimile immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, notify the sender immediately by return email and delete the message and any attachments from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot find bean error, when cliked on submit button
thanks for sugesting the article. I did implement the way you suggested. Thanks. From: Rick Reumann <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: Struts Users Mailing List Subject: Re: cannot find bean error, when cliked on submit button Date: Tue, 17 Jan 2006 16:08:01 -0500 fea jabi wrote the following on 1/17/2006 3:40 PM: The JSP displayes fine with all the values in it. This JSP has required fields in it. Used validator.xml to define al lthe required fields. There is a Save Button which is the submit button in the JSP. When clicked on Save want the validations to be done and be in the same JSP. When Clicked on Save, it is not going into the DispatchFacilityAction But getting the error in JSP Cannot find bean under name List1 -- This List1 was in the request when the JSP originally displayed. Why is this? My guess is validation is failing and you are being returned to the page where your List no longer is in scope. This is a classic problem when you do not either a) use Session scope for your form or b) do not call your form's validate method manually or c) aren't providing a way in the reset method of your form bean to populate the request. I like solve it with option b. More on it here: http://www.learntechnology.net/validate-manually.do -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Forward after getOutputStream
Could someone please direct me to the proper way to forward a response *after* a call is made to response.getOutputStream( )? Thanks, Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Modal window
FYI, there are some important details about this, should you decide to use it... * This is different than using window.open() in that the child window has no relationship to the parent, i.e., you can't script from one to the other in either direction. The only exception is that you can do window.returnValue in the child, and this value will be the return value of the call to showModalDialog(). * You can pass parameters to the child via the second parameter to showModalDialog(). It can a string, array, etc. Actually, I suppose you could pass window to it and be able to script against that and get around that first rule, but I'm not sure about that. In any case, the parameters will be exposed in the child via window.dialogArguments. * The third parameter are various feature settings of the window. They include center (yes}no), dialogheight, dialogLeft, dialogTop, dialogWidth, edge (raised|sunken), help (yes|no), resizable (yes|no) and status (yes|no). * There is a corresponding showModelessDialog() method, just for completeness. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Wed, January 18, 2006 12:18 pm, Frank W. Zammetti said: > Hi Rafael, > > You can do this via scripting, but it is unfortunately AFAIK an IE-only > trick... > > window.showModalDialog("http://www.google.com","","dialogWidth:500px;dialogHeight:500px";); > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > AIM: fzammetti > Yahoo: fzammetti > MSN: [EMAIL PROTECTED] > > On Wed, January 18, 2006 12:05 pm, Rafael Taboada said: >> Hi folks. I have my app where a jsp calls another jsp.. "mother" jsp >> calls >> a >> "son" jsp where the user can modify some settings.. >> >> I need the user can't use "mother" jsp till "son" jsp is closed... >> Something >> like modal and nomodal window.. >> >> Could u know kow I can do that?.. any code? >> >> Thanks in advance >> >> -- >> Rafael Taboada >> Software Engineer >> >> Cell : +511-97753290 >> >> "No creo en el destino pues no me gusta tener la idea de controlar mi >> vida" >> > > > - > 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]
Re: Modal window
Hi Rafael, You can do this via scripting, but it is unfortunately AFAIK an IE-only trick... window.showModalDialog("http://www.google.com","","dialogWidth:500px;dialogHeight:500px";); -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Wed, January 18, 2006 12:05 pm, Rafael Taboada said: > Hi folks. I have my app where a jsp calls another jsp.. "mother" jsp calls > a > "son" jsp where the user can modify some settings.. > > I need the user can't use "mother" jsp till "son" jsp is closed... > Something > like modal and nomodal window.. > > Could u know kow I can do that?.. any code? > > Thanks in advance > > -- > Rafael Taboada > Software Engineer > > Cell : +511-97753290 > > "No creo en el destino pues no me gusta tener la idea de controlar mi > vida" > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Modal window
Hi folks. I have my app where a jsp calls another jsp.. "mother" jsp calls a "son" jsp where the user can modify some settings.. I need the user can't use "mother" jsp till "son" jsp is closed... Something like modal and nomodal window.. Could u know kow I can do that?.. any code? Thanks in advance -- Rafael Taboada Software Engineer Cell : +511-97753290 "No creo en el destino pues no me gusta tener la idea de controlar mi vida"
Re: Intro to JSTL
On 1/18/06, Gary Feidt <[EMAIL PROTECTED]> wrote: > Hello Everybody, > > I've been developing Struts applications for a couple of years (the > last using Struts 1.2.4), but have not used JSTL. Is JSTL the next > logical progression? Is there a good place to start learning JSTL? Any > good books, or web sites? All the standard question to get started. Using JSTL instead of Struts tags makes sense because: * JSTL is a standard, while having similar functionality * JSTL does not depend on Struts, so you can preserve your pages if you decide to switch from Struts to something else * Imho JSTL have less idiosyncrasies than Struts tags. One thing to remember is that Struts html tags create proper element name with dots, brackets and stuff, so it can be processed on input, and your nested objects can be populated. JSTL does not do that, which is the suckiest part of it. It allows you only to display, but not to input. To do input, you are on your own, you have to generate proper element names and use BeanUtils or something similar to populate your objects. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RV: Array of a java bean and Dynamic Form Beans
Néstor Boscán wrote the following on 1/18/2006 10:48 AM: set ("variables", new VariableTo [count]); } } Now the first time I call the JSP it works fine. I have a refresh button that refreshes the page. The reset method is called with no problems and then I get the exception java.lang.IllegalArgumentException: No bean specified. Now I did some test using session scope and it seems that if I put the reset method I also get the exception. There is something in the set ("variables", new VariableTo [count]) method that Struts doesn't like. A couple things to try... in your constructor: public FormulaForm() { super(); //possibly that's needed to set up your properties? } I'm not a guru with the Dyna stuff. Typically it doesn't always really save your that much. It saves you from having to create some getters and setters, but any IDE can do that in a breeze. I'd stick to using a regular ActionForm, but I'm guessing someone can help you here. Are you positive it's in the "set ("variables", new VariableTo [count]);" section? If you comment that out and run the app, the app should work but you'll get that IndexOutOfBounds error (Is that what happens when you comment that line out?) -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [shale] clay renderId
Hi >There seems to be some problems with this aproach with respect to name >resolving. > >Scenario : @managed-bean-name is a backing bean X, the table that you want to >display (see: Outer HTML template include) is from a bean Person as person on >X, >and has properties firstName and middleName and so on >Now doing this: >property="person.firstName" size="20" maxlength="30" >required="true" immediate="false"/> >results in: > >Subsequent characters of component identifier must be a letter, a digit, an >underscore ('_'), or a dash ('-')! But component identifier contains "." >trying property="['person.firstName']" it also complains You are using the property symbol in this example to populate the JSF component id. The component id cannot have a dot character. You will want to use the @managed-bean-name symbol for the "person" mnemonic. Symbols are scoped from the out inwards. What I mean by this is that a symbol like managed-bean-name is defined at the page/clay component sub tree. All components under that subtree managed by Clay will inherit the symbol defined at the outer scope. Each component can choose to override the symbol which will propagate to all its child components. So, if you are using full Clay html views, the defaut for the managed bean name is derived from the view id. This is a core mechanism in Shale used to map a view with a view controller. So, if your view was /symbols/page1.xml, the default managed-bean-name symbol would be "symbols$page1". But, if you have part of the page that you would like to map to another managed bean, you can override it at a outer scope. Consider the following: Any suggestions? >Hermod > The example I gave you is now part of the Shale use cases. From the menu page, it's under the "Symbols" link. It demonstrates how you can use symbols with generic HTML templates layouts (tiles like). These HTML templates can be loaded from the classpath or context root. I also added some simple dataTable components to the rolodex use case. There is a web pager component and column sorter. They show how to use the new shale remoting to load images from the classpath. I think these components might also show how simple JSF component authoring can be. Gary
Re: Action Framework: simultaneous requests on the same path, in the same session.
On 1/18/06, Joe Germuska <[EMAIL PROTECTED]> wrote: > >but I wonder if that's a good idea. > >Am I missing something here? Is there a way to ensure that the > >action is called each time with the set of parameters it was > >supposed to receive? > > If your forms are request scoped, there should be no problem; a new > object would be created each time. > > If you must use session scoped forms, it's not so easy, as the > "token" mechanism for dealing with "double-posts" is not automatic; > you must invoke it from your action, which means that the > population/corruption may have already happened. Token is unrelated to this problem. Token prevents double submit (on server level). What he has is "populate, populate, execute, execute" instead of "populate, execute, populate, execute". The synchronization is definetely in order, but on a session, not on a form, I guess. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action Framework: simultaneous requests on the same path, in the same session.
Frank W. Zammetti wrote: Hi Frank, [...] But then again, this would only occur for session-scoped forms as request-scoped forms would be created anew with each request. Ahem.. I totally forgot about the scoping problem. Dunno why, but the ability to define forms as being request-scope or session scope _totally_ vanished from my mind. Of course, just declaring the form bean as being request scope fixes the problem. [...] Without actually confirming any of this, what you describe seems logical. With no concurrency control on the form object, the second request could theoretically occur at just the right time so as to overwrite the values in the form that the first request put there and only then is execute() called (that's why I asked which set of parameters you see... if its the second then it kind of confirms this... if its the first, I'm confused!) The timing would have to be rather perfect though, so another good question to ask is whether you see this consistently. It was not consistent. It happened randomly. If you do, I would tend to think something else is going on because it doesn't strike me as likely that the timing would be that perfect every single time. But again, this should only apply to a session-scoped form. I can't see how it could possibly happen for request-scoped forms. Indeed, it's nothing but a scope problem.. Well, except for performance considerations, I can't think of any reason it would be a bad idea. You would hold up that second request, and any others that need the same form (which probably would only happen if you had multiple windows open), so if that is a normal function of your application then it might not be desirable. Otherwise, it doesn't strike me as a problem per se. [...] Hope it helps! :) It sure does! :) Thank you and Joe Germuska for providing such quick help Best regards, Arnaud - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fwd: Re: file download problem
I tried content type as application/msword but it did not help .Any other ways to solve this problem? thanks & regards Note: forwarded message attached. Yahoo! Photos Got holiday prints? See all the ways to get quality prints in your hands ASAP.--- Begin Message --- Just a thought. Isn't there a specific content type for .doc documents? That might solve your problem.I looked it up. .doc documents are "application/msword". Try that and see what happens. I am actually building a list of all the extensions and their content types. Hope this helps. On 1/18/06, temp temp <[EMAIL PROTECTED]> wrote: > I am using struts action class to download a file . > > > Here is the action class > > public ActionForward execute(ActionMapping aActionMapping, ActionForm > aActionForm, >HttpServletRequest aHttpServletRequest, HttpServletResponse > aHttpServletResponse) > throws Exception { > > aHttpServletResponse.setContentType("application/octet-stream"); > aHttpServletResponse.setHeader("pragma", "no-cache"); > aHttpServletResponse.setHeader("Cache-Control","cache"); > aHttpServletResponse.setHeader("Cache-Control","must-revalidate"); > > Integer aSysAttachId = new > Integer(aHttpServletRequest.getParameter(IWeb.SYS_ATTACH_ID)); >aHttpServletResponse.setHeader("Content-Disposition", "attachment; > filename=\"" +aHttpServletRequest.getParameter(IWeb.FILE_NAME)+ "\""); > > download(aApplicationInfoDelegate.getApplicationAttachemntFile(aSysAttachId),aHttpServletResponse); > return null; > } > > private void download(byte[] byteArray, HttpServletResponse > httpServletResponse) > throws IOException, SQLException { > try { >BufferedOutputStream aBufferedOutputStream =new > BufferedOutputStream(httpServletResponse.getOutputStream()); > aBufferedOutputStream.write(byteArray,0,byteArray.length); > aBufferedOutputStream.close(); > } catch (Exception e) { > throw new IllegalArgumentException(e.getMessage()); > } > } > > My problem is with all ".doc "files and some ".pdf" files .When user > clicks on the link , the browser opens a dialog box with the option to save > or open the file .Suppose he has choosen a ".doc" file to open , the > browser opens micorsoft word with an error message > > Word experienced an error tying open the file. > Try these suggestions. > * Chaeck the file permissions for the document or drive. > * Make sure there is sufficient free memory and disk space > * Open the file with the text Recovery converter. > > > I also had other files like .xls and lot of .pdf and there is no problem > with these files but with all .doc files. > Can Somebody guide with this issue. > Thanks & Regards > > > > > > - > Yahoo! Photos > Ring in the New Year with Photo Calendars. Add photos, events, holidays, > whatever. > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- End Message --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action Framework: simultaneous requests on the same path, in the same session.
Hi Arnaud, On Wed, January 18, 2006 10:56 am, Arnaud Diederen said: > > Hello, > > [I've searched the web and the archives, but couldn't find anything > useful (I'm not sure the terms of my queries were appropriate/efficient)] > > My problem is this (I'm using struts 1.2.7): > > When someone uses my webapp, some javascript sometimes triggers twice > the same action in a very short amount of time (I mean: two POST > requests are issued that call the same action's execute()) _with > different parameters_. I would start by asking if this is an app-level problem... is this quick or double-submit, however you look at it, something you expect and have to allow for? I am having trouble imagining a scenario where you would want to allow this, but that doesn't mean it isn't legitimate. Is it? :) > I noticed that the action sometimes receives the same set of parameters > twice. Further investigation confirms that the form is populated for the > first time, then for the second time and that, only then, the execute() > method is called twice. That is due to thread concurrency, I suppose. When the Action gets the same set of parameters, can you tell if its the first set or the second set? I would tend to expect to only ever see the second set. But then again, this would only occur for session-scoped forms as request-scoped forms would be created anew with each request. > In the RequestProcessor, I noticed there's no synchronization on the > form, in the process() method, that ensures that the form is populated > and then the action executed with the set of parameters it was supposed > to receive. > I did a little modification in RequestProcessor (actually, I extended > it) and came up with: Without actually confirming any of this, what you describe seems logical. With no concurrency control on the form object, the second request could theoretically occur at just the right time so as to overwrite the values in the form that the first request put there and only then is execute() called (that's why I asked which set of parameters you see... if its the second then it kind of confirms this... if its the first, I'm confused!) The timing would have to be rather perfect though, so another good question to ask is whether you see this consistently. If you do, I would tend to think something else is going on because it doesn't strike me as likely that the timing would be that perfect every single time. But again, this should only apply to a session-scoped form. I can't see how it could possibly happen for request-scoped forms. > original code: > > ActionForm form = processActionForm(request, response, mapping); > processPopulate(request, response, form, mapping); >... > // Call the Action instance itself > ActionForward forward = > processActionPerform(request, response, > action, form, mapping); > > > > modified code: > >ActionForm form = processActionForm(request, response, mapping); >synchronized (form) { > processPopulate(request, response, form, mapping); >... > // Call the Action instance itself > ActionForward forward = > processActionPerform(request, response, > action, form, mapping); >} > > > but I wonder if that's a good idea. Well, except for performance considerations, I can't think of any reason it would be a bad idea. You would hold up that second request, and any others that need the same form (which probably would only happen if you had multiple windows open), so if that is a normal function of your application then it might not be desirable. Otherwise, it doesn't strike me as a problem per se. > Am I missing something here? Is there a way to ensure that the action is > called each time with the set of parameters it was supposed to receive? Make sure the forms a request-scoped. But, aside from all the Struts-specific aspects, I'd first be asking if this is a situation that you should be disallowing in the first place... are these POSTs being made as a result of some scripting or by users clicking things? In either case, my first suggestion would be some script that makes this never happen in the first place (I'm assuming it isn't a requirement here). > Thank you for any information! Hope it helps! :) > Best regards, > Arnaud Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Unit test struts application
StrutsTestCase tests the navigation of your web app. If you cannot separate the GUI from the business logic, then you cannot use the mock objects approach and would have to fall back on the Cactus approach. Unless your business layer is better organized than your GUI layer apparently is, you probably won't be able to hook Cactus in for testing, either. Apps that follow the "big ball of mud" design pattern (see http://www.joeyoder.com/papers/patterns/BBOM/mud.html) pretty much require testing at the level of the entire application, with all of the attendant difficulties. I would suggest isolating your business logic behind a facade. - George > -Original Message- > From: Kanuri, Chand [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 18, 2006 10:29 AM > To: 'Struts Users Mailing List' > Subject: RE: Unit test struts application > > > George, > > i am using it and one of my controllers have business logic > in it and the test is not working. can i seperate the > controller from the action while testing using StrutsTestCase? > > many thanks > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: 18 January 2006 15:20 > To: user@struts.apache.org > Subject: RE: Unit test struts application > > > StrutsTestCase (http://strutstestcase.sourceforge.net/) works > well for well-factored struts applications. It does not work > so well where developers have not layered the application, > and have shoved business logic into the actions, controllers, > and JSPs. > > - George >http://www.idiacomputing.com > > Richard Jason R. Raquepo asked: > > > > how do you test your struts application? can you test up to > > the action > > level maybe using mocks? can you share your experience and > > maybe tools > > you use. > > > > - > 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] > > > This e-mail (and any attachments) may contain privileged > and/or confidential information. If you are not the intended > recipient please do not disclose, copy, distribute, > disseminate or take any action in reliance on it. If you have > received this message in error please reply and tell us and > then delete it. Should you wish to communicate with us by > e-mail we cannot guarantee the security of any data outside > our own computer systems. For the protection of Legal & > General's systems and staff, incoming emails will be > automatically scanned. > > Any information contained in this message may be subject to > applicable terms and conditions and must not be construed as > giving investment advice within or outside the United Kingdom. > > The following companies are subsidiary companies of the Legal > & General Group Plc which are authorised and regulated by the > Financial Services Authority for advising and arranging the > products shown: Legal & General Partnership Services Limited > (insurance and mortgages), Legal & General Insurance Limited > (insurance), Legal & General Assurance Society Limited > (life assurance, pensions and investments), Legal & General > Unit Trust Managers Limited and Legal & General Portfolio > Management Services Limited (investments). > > They are registered in England under numbers shown. > The registered office is Temple Court, 11 Queen Victoria > Street, London EC4N 4TP. > > Legal & General Partnership Services Limited: 5045000 Legal & > General Assurance Society Limited: 166055 Legal & General > (Unit Trust Managers) Limited: 1009418 Legal & General > (Portfolio Management Services) Limited: 2457525 Legal & > General Insurance Limited: 423930 > > They are registered with the Financial Services Authority > under numbers shown. You can check this at www.fsa.gov.uk/register > > Legal & General Partnership Services Limited: 300792 Legal & > General Assurance Society Limited: 117659 Legal & General > (Unit Trust Managers) Limited: 119273 Legal & General > (Portfolio Management Services) Limited: 146786 Legal & > General Insurance Limited: 202050 > > > - > 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]
Re: Action Framework: simultaneous requests on the same path, in the same session.
but I wonder if that's a good idea. Am I missing something here? Is there a way to ensure that the action is called each time with the set of parameters it was supposed to receive? If your forms are request scoped, there should be no problem; a new object would be created each time. If you must use session scoped forms, it's not so easy, as the "token" mechanism for dealing with "double-posts" is not automatic; you must invoke it from your action, which means that the population/corruption may have already happened. If you are actually using JavaScript to submit these forms, then I'd suggest adding some JavaScript which sets a "submitted" flag and tests it before actually causing a submit, setting it to true after it does submit. I think that in a single page (not frame), things should be single-threaded so that this is relatively safe. The other solution would be to extend the RequestProcessor to add a token validation step earlier than in the Action's execute() method. Actually, in Struts 1.3 this would be easier for all the reasons that Struts 1.3 makes changing the request processing path easier. You could make a "validate token" command which would check the ActionMapping to see if it had been configured to "require valid token" (probably using Struts 1.3's "arbitrary config properties") and if that configuration had been set, you'd do the validation (which can be done using ActionContext), and if the validation failed, you'd probably fall back to using some other configuration property of the ActionMapping to determine the fallback action. It actually seems like something which would be useful to add to the Struts 1.3 core, and perhaps even into the default chain. Unfortunately, I don't have time to code up something like that this month, but if you're interested, I can at least try to field basic questions here on the list (and hopefully so can others!) The use of tokens in Struts 1.3 is probably something which could use a bit of a workout anyway; I can't remember why offhand, but I had some questions about how I adapted the processing model from Action to ActionContext and I haven't had an opportunity to really give that a workout myself. Joe -- Joe Germuska [EMAIL PROTECTED] * http://blog.germuska.com "You really can't burn anything out by trying something new, and even if you can burn it out, it can be fixed. Try something new." -- Robert Moog - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Action Framework: simultaneous requests on the same path, in the same session.
Hello, [I've searched the web and the archives, but couldn't find anything useful (I'm not sure the terms of my queries were appropriate/efficient)] My problem is this (I'm using struts 1.2.7): When someone uses my webapp, some javascript sometimes triggers twice the same action in a very short amount of time (I mean: two POST requests are issued that call the same action's execute()) _with different parameters_. I noticed that the action sometimes receives the same set of parameters twice. Further investigation confirms that the form is populated for the first time, then for the second time and that, only then, the execute() method is called twice. That is due to thread concurrency, I suppose. In the RequestProcessor, I noticed there's no synchronization on the form, in the process() method, that ensures that the form is populated and then the action executed with the set of parameters it was supposed to receive. I did a little modification in RequestProcessor (actually, I extended it) and came up with: original code: ActionForm form = processActionForm(request, response, mapping); processPopulate(request, response, form, mapping); ... // Call the Action instance itself ActionForward forward = processActionPerform(request, response, action, form, mapping); modified code: ActionForm form = processActionForm(request, response, mapping); synchronized (form) { processPopulate(request, response, form, mapping); ... // Call the Action instance itself ActionForward forward = processActionPerform(request, response, action, form, mapping); } but I wonder if that's a good idea. Am I missing something here? Is there a way to ensure that the action is called each time with the set of parameters it was supposed to receive? Thank you for any information! Best regards, Arnaud - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Enabling links according to user's authorization
On 1/18/06, Rivka Shisman <[EMAIL PROTECTED]> wrote: (Rearranged a bit) > 3. Is there a easy way to adjust struts-menu so it will take the > menu-to-roles data from a my database instead of from menu-config? Apparently this is possible-- the release notes for version 2.2 mention it: http://struts-menu.sourceforge.net/status.html Keep in mind the example we're discussing is from a years-old app that has all sorts of weird restrictions due to our other non-standard systems. And I'm not sure I'd do it the same way now. :) If you can use the standard form-based authentication and user roles, then I'd definitely advise doing that. But to answer your questions... > 1. Does the getRoles() method in the BenWebUser Class get the roles for > a specific menu from the menu-config? No, the user's roles are retrieved from a database and put into the 'user' object when it is created. The roles for a specific menu are in menu-config.xml. > 2. How do you secure your web app if not by container security? only by > hiding menus? What if someone knows the url to the hidden menu? There is a Filter that redirects to a campus-wide authentication system. When you log in there, that system redirects back to my app. The Filter then creates the 'user' object and lets the (wrapped) request continue through. Then the menus are hidden, then the Action itself checks the user's permissions before executing and returning a result. This part needs rewriting... it was done before I added Struts Menu. There's a 'roles' tag on in struts-config.xml that might also be useful. -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RV: Array of a java bean and Dynamic Form Beans
Hi Rick Thanks again for the quick replies. Ok, basically I have a DTO called VaribleTo which has name, dataType and value attributes. Then I define my dynamic form bean: Ok and I'm displaying the content using the struts tags: This works fine. I can load the variables attribute in an action class and it gets loaded on the JSP. I added the reset method to the FormulaForm class: public class FormulaForm extends DynaActionForm { public FormulaForm() { } public void reset (ActionMapping mapping, HttpServletRequest request) { Enumeration enum = request.getParameterNames (); String name; int count = 0; while (enum.hasMoreElements ()) { name = (String) enum.nextElement (); if (name.startsWith ("variables") && name.endsWith ("name")) count++; } set ("variables", new VariableTo [count]); } } Now the first time I call the JSP it works fine. I have a refresh button that refreshes the page. The reset method is called with no problems and then I get the exception java.lang.IllegalArgumentException: No bean specified. Now I did some test using session scope and it seems that if I put the reset method I also get the exception. There is something in the set ("variables", new VariableTo [count]) method that Struts doesn't like. Regards, Néstor Boscán -Mensaje original- De: Rick Reumann [mailto:[EMAIL PROTECTED] Enviado el: Wednesday, January 18, 2006 11:21 AM Para: Struts Users Mailing List Asunto: Re: RV: Array of a java bean and Dynamic Form Beans Néstor Boscán wrote the following on 1/18/2006 10:05 AM: > Hi Rick > > If I comment the reset method I get: > > java.lang.ArrayIndexOutOfBoundsException: 0 at I'm assuming you get that when you submit your form? Some of these things have to be broken down into baby stteps since sometimes the error you think you are getting is related to something else, that is why I want to make sure you are at least first getting to the form and having it display correctly first. Post the snippets of source code that I mentioned in the last post. -- Rick - 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]
Re: Intro to JSTL
Gary Feidt wrote: > Thanks for the quick responses, but is using JSTL with Struts the next > logical step to using just Struts? Depends. It's a step up from using many of the Struts taglibs (logic:iterate, etc.) > Or is Struts going in another direction in the future? > Depends. But be aware that the direction _Struts_ takes isn't really part of JSTL, which is presentation-side. Learning JSTL takes an afternoon for the most common bits. Can't think of a good reason not to learn the standard tag library; it'll be around for a bit yet. Dave Lead Architect, COBOL#.NET - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Globally available variables
I agree, application context is a good answer to this question, and its what I use today for most shared data of any type. But, don't forget one simpler answer: static! For a while, I was in the habit of having an AppConfig object that was just a typical bean with private fields, accessors and mutators, but everything was static. It would usually include a configureApp() method that knew how to read in the relevant configuration file and populate the bean. I would usually call configureApp() from a Struts plug-in or session listener. Many times I would have the code that actually read the configuration outside the AppConfig class, so AppConfig was actually nothing but static fields and static accessors and mutators. This works just fine if you won't be changing the values after the initial load. If you have that requirement though, you will have to deal with the data integrity issues yourself. So, it might not be a good idea in every case... but, synchronization isn't the performance-killer it used to be, so synchronizing all the methods of this class shouldn't automatically be considered a bad idea, but that's a decision for you to make :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Wed, January 18, 2006 7:39 am, Vidya \(Suvarna\) Mahavadi said: > Putting variables in application context should work for you. You can > get/set those values as long as the application is active. > > Vidya > > -Original Message- > From: Martin Ravell [mailto:[EMAIL PROTECTED] > Sent: Wednesday 18 January 2006 14:19 > To: 'Struts Users Mailing List' > Subject: RE: Globally available variables > >>-Original Message- >>From: ALEX HYDE [mailto:[EMAIL PROTECTED] >>Sent: Wednesday, 18 January 2006 10:47 PM >>To: Struts Users Mailing List >>Subject: Re: Globally available variables >> >>Can't you put it in the application context instead of all the > sessions? >> > > I don't know. Will look into this but is it possible to have a session > write > an object to this app context and have another session see the result? > > I had a suspicion that stuff in the application context was setup during > the > app being deployed and could not be changed? > > > Regards > Marty > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > This message and any attachments are confidential and intended solely for > the addressee. If you have received this message in error, please notify > Discovery immediately, telephone number +27 11 529 2888. Any unauthorised > use; alteration or dissemination of the contents of this email is strictly > prohibited. In no event will Discovery or the sender be liable in any > manner whatsoever to any person for any loss or any direct, indirect, > special or consequential damages arising from use of this email or any > linked website, including, without limitation, from any lost profits, > business interruption, loss of programmes or other data that may be stored > on any information handling system or otherwise from any assurance that > this email is virus free even if Discovery is expressly advised of the > possibility of such damages. Discovery is an Authorised Financial Services > Provider. > > - > 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]
Re: Intro to JSTL
> Gary Feidt wrote the following on 1/18/2006 9:28 AM: > > I've been developing Struts applications for a couple of years (the > last using Struts 1.2.4), but have not used JSTL. Is JSTL the next > logical progression? Is there a good place to start learning JSTL? Any > good books, or web sites? JSTL is, IMO, one of those things that isn't revolutionary and isn't likley to substantially change how you do things, but it *is* a nice addition to the toolbox. I haven't been using it for too long myself to be honest, but I have done a few smaller apps with it and am right now in the process of retrofiting a rather large app with it (one that hadn't been using even the Struts tags). It definitely helps, so in answer to your question about whether its the next logical progression, I'd say yes, if you've been using Struts for a while it probably is. You should be able to get away from all the taglibs except HTML by using JSTL, and by itself that's a nice progression. Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Intro to JSTL
Gary Feidt wrote the following on 1/18/2006 10:32 AM: Thanks for the quick responses, but is using JSTL with Struts the next logical step to using just Struts? Or is Struts going in another direction in the future? JSTL doesn't have much to do with Struts. It's just a standard tag library for use on any JSP page. In the past, there wasn't a defined JSTL library of tags to use so Struts provided some tags that helped out in this regard (iterate, bean:write, etc). When you use JSTL in your JSPs and you are using Struts for your framework you still are using "just Struts." You just aren't using a few of the tags on your JSP that you might have used in the past. It's not really anything major. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file download problem
Just a thought. Isn't there a specific content type for .doc documents? That might solve your problem.I looked it up. .doc documents are "application/msword". Try that and see what happens. I am actually building a list of all the extensions and their content types. Hope this helps. On 1/18/06, temp temp <[EMAIL PROTECTED]> wrote: > I am using struts action class to download a file . > > > Here is the action class > > public ActionForward execute(ActionMapping aActionMapping, ActionForm > aActionForm, >HttpServletRequest aHttpServletRequest, HttpServletResponse > aHttpServletResponse) > throws Exception { > > aHttpServletResponse.setContentType("application/octet-stream"); > aHttpServletResponse.setHeader("pragma", "no-cache"); > aHttpServletResponse.setHeader("Cache-Control","cache"); > aHttpServletResponse.setHeader("Cache-Control","must-revalidate"); > > Integer aSysAttachId = new > Integer(aHttpServletRequest.getParameter(IWeb.SYS_ATTACH_ID)); >aHttpServletResponse.setHeader("Content-Disposition", "attachment; > filename=\"" +aHttpServletRequest.getParameter(IWeb.FILE_NAME)+ "\""); > > download(aApplicationInfoDelegate.getApplicationAttachemntFile(aSysAttachId),aHttpServletResponse); > return null; > } > > private void download(byte[] byteArray, HttpServletResponse > httpServletResponse) > throws IOException, SQLException { > try { >BufferedOutputStream aBufferedOutputStream =new > BufferedOutputStream(httpServletResponse.getOutputStream()); > aBufferedOutputStream.write(byteArray,0,byteArray.length); > aBufferedOutputStream.close(); > } catch (Exception e) { > throw new IllegalArgumentException(e.getMessage()); > } > } > > My problem is with all ".doc "files and some ".pdf" files .When user > clicks on the link , the browser opens a dialog box with the option to save > or open the file .Suppose he has choosen a ".doc" file to open , the > browser opens micorsoft word with an error message > > Word experienced an error tying open the file. > Try these suggestions. > * Chaeck the file permissions for the document or drive. > * Make sure there is sufficient free memory and disk space > * Open the file with the text Recovery converter. > > > I also had other files like .xls and lot of .pdf and there is no problem > with these files but with all .doc files. > Can Somebody guide with this issue. > Thanks & Regards > > > > > > - > Yahoo! Photos > Ring in the New Year with Photo Calendars. Add photos, events, holidays, > whatever. > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Intro to JSTL
Thanks for the quick responses, but is using JSTL with Struts the next logical step to using just Struts? Or is Struts going in another direction in the future? Gary >>> [EMAIL PROTECTED] 1/18/2006 8:33:39 AM >>> Gary Feidt wrote the following on 1/18/2006 9:28 AM: > I've been developing Struts applications for a couple of years (the > last using Struts 1.2.4), but have not used JSTL. Is JSTL the next > logical progression? Is there a good place to start learning JSTL? Any > good books, or web sites? I liked this book Core JSTL: Mastering the JSP Standard Tag http://www.amazon.com/gp/product/0131001531/sr=1-2/qid=1137594704/ref=pd_bbs_2/103-2890725-8241447?%5Fencoding=UTF8 Also as a quick reference this PDF is great: http://www.jadecove.com/jstl-quick-reference.pdf -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Confidentiality Statement: This email/fax, including attachments, may include confidential and/or proprietary information and may be used only by the person or entity to which it is addressed. If the reader of this email/fax is not the intended recipient or his or her agent, the reader is hereby notified that any dissemination, distribution or copying of this email/fax is prohibited. If you have received this email/fax in error, please notify the sender by replying to this message and deleting this email or destroying this facsimile immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Unit test struts application
George, i am using it and one of my controllers have business logic in it and the test is not working. can i seperate the controller from the action while testing using StrutsTestCase? many thanks -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 18 January 2006 15:20 To: user@struts.apache.org Subject: RE: Unit test struts application StrutsTestCase (http://strutstestcase.sourceforge.net/) works well for well-factored struts applications. It does not work so well where developers have not layered the application, and have shoved business logic into the actions, controllers, and JSPs. - George http://www.idiacomputing.com Richard Jason R. Raquepo asked: > > how do you test your struts application? can you test up to > the action > level maybe using mocks? can you share your experience and > maybe tools > you use. - 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] This e-mail (and any attachments) may contain privileged and/or confidential information. If you are not the intended recipient please do not disclose, copy, distribute, disseminate or take any action in reliance on it. If you have received this message in error please reply and tell us and then delete it. Should you wish to communicate with us by e-mail we cannot guarantee the security of any data outside our own computer systems. For the protection of Legal & General's systems and staff, incoming emails will be automatically scanned. Any information contained in this message may be subject to applicable terms and conditions and must not be construed as giving investment advice within or outside the United Kingdom. The following companies are subsidiary companies of the Legal & General Group Plc which are authorised and regulated by the Financial Services Authority for advising and arranging the products shown: Legal & General Partnership Services Limited (insurance and mortgages), Legal & General Insurance Limited (insurance), Legal & General Assurance Society Limited (life assurance, pensions and investments), Legal & General Unit Trust Managers Limited and Legal & General Portfolio Management Services Limited (investments). They are registered in England under numbers shown. The registered office is Temple Court, 11 Queen Victoria Street, London EC4N 4TP. Legal & General Partnership Services Limited: 5045000 Legal & General Assurance Society Limited: 166055 Legal & General (Unit Trust Managers) Limited: 1009418 Legal & General (Portfolio Management Services) Limited: 2457525 Legal & General Insurance Limited: 423930 They are registered with the Financial Services Authority under numbers shown. You can check this at www.fsa.gov.uk/register Legal & General Partnership Services Limited: 300792 Legal & General Assurance Society Limited: 117659 Legal & General (Unit Trust Managers) Limited: 119273 Legal & General (Portfolio Management Services) Limited: 146786 Legal & General Insurance Limited: 202050 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RV: Array of a java bean and Dynamic Form Beans
Néstor Boscán wrote the following on 1/18/2006 10:05 AM: Hi Rick If I comment the reset method I get: java.lang.ArrayIndexOutOfBoundsException: 0 at I'm assuming you get that when you submit your form? Some of these things have to be broken down into baby stteps since sometimes the error you think you are getting is related to something else, that is why I want to make sure you are at least first getting to the form and having it display correctly first. Post the snippets of source code that I mentioned in the last post. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Unit test struts application
StrutsTestCase (http://strutstestcase.sourceforge.net/) works well for well-factored struts applications. It does not work so well where developers have not layered the application, and have shoved business logic into the actions, controllers, and JSPs. - George http://www.idiacomputing.com Richard Jason R. Raquepo asked: > > how do you test your struts application? can you test up to > the action > level maybe using mocks? can you share your experience and > maybe tools > you use. - 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]
file download problem
I am using struts action class to download a file . Here is the action class public ActionForward execute(ActionMapping aActionMapping, ActionForm aActionForm, HttpServletRequest aHttpServletRequest, HttpServletResponse aHttpServletResponse) throws Exception { aHttpServletResponse.setContentType("application/octet-stream"); aHttpServletResponse.setHeader("pragma", "no-cache"); aHttpServletResponse.setHeader("Cache-Control","cache"); aHttpServletResponse.setHeader("Cache-Control","must-revalidate"); Integer aSysAttachId = new Integer(aHttpServletRequest.getParameter(IWeb.SYS_ATTACH_ID)); aHttpServletResponse.setHeader("Content-Disposition", "attachment; filename=\"" +aHttpServletRequest.getParameter(IWeb.FILE_NAME)+ "\""); download(aApplicationInfoDelegate.getApplicationAttachemntFile(aSysAttachId),aHttpServletResponse); return null; } private void download(byte[] byteArray, HttpServletResponse httpServletResponse) throws IOException, SQLException { try { BufferedOutputStream aBufferedOutputStream =new BufferedOutputStream(httpServletResponse.getOutputStream()); aBufferedOutputStream.write(byteArray,0,byteArray.length); aBufferedOutputStream.close(); } catch (Exception e) { throw new IllegalArgumentException(e.getMessage()); } } My problem is with all ".doc "files and some ".pdf" files .When user clicks on the link , the browser opens a dialog box with the option to save or open the file .Suppose he has choosen a ".doc" file to open , the browser opens micorsoft word with an error message Word experienced an error tying open the file. Try these suggestions. * Chaeck the file permissions for the document or drive. * Make sure there is sufficient free memory and disk space * Open the file with the text Recovery converter. I also had other files like .xls and lot of .pdf and there is no problem with these files but with all .doc files. Can Somebody guide with this issue. Thanks & Regards - Yahoo! Photos Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
RE: RV: Array of a java bean and Dynamic Form Beans
Hi Rick If I comment the reset method I get: java.lang.ArrayIndexOutOfBoundsException: 0 at java.lang.reflect.Array.get(Native Method) at org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:296)at org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils. java:474) at org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils. java:428) at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.j ava:770)at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:80 1) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j ava:821)at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.j ava:65) at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDisp atcher.java:663)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRe questDispatcher.java:330) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandl er.java:830)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285 ) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126 ) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableR esourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534) Of course this makes sense because I'm trying to make it work with request scope. If I use session scope everything works well but I need this to work with request scope. Thanks for the help Regards, Néstor Boscán Néstor Boscán - Gerente de Consultoría Teléfono Móvil: +58 416 6070610 Teléfono Oficina: +58 212 2399711 - +58 212 2398198 Fax Oficina: +58 212 2399587 Este mensaje es privado y confidencial, y está dirigido exclusivamente a su(s) destinatario(s). Si usted ha recibido este mensaje por error, debe abstenerse de distribuirlo, copiarlo o usarlo en cualquier sentido. Asimismo, le agradecemos comunicarlo al remitente y borrar el mensaje y cualquier documento adjunto. Cualquier opinión contenida en este mensaje pertenece únicamente al autor remitente y no representa necesariamente la opinión de TCS "Technology Consulting Solution", a menos que ello se señale en forma expresa. Eventualmente, los correos electrónicos pueden ser interceptados o alterados, llegar con demora o incompletos. Al respecto, de TCS "Technology Consulting Solution" no se hace responsable por los errores, defectos u omisiones que pudieran afectar al mensaje original, con motivo de su envío por correo electrónico. -Mensaje original- De: Rick Reumann [mailto:[EMAIL PROTECTED] Enviado el: Wednesday, January 18, 2006 10:31 AM Para: Struts Users Mailing List Asunto: Re: RV: Array of a java bean and Dynamic Form Beans Néstor Boscán wrote the following on 1/18/2006 8:06 AM: > Hi Rick > > I created a class that extends DynaActionForm and checked the > parameters to determine the size of the array. After I determine the > size of the array I set the attribute with a new array. I tested the > code but after the reset method I get: > > java.lang.IllegalArgumentException: No bean specified at > org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(Prope > rtyUti Skip dealing with the reset method for a while. Can you even get the form to display without the reset method? This sounds like you having something named wrong in regard to how you are trying to get a form bean property. Does the error happen on submit? We need a few more details. Show you dynaForm definition in struts config and the form on the jsp. > ls.java:837) at > org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:934) at > org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808) at > org.apache.struts.util.RequestUtils.populate(R
Re: Intro to JSTL
Gary Feidt wrote the following on 1/18/2006 9:28 AM: I've been developing Struts applications for a couple of years (the last using Struts 1.2.4), but have not used JSTL. Is JSTL the next logical progression? Is there a good place to start learning JSTL? Any good books, or web sites? I liked this book Core JSTL: Mastering the JSP Standard Tag http://www.amazon.com/gp/product/0131001531/sr=1-2/qid=1137594704/ref=pd_bbs_2/103-2890725-8241447?%5Fencoding=UTF8 Also as a quick reference this PDF is great: http://www.jadecove.com/jstl-quick-reference.pdf -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Intro to JSTL
JSTL(JavaServer Pages Standard Tag Library) is the Library of Tags those are simillar to the Tags you used in Struts Based JSPs like html,logic,bean etc.. On 1/18/06, Gary Feidt <[EMAIL PROTECTED]> wrote: > > Hello Everybody, > > I've been developing Struts applications for a couple of years (the > last using Struts 1.2.4), but have not used JSTL. Is JSTL the next > logical progression? Is there a good place to start learning JSTL? Any > good books, or web sites? All the standard question to get started. > > Thanks, > > Gary Feidt > __ > > Confidentiality Statement: > This email/fax, including attachments, may include confidential and/or > proprietary information and may be used only by the person or entity to > which it is addressed. If the reader of this email/fax is not the intended > recipient or his or her agent, the reader is hereby notified that any > dissemination, distribution or copying of this email/fax is prohibited. If > you have received this email/fax in error, please notify the sender by > replying to this message and deleting this email or destroying this > facsimile immediately. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Thanks & Regards Srinivas 732-648-9421(Cell)
Re: RV: Array of a java bean and Dynamic Form Beans
Néstor Boscán wrote the following on 1/18/2006 8:06 AM: Hi Rick I created a class that extends DynaActionForm and checked the parameters to determine the size of the array. After I determine the size of the array I set the attribute with a new array. I tested the code but after the reset method I get: java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUti Skip dealing with the reset method for a while. Can you even get the form to display without the reset method? This sounds like you having something named wrong in regard to how you are trying to get a form bean property. Does the error happen on submit? We need a few more details. Show you dynaForm definition in struts config and the form on the jsp. ls.java:837)at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:934) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j ava:821)at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.j ava:65) at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDisp atcher.java:663)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRe questDispatcher.java:330) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandl er.java:830)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285 ) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126 ) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableR esourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534) Regards, Néstor Boscán Néstor Boscán - Gerente de Consultoría Teléfono Móvil: +58 416 6070610 Teléfono Oficina: +58 212 2399711 - +58 212 2398198 Fax Oficina: +58 212 2399587 “Este mensaje es privado y confidencial, y está dirigido exclusivamente a su(s) destinatario(s). Si usted ha recibido este mensaje por error, debe abstenerse de distribuirlo, copiarlo o usarlo en cualquier sentido. Asimismo, le agradecemos comunicarlo al remitente y borrar el mensaje y cualquier documento adjunto. Cualquier opinión contenida en este mensaje pertenece únicamente al autor remitente y no representa necesariamente la opinión de TCS "Technology Consulting Solution", a menos que ello se señale en forma expresa. Eventualmente, los correos electrónicos pueden ser interceptados o alterados, llegar con demora o incompletos. Al respecto, de TCS "Technology Consulting Solution" no se hace responsable por los errores, defectos u omisiones que pudieran afectar al mensaje original, con motivo de su envío por correo electrónico. “ -Mensaje original- De: Rick Reumann [mailto:[EMAIL PROTECTED] Enviado el: Tuesday, January 17, 2006 11:07 PM Para: Struts Users Mailing List Asunto: Re: Array of a java bean and Dynamic Form Beans Néstor Boscán wrote: The problem is that I have to minimize the use of object in session scope to minimize session replication. Is there any way to do this in request scope? Right.. as I said you can use Request scope just fine. You just have to make sure in the reset method to either use a LazyList to wrap your Collections or somehow figure out what size to make to your collection. (I like LazyLists). -- Rick - 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] -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Intro to JSTL
Hello Everybody, I've been developing Struts applications for a couple of years (the last using Struts 1.2.4), but have not used JSTL. Is JSTL the next logical progression? Is there a good place to start learning JSTL? Any good books, or web sites? All the standard question to get started. Thanks, Gary Feidt __ Confidentiality Statement: This email/fax, including attachments, may include confidential and/or proprietary information and may be used only by the person or entity to which it is addressed. If the reader of this email/fax is not the intended recipient or his or her agent, the reader is hereby notified that any dissemination, distribution or copying of this email/fax is prohibited. If you have received this email/fax in error, please notify the sender by replying to this message and deleting this email or destroying this facsimile immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot find bean error, when cliked on submit button
Initially I tried to do the same i.e placing the List1 in the form. But for some reason the options were not displaying. I am using DynaValidatorForm and form-bean is defined in the struts config. In my prepare action I have LabelValueBean lblValueBean1 = new LabelValueBean("Visa", "V"); LabelValueBean lblValueBean2 = new LabelValueBean("MasterCard", "M"); LabelValueBean lblValueBean3 = new LabelValueBean("American Express", "AE"); //Options ArrayList List1 = new ArrayList(); List1 .add(lblValueBean1); List1 .add(lblValueBean2); List1 .add(lblValueBean3); request.set("List1 ", List1 ); > The Jsp the combox is filled > ... > .. > > property="value" labelProperty="label"/> > can you tell me how to define the collection in the form-bean so that it can be accessed by the JSP? As I tried this before and was not successful. Thanks. From: Michael Jouravlev <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: Struts Users Mailing List Subject: Re: cannot find bean error, when cliked on submit button Date: Tue, 17 Jan 2006 13:20:42 -0800 > In the JSP have comboboxes. > > PrepareFacilityAction > > . > > request.setAttribute("List1", getList1(form)); > ... > ... > > The Jsp the combox is filled > ... > .. > > property="value" labelProperty="label"/> > > > .. > > > > > The JSP displayes fine with all the values in it. This JSP has required > fields in it. Used validator.xml to define al lthe required fields. > > There is a Save Button which is the submit button in the JSP. When clicked > on Save want the validations to be done and be in the same JSP. > > When Clicked on Save, it is not going into the DispatchFacilityAction > > But getting the error in JSP > Cannot find bean under name List1 -- This List1 was in the request when > the JSP originally displayed. > > Why is this? Maybe because Struts tries to set current selection in the List1 object, which has request scope and is already gone. Not sure about it though, I need to look into how Struts sets selected item for list-type property. > How to fix this. I would not create any objects outside ActionForm like you did with List1. Instead, I would define all objects that are needed to be displayed/updated as properties of ActionForm. This approach will keep all page-related objects in one place, and they all will be available at once. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Enabling links according to user's authorization
Hi Wendy - thank you for your time :-) I have some more questions: 1. Does the getRoles() method in the BenWebUser Class get the roles for a specific menu from the menu-config? 2. How do you secure your web app if not by container security? only by hiding menus? What if someone knows the url to the hidden menu? 3. Is there a easy way to adjust struts-menu so it will take the menu-to-roles data from a my database instead of from menu-config? Thanks a lot Rivka -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 17, 2006 9:30 PM To: user@struts.apache.org; Rivka Shisman Subject: Re: Enabling links according to user's authorization On 1/17/06, Rivka Shisman <[EMAIL PROTECTED]> wrote: Wendy wrote: > > I use Struts Menu to conditionally display menu items based on user > > roles. Rather than configure the container to handle it, I have a > > Filter that wraps the request, and the request wrapper overrides the > > isUserInRole method. In that method, I check a session-scoped 'user' > > object to see if the user has that role. > > > > The code is here, and I don't think it's Tomcat-specific: > > http://wiki.wsmoak.net/cgi-bin/wiki.pl?TomcatRequestWrapper > 1. By saying "Rather than configure the container to handle it" - do you > mean that you don't have J2EE roles configured? Correct. There is no 'container managed authentication' configuration. > 2. If I understand correctly - you don't work the menu-config.xml way? I _do_ use menu-config.xml. That's how Struts Menu knows which role to ask about. I added a bit of that config to the Wiki page if you want to look again. > 3. I'm not sure I understand the BenWebUser Class, can you please attach > it's code? It's just a bean with get/set methods. The 'getAuthorizedMnemonics' method could be renamed 'getRoles'. It returns a List of "roles", and you can see in the overridden request.isUserInRole method that all I do is ask whether the list contains the role in question. -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there a way to use Dates and Numbers with Dynamic Action Forms using a pattern?
Dave Newton wrote: Néstor Boscán wrote: Is there a way to use Dates with Dynamic Action Forms using a pattern. We would like to use all our DTOs with Dynamic Form Beans but we're having problem with Date and Numbers were we need to apply patterns. Is there a way to do this? I'm not sure which use of the word "pattern" you're using; I assume you mean formatting (like MM-DD- vs. DD/MM/YY etc.)? Just use your pattern of choice and a SimpleDateFormat to convert strings from your FormBean to Date objects. To safely do that it would be a good idea to use the validator, it's default pattern is MM/dd/ but you can configure that, check out the struts validator docos. Manos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [shale] clay renderId
Hi There seems to be some problems with this aproach with respect to name resolving. Scenario : @managed-bean-name is a backing bean X, the table that you want to display (see: Outer HTML template include) is from a bean Person as person on X, and has properties firstName and middleName and so on Now doing this: results in: Subsequent characters of component identifier must be a letter, a digit, an underscore ('_'), or a dash ('-')! But component identifier contains "." trying property="['person.firstName']" it also complains Altering: To something like results in: java.lang.IllegalArgumentException: component identifier's first character must be a letter or an underscore ('_')! But it is "[" Any suggestions? Hermod -Original Message- From: Gary VanMatre [mailto:[EMAIL PROTECTED] Sent: Friday, January 13, 2006 4:12 PM To: Struts Users Mailing List Subject: Re: [shale] clay renderId >> Besides defining these in XML, you can do this sort of thing mixing in HTML templating. >> >> Common XML Config: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> HTML template "/widgets.html": >> >> Mock Label: >> >> Mock Message >> >> >> Outer HTML template include: >> >> >> >> This example show how a pattern of components, label, input >> text and message can be abstracted into a common template. >> >> >>>property="firstName" size="20" maxlength="30" >>required="true" immediate="false"/> >>>property="middleName" size="20" maxlength="30" >>required="false" immediate="false"/> >>>property="lastName" size="30" maxlength="40" >>required="true" immediate="false"/> >>>property="lastName" size="40" maxlength="50" >>required="true" immediate="false"/> >> >> >> > >That's really cool, Gary. How would I package widgets.html in a jar >so that it can be referenced in the application like you did in your >example? > Untill we resolve the bug ticket you posted, the html templates can only be loaded from the context root. http://issues.apache.org/bugzilla/show_bug.cgi?id=38168 We should be able to use the same syntax with html resources. I'm going to make the syntax more simple for including html templates within html templates. I'll try to take a look this weekend but the Broncos are playing and it's ski season here :-) Gary * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there a way to use Dates and Numbers with Dynamic Action Forms using a pattern?
Néstor Boscán wrote: > Yes I know I can use Strings but the idea is to reuse my java beans > properties that are Date or Number and not have extra attributes for them. > Generally speaking it's a Best Practice to use ActionForms _only_ as a way to get String data from the client to the server, performing some validation (more or less) automagically. I would recommend against using Dates etc. in it, but there's no technical reason why you couldn't. Doesn't seem like a very good idea to me. > You said something about IIRC, how can I use this? > Ah. That means "If I Remember Correctly". Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Is there a way to use Dates and Numbers with Dynamic Action Forms using a pattern?
Hi Dave Thanks for the anster. Yes I know I can use Strings but the idea is to reuse my java beans properties that are Date or Number and not have extra attributes for them. You said something about IIRC, how can I use this? Regards, Néstor -Mensaje original- De: Dave Newton [mailto:[EMAIL PROTECTED] Enviado el: Wednesday, January 18, 2006 8:32 AM Para: Struts Users Mailing List Asunto: Re: Is there a way to use Dates and Numbers with Dynamic Action Forms using a pattern? Néstor Boscán wrote: > Is there a way to use Dates with Dynamic Action Forms using a pattern. > We would like to use all our DTOs with Dynamic Form Beans but we're > having problem with Date and Numbers were we need to apply patterns. > Is there a way to do this? > I'm not sure which use of the word "pattern" you're using; I assume you mean formatting (like MM-DD- vs. DD/MM/YY etc.)? Try using Strings as the form-property types. Validate the patterns via a regex (called "mask" in struts validator land). IIRC formsets support I18N via the 'country' and 'language' attributes, but I'm fuzzy on this one. Dave - 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]
RV: Array of a java bean and Dynamic Form Beans
Hi Rick I created a class that extends DynaActionForm and checked the parameters to determine the size of the array. After I determine the size of the array I set the attribute with a new array. I tested the code but after the reset method I get: java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUti ls.java:837)at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:934) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j ava:821)at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.j ava:65) at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDisp atcher.java:663)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRe questDispatcher.java:330) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandl er.java:830)at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285 ) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126 ) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableR esourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534) Regards, Néstor Boscán Néstor Boscán - Gerente de Consultoría Teléfono Móvil: +58 416 6070610 Teléfono Oficina: +58 212 2399711 - +58 212 2398198 Fax Oficina: +58 212 2399587 Este mensaje es privado y confidencial, y está dirigido exclusivamente a su(s) destinatario(s). Si usted ha recibido este mensaje por error, debe abstenerse de distribuirlo, copiarlo o usarlo en cualquier sentido. Asimismo, le agradecemos comunicarlo al remitente y borrar el mensaje y cualquier documento adjunto. Cualquier opinión contenida en este mensaje pertenece únicamente al autor remitente y no representa necesariamente la opinión de TCS "Technology Consulting Solution", a menos que ello se señale en forma expresa. Eventualmente, los correos electrónicos pueden ser interceptados o alterados, llegar con demora o incompletos. Al respecto, de TCS "Technology Consulting Solution" no se hace responsable por los errores, defectos u omisiones que pudieran afectar al mensaje original, con motivo de su envío por correo electrónico. -Mensaje original- De: Rick Reumann [mailto:[EMAIL PROTECTED] Enviado el: Tuesday, January 17, 2006 11:07 PM Para: Struts Users Mailing List Asunto: Re: Array of a java bean and Dynamic Form Beans Néstor Boscán wrote: > The problem is that I have to minimize the use of object in session > scope to minimize session replication. Is there any way to do this in request scope? Right.. as I said you can use Request scope just fine. You just have to make sure in the reset method to either use a LazyList to wrap your Collections or somehow figure out what size to make to your collection. (I like LazyLists). -- Rick - 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]
RE: Globally available variables
Putting variables in application context should work for you. You can get/set those values as long as the application is active. Vidya -Original Message- From: Martin Ravell [mailto:[EMAIL PROTECTED] Sent: Wednesday 18 January 2006 14:19 To: 'Struts Users Mailing List' Subject: RE: Globally available variables >-Original Message- >From: ALEX HYDE [mailto:[EMAIL PROTECTED] >Sent: Wednesday, 18 January 2006 10:47 PM >To: Struts Users Mailing List >Subject: Re: Globally available variables > >Can't you put it in the application context instead of all the sessions? > I don't know. Will look into this but is it possible to have a session write an object to this app context and have another session see the result? I had a suspicion that stuff in the application context was setup during the app being deployed and could not be changed? Regards Marty - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and any attachments are confidential and intended solely for the addressee. If you have received this message in error, please notify Discovery immediately, telephone number +27 11 529 2888. Any unauthorised use; alteration or dissemination of the contents of this email is strictly prohibited. In no event will Discovery or the sender be liable in any manner whatsoever to any person for any loss or any direct, indirect, special or consequential damages arising from use of this email or any linked website, including, without limitation, from any lost profits, business interruption, loss of programmes or other data that may be stored on any information handling system or otherwise from any assurance that this email is virus free even if Discovery is expressly advised of the possibility of such damages. Discovery is an Authorised Financial Services Provider. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Globally available variables
Martin Ravell wrote: > I don't know. Will look into this but is it possible to have a session write > an object to this app context and have another session see the result? > > I had a suspicion that stuff in the application context was setup during the > app being deployed and could not be changed? > It's just another map; it can be updated by anything (like, say, a daemon that occasionally refreshes a list of stories or something). Depending on your usage you might need to watch out for synchronization issues. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there a way to use Dates and Numbers with Dynamic Action Forms using a pattern?
Néstor Boscán wrote: > Is there a way to use Dates with Dynamic Action Forms using a pattern. We > would like to use all our DTOs with Dynamic Form Beans but we're having > problem with Date and Numbers were we need to apply patterns. Is there a way > to do this? > I'm not sure which use of the word "pattern" you're using; I assume you mean formatting (like MM-DD- vs. DD/MM/YY etc.)? Try using Strings as the form-property types. Validate the patterns via a regex (called "mask" in struts validator land). IIRC formsets support I18N via the 'country' and 'language' attributes, but I'm fuzzy on this one. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Globally available variables
>-Original Message- >From: ALEX HYDE [mailto:[EMAIL PROTECTED] >Sent: Wednesday, 18 January 2006 10:47 PM >To: Struts Users Mailing List >Subject: Re: Globally available variables > >Can't you put it in the application context instead of all the sessions? > I don't know. Will look into this but is it possible to have a session write an object to this app context and have another session see the result? I had a suspicion that stuff in the application context was setup during the app being deployed and could not be changed? Regards Marty - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: Indexed properties
Hi, I am currently working on an application which uses Indexed properties. And I am not able to update the indexed bean properties properly. I have included some code snippets here.. The problem is when the check box on the jsp is checked it update correctly, but when the check box is uncked and saved it fails to update the bean property. Any help on this much appreciated. Thanks, Vidya Action form has a Collection of bean objects like this. public class NotificationsActionForm extends ActionForm { private List notifications = new ArrayList(); //get and set methods are included in the code public NotificationBean getNotification(int index) { return (NotificationBean) notifications.get(index); } } And the bean class looks like this.. public class NotificationBean { private String name; private int notificationId; private boolean print; private boolean email; private boolean sms; // get and set methods included in the code } In my jsp I am using check boxes for the Boolean variables. JSP code looks like this.. Id Name Email Print SMS This message and any attachments are confidential and intended solely for the addressee. If you have received this message in error, please notify Discovery immediately, telephone number +27 11 529 2888. Any unauthorised use; alteration or dissemination of the contents of this email is strictly prohibited. In no event will Discovery or the sender be liable in any manner whatsoever to any person for any loss or any direct, indirect, special or consequential damages arising from use of this email or any linked website, including, without limitation, from any lost profits, business interruption, loss of programmes or other data that may be stored on any information handling system or otherwise from any assurance that this email is virus free even if Discovery is expressly advised of the possibility of such damages. Discovery is an Authorised Financial Services Provider.
Indexed properties
Hi, I am currently working on an application which uses Indexed properties. And I am not able to update the indexed bean properties properly. I have included some code snippets here.. Any help on this much appreciated. Thanks, Vidya Action form has a Collection of bean objects like this. public class NotificationsActionForm extends ActionForm { private List notifications = new ArrayList(); //get and set methods are included in the code public NotificationBean getNotification(int index) { return (NotificationBean) notifications.get(index); } } And the bean class looks like this.. public class NotificationBean { private String name; private int notificationId; private boolean print; private boolean email; private boolean sms; // get and set methods included in the code } In my jsp I am using check boxes for the Boolean variables. JSP code looks like this.. Id Name Email Print SMS This message and any attachments are confidential and intended solely for the addressee. If you have received this message in error, please notify Discovery immediately, telephone number +27 11 529 2888. Any unauthorised use; alteration or dissemination of the contents of this email is strictly prohibited. In no event will Discovery or the sender be liable in any manner whatsoever to any person for any loss or any direct, indirect, special or consequential damages arising from use of this email or any linked website, including, without limitation, from any lost profits, business interruption, loss of programmes or other data that may be stored on any information handling system or otherwise from any assurance that this email is virus free even if Discovery is expressly advised of the possibility of such damages. Discovery is an Authorised Financial Services Provider.
Re: Globally available variables
Can't you put it in the application context instead of all the sessions? Martin Ravell <[EMAIL PROTECTED]> wrote: Is there a simple way to put an object into a globally available spot for access by any current session? Something like the session.setAttribute() method? I have some info that I'd like to be able to load up and then have accessed by any user logged into my app. I'm thinking of a cache type of deal. Ideally writeable by any of the sessions. App is Struts, Hibernate and Spring running on JBoss/Tomcat. Any ideas will be much appreciated. Regards Marty - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.
Globally available variables
Is there a simple way to put an object into a globally available spot for access by any current session? Something like the session.setAttribute() method? I have some info that I'd like to be able to load up and then have accessed by any user logged into my app. I'm thinking of a cache type of deal. Ideally writeable by any of the sessions. App is Struts, Hibernate and Spring running on JBoss/Tomcat. Any ideas will be much appreciated. Regards Marty - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unit test struts application
hi guys, how do you test your struts application? can you test up to the action level maybe using mocks? can you share your experience and maybe tools you use. i found this while surfing: http://www.jnetdirect.com/products.php?op=conv has anyone has any experience using it? thanks & more power, Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]