RE: Re: DynaValidatorForm and BigDecimal problem
Hi Yep, I realised that was a limitation as I was putting it in. But for me, this is still quite a nice solution because the values need to be very precise so using BigDecimal all the way through gives me a (perhaps false) sense of security. Also, it's a big system and I have to change a lot of fields, and I think this is slightly less work than converting all fields to Strings. Both solutions are very good though so I'm really grateful for the help I've been given. Richard Gundersen Java Developer Email: [EMAIL PROTECTED] Phone: 01618302398 Fax: 01618342536 London Scottish Bank plc 24 Mount Street Manchester M2 3LS -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: Thursday, March 01, 2007 8:40 PM To: user@struts.apache.org Subject: Re: DynaValidatorForm and BigDecimal problem Bear in mind that this way, if the user types in 'abc' for one of your money fields, you wont be able to re-display their incorrect input. That's the other major reason for making your form fields String-typed. L. Gundersen, Richard wrote: Actually, I tried out your first solution, and it actually works very nicely too, so I'm going to go with that one for now! Richard Gundersen Java Developer Email: [EMAIL PROTECTED] Phone: 01618302398 Fax: 01618342536 London Scottish Bank plc 24 Mount Street Manchester M2 3LS -Original Message- From: Ed Griebel [mailto:[EMAIL PROTECTED] Sent: Thursday, March 01, 2007 4:13 PM To: Struts Users Mailing List Subject: Re: DynaValidatorForm and BigDecimal problem It has nothing to do with Struts, the error message is saying that commons BeanUtils cannot convert the string from the form submit into a BigDecimal. Turns out that your issue is BigDecimal is not as permissive as Double when it converts a non-numeric string to a BigDecimal. If a string is not a number, Double converts it to 0.0, but BigDecimal will throw an exception, even for an empty string. Struts copies screen fields to formbean fields in RequestUtils.populate() before it does anything else including validation. So, even though there's not a value in the field (actually *because* there's no numeric value!) populate() re-throws the exception that you are seeing. To get it to work you could create and register a custom converter that will do some checking on the string before it passes it to the BigDecimal(String) constructor. You will need a class that extends org.apache.commons.beanutils.converters.BigDecimalConverter, and register your custom converter by calling ConvertUtils.register(new your class(), BigDecimlal.class); Or, you could instead use an alternate approach that many (me included) recommend, of having all formbean fields be Strings. You would have a String display field and a second field that is a non-string, and have this populated by your action after validation succeeds. -ed On 3/1/07, Gundersen, Richard [EMAIL PROTECTED] wrote: Hi Has anyone had problems with BigDecimal and DynaValidatorForms? I've got a form with two fields (advisorFee and grossIncome) defined as java.lang.Double. I want to change them to java.math.BigDecimal because they are money fields. If I change advisorFee to BigDecimal, the validation fails when I enter a value into grossIncome, even though this is still a Double. This is the error I get: javax.servlet.ServletException: BeanUtils.populate org.apache.struts.util.RequestUtils.populate(RequestUtils.java:453) [Caused by]... org.apache.commons.beanutils.ConversionException org.apache.commons.beanutils.converters.BigDecimalConverter.convert(BigD ecimalConverter.java:117) This doesn't make any sense to me. Is it possible that it's a bug in 1.3.5? Why should changing the definition of one field change the behaviour of another (they are not linked in any way e.g. in the validation rules) Regards Richard Gundersen Java Developer Email: [EMAIL PROTECTED] Phone: 01618302398 Fax: 01618342536 London Scottish Bank plc 24 Mount Street Manchester M2 3LS - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ *** Disclaimer *** This electronic communication is confidential and for the exclusive use of the addressee. It may contain private and confidential information. The information, attachments and opinions contained in this E-mail are those of its author only and do not necessarily represent those of London Scottish Bank PLC or any other members of the London Scottish Group. If you are not the intended addressee, you are prohibited
Passing parameter through html:link
Hi Iam facing problem with html:link. my JSP page has two forms for which iam using *LookupDispatchAction* for submitting the page information. Below this iam displaying the details of the employees for which i have added two links (Edit, Delete) by using html:link. Each employee has a unique id which i need to pass when the link of edit/delete is clicked so that appropriate edit/delete action is called. The problem facing is how to pass this empid through this html:link. For storing the employee details i have created a employee bean and storing these objects in a vector and iterating throught the vector to display the values. struts-config - action path=/dispatch name=DispatchForm type= com.employee.EmployeeDispatchActionparameter=method scope=request unknown=false input=/dispatchAction.do forward name=next path=dispatchActionpage/ /action *JSP Page* html:link action=/dispatch.dobean:message key=label.Edit/ /html:link nbsp;nbsp; html:link action=/dispatch.dobean:message key=label.Delete/ /html:link *EmployeeDispatchAction* *protected* Map getKeyMethodMap() { Map map = *new* HashMap(); map.put(label.Edit, EditEmployee); map.put(label.Delete, DeleteEmployee); *return*(map); } *public* ActionForward EditEmployee(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) *throws*IOException, ServletException { * code here for edit employee w.r.t his id getting through the parameter passed through the link } *public* ActionForward DeleteEmployee(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) *throws*IOException, ServletException { * code here for delete employee w.r.t his id getting through the parameter passed through the link } Thanks in advance. Regards Khan
RE: help required on managing a struts action with popup's
Can't you set the target of the form to _parent Once you submit then the parent window will populate automatically :) Assuming that you have used struts tag library for the form fields . Read http://www.htmlcodetutorial.com/forms/_FORM_TARGET.html Regards Guru --- Gurumoorthy Raghupathy Email : [EMAIL PROTECTED] Visit us at : http://www.nielsen.com / --- -Original Message- From: Dinakar Chowdary [mailto:[EMAIL PROTECTED] Sent: 02 March 2007 12:55 To: user@struts.apache.org Subject: help required on managing a struts action with popup's hi this is dinakar i am working on struts from past 1 year. now i am facing a problem in a scenario like i have a jsp in which i have to take some details from a popup screen. if i enter details in popup and submit the popup. the values that are entered in the popup has to be reflect on to the parent window with out submitting /refreshing the parent window. please help me urgent thanks dinakar. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Working with other technologies
-- View this message in context: http://www.nabble.com/Working-with-other-technologies-tf3334030.html#a9270918 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Working with other technologies
Hi I have a question. If anyone could list me all frameworks that I can intagrate with Struts? If there are any ?? Thanx -- View this message in context: http://www.nabble.com/Working-with-other-technologies-tf3334031.html#a9270920 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Working with other technologies
the answer is: goto www.google.com type in java framework you got your answer... with 90% accuracy... regards Leon On 3/2/07, puchacz [EMAIL PROTECTED] wrote: Hi I have a question. If anyone could list me all frameworks that I can intagrate with Struts? If there are any ?? Thanx -- View this message in context: http://www.nabble.com/Working-with-other-technologies-tf3334031.html#a9270920 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Working with other technologies
Well that is a bit of a broad question. What type of frameworks are you looking for? If you are a developer, then you should be able to integrate almost any framework with Struts. -Richard puchacz wrote: Hi I have a question. If anyone could list me all frameworks that I can intagrate with Struts? If there are any ?? Thanx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynavalidator Question:
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James, James Drinkard wrote: I'm using Struts 1.0 version with a dynaform and a select control. For some reason the struts validator doesn't work with that control. I've seen that mentioned in an article before. Is this corrected in later versions or is there a workaround for this? Can you be more specific? I think I might have only used Struts back to 1.1, but I have always used DynaForms (actually DynaValidatorForms) successfully. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF6Eu/9CaO5/Lv0PARAmaPAJ4vOZivdUYtvJjZ4QCiwossUTP2WgCghJPy FB8ub0Lh1U7YJ/rTR2dw2P0= =eZGt -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to use html:select for multiple fields of form
Hi every one, I have a Question for you. I am trying to display and attribute of session on a form.It is something like this on normal jsp. --- select name=from % HttpSession sess=request.getSession(); List personslist=(List)sess.getAttribute(personslist); Iterator personite=personslist.iterator(); while(personite.hasNext()){ Persons person= (Persons)personite.next(); % option value=%=person.getPersonId()%%= person.getFirstName()%, %=person.getLastName()%/option %}% /select Persons.java class Persons{ int PersonId; String firstName(); String lastName(); //and all setter and getter methods. } -- I want to change this to Struts. I am not able to understand how can I show all 3 fields PersonID, firstName and lastname in Option tag of selection field. As of now this code is working fine in normal JSP. But I want to convert this to Struts. Please help me. thank you, Javaguru.
Re: LazyLists
Thanks for the help its very appreciated. This code has been working for over a year without any problems in a Java 1.4 and J2EE 1.3. The LazyList hand cranking can be found here: http://wiki.apache.org/struts/StrutsCatalogLazyList Here are the plain methods in the InsuranceForm: private BeneficiaryVO beneficiary = new BeneficiaryVO(); /** * Methods to hand crank Beneficiary lazy list */ public List getBeneficiaries() { return beneficiaries; } public BeneficiaryVO getBeneficiaries(int index) { while (index = beneficiaries.size()) { beneficiaries.add(new BeneficiaryVO()); } return (BeneficiaryVO) beneficiaries.get(index); } public void setBeneficiaries(BeneficiaryVO beneficiaryVO) { beneficiaries.add(beneficiaryVO); } public void populateBeneficiaries(List beneficiaries) { this.beneficiaries.addAll(beneficiaries); } public void resetBeneficiaries(List beneficiaries) { this.beneficiaries = beneficiaries; } This is the error I get:[Servlet Error]-[action]: * javax.servlet.jsp.el.ELException*: Unable to find a value for beneficiaries in object of class hronline.secure.personal.insurances.InsuranceForm using operator . I have debugged the code in the debugger and there is data in the Beneficiaries list (just before exiting the ActionForm). Also, the InsuranceForm has other attributes that are displayable. Here is the wierd part... if I comment out this method: public BeneficiaryVO getBeneficiaries(int index) { while (index = beneficiaries.size()) { beneficiaries.add(new BeneficiaryVO()); } return (BeneficiaryVO) beneficiaries.get(index); } the page is now displayed, no error. However the application won't work since it needs the method to capture the submitted data. What is going on? Any clues? - Glenn
[OT][ANN] JAVAWUG BOF 25 / 27 March 2007 @ 18:30 / Adobe Flex with Ben Forsaith / Skills Matter
Hi I would like to formally announce that ``JAVAWUG'' (Java Web User Group) is holding the BOF 25 at the Skills Matter, London. Ben Forsaith will give a presentation on Adobe Flex on Tuesday 27th March 2007 at Skills Matter Ben will talk about integrating Flex with Java server side frameworks For more information see here: http://jroller.com/page/javawug?entry=javawug_bof_25_adobe_flex For registration please see here: http://skillsmatter.com/javawug http://jroller.com/page/javawug Thanks very much -- Peter Pilgrim, JUG Leader, ``Java Champion'' JAVAWUG (The Java Web Users Group) [e] 2004, :: http://jroller.com/page/javawug/ :: __ |__| ___ ___ __ _ __ | \__ \\ \/ /\__ \\ \/ \/ / | \/ ___\ | |/ __ \\ / / __ \\ /| | / /_/ /\__| ( /\_/ ( /\/\_/ |/\___ / \__|\/ \//_/ https://java-champions.dev.java.net/ Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS Limited is a company registered in England Wales under company number 2035362, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS AG (London Branch) is registered as a branch of a foreign company under number BR004507, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS Clearing and Execution Services Limited is a company registered in England Wales under company number 03123037, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing parameter through html:link
You can pass the map as a property in the link such as: html:link action=/dispatch.do name=nameOfYourFormBean property=map of key/values pairs Struts will build a query string with the values in the map. - maestro
Re: [S2] Working with other technologies
I don't understand. In one article I found information that Spring can be intagrated with Struts, JSF, etc And the author wrote that it's diffrent situation than in Struts. And now, You tell me that the same situation is in Struts??? So this guy were telling that Spring is better I don't get it! :) Richard Yee wrote: Well that is a bit of a broad question. What type of frameworks are you looking for? If you are a developer, then you should be able to integrate almost any framework with Struts. -Richard puchacz wrote: Hi I have a question. If anyone could list me all frameworks that I can intagrate with Struts? If there are any ?? Thanx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Working-with-other-technologies-tf3334031.html#a9274567 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use html:select for multiple fields of form
Hi Every One, I solved the problem. I crated another filed fullName in Persons.javaand added setter and getter methods for it. I used the following statement to populate select --- html:select property=from html:options collection=personslist property=personId labelProperty=fullName/ /html:select -- This code solved my issue. If there is any better answer for this problem then I will be happy to hear from you. :):D;) Java Guru. On 3/2/07, Java Guru [EMAIL PROTECTED] wrote: Hi every one, I have a Question for you. I am trying to display and attribute of session on a form.It is something like this on normal jsp. --- select name=from % HttpSession sess=request.getSession(); List personslist=(List)sess.getAttribute(personslist); Iterator personite=personslist.iterator(); while(personite.hasNext()){ Persons person= (Persons)personite.next(); % option value=%=person.getPersonId()%%= person.getFirstName()%, %=person.getLastName()%/option %}% /select Persons.java class Persons{ int PersonId; String firstName(); String lastName(); //and all setter and getter methods. } -- I want to change this to Struts. I am not able to understand how can I show all 3 fields PersonID, firstName and lastname in Option tag of selection field. As of now this code is working fine in normal JSP. But I want to convert this to Struts. Please help me. thank you, Javaguru.
Re: Real time data display in a struts based application.
Musachy, Yes, we use struts 1.x, and I really dont think we can download any of these external libraries. So said so, I have to write javascript etc to achive these AJAX timed events.. Any one has done it to achieve it ? I believe javascript,XML etc are needed.. any examples. Musachy Barroso [EMAIL PROTECTED] wrote: Oops...I can't help it, I always assume we are talking about S2. If you are using S1, pick an ajax framework, most of them have a Div tag like the one on S2. See Frank's email for details on one of them. musachy On 2/28/07, Maya menon wrote: Thanks Musachy for your response. We use Struts 1.x right now.. Guess we have to update.. Please send me if yu have any examples/links.. Musachy Barroso wrote: You can refresh the page, but that would probably be annoying to the user, not to mention that data entered on fields will most likely be lost. Using a div you can update just the part of the page that is important. Using the div tag in struts: theme=ajax href=%{ajaxTest} updateFreq=3000/ that will make your div reload the content from AjaxTest.action every 3000 milliseconds. There are many frameworks available, so you can pick one that fits your needs. For simple scenarios, the div tag will do. musachy On 2/28/07, Maya menon wrote: Thank you both for your responses. So AJAX is the technique I should refer. Anyone know of any examples / somethings. Also, my colleague asked me this question when I talked to him about a timed AJAX event. Why cant we simply refresh the jsp page ? Why should we use AJAX ? so, whats the real advantage of using an AJAX timed event to a normal JSP/HTML refresh ? Maya Musachy Barroso wrote: The div tag when used on the ajax theme, has a timer that will make it refresh its content from the url specified in the href attribute, examples available in showcase and here: http://struts.apache.org/2.x/docs/ajax-tags.html musachy On 2/28/07, Frank W. Zammetti wrote: Well, if you can live with not literally pushing to the client, this is the sort of application AJAX was made for. Have a timed event, every few seconds maybe, whatever your tolerable definition of real time is, that makes and AJAX request to check for new data and display it when found. Pretty easy. Have a peak at the AjaxParts Taglib (APT) in Java Web Parts (JWP): http://javawebparts.sourceforge.net http://javawebparts.sourceforge.net/javadocs/javawebparts/ajaxparts/taglib/package-summary.html The benefit is that it will allow you to do this, since it has a timed AJAX event function, and will save you from having to write any Javascript yourself (most likely). Whether you go with APT or not, AJAX is probably the first thing you want to look at. Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Wed, February 28, 2007 3:54 pm, Maya menon wrote: All, Have a design issue here. We have a web based application and have 2000 concurrent users. The requirement is: when new data comes on Oracle database for users this data has to be sent to the online users on a real time basis. Someway, the real time data needs to be pushed to the users without the client doing a reload/refresh etc. What technologies can be used here ? Can anyone provide me some suggestions ? The users login to the application using a web page, this is a web based J2ee application using struts, Oracle database. Thanks, Maya - Any questions? Get answers on any topic at Yahoo! Answers. Try it now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - Never Miss an Email Stay connected with Yahoo! Mail on your mobile. Get started! -- Hey you! Would you help me to carry the stone? Pink Floyd - Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out. -- Hey you! Would you help me to carry the stone? Pink Floyd - Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit.
Re: [S2] Working with other technologies
--- puchacz [EMAIL PROTECTED] wrote: I don't understand. In one article I found information that Spring can be intagrated with Struts, JSF, etc And the author wrote that it's diffrent situation than in Struts. And now, You tell me that the same situation is in Struts??? So this guy were telling that Spring is better I don't get it! :) You asked an imprecise question, so you got an imprecise answer. What do you think you mean by integration? d. No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Real time data display in a struts based application.
--- Maya menon [EMAIL PROTECTED] wrote: I really dont think we can download any of these external libraries. I would highly recommend using a library. If nothing else you'll want Prototype (or a variant, like prototype-lite etc.) for writing the Javascript if for no other reason than to avoid writing cross-browser Javascript, which is just no fun. d. Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Working with other technologies
That I have my project in Struts Technologies , but I can add some functionality or component or anything from other Framework technologies like Spring or JSF Dave Newton-4 wrote: --- puchacz [EMAIL PROTECTED] wrote: I don't understand. In one article I found information that Spring can be intagrated with Struts, JSF, etc And the author wrote that it's diffrent situation than in Struts. And now, You tell me that the same situation is in Struts??? So this guy were telling that Spring is better I don't get it! :) You asked an imprecise question, so you got an imprecise answer. What do you think you mean by integration? d. No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Working-with-other-technologies-tf3334031.html#a9276459 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Working with other technologies
Ok thank YOu very much for Your answer, but I will ask You for something else :-). All You told me it's for Struts 2, but do You know if there was the same situation with Strus 1 ??? Thanx Matt Filion wrote: There are a lot of plugins that are shipped with the full struts release (if you look at the lib folder they have the name struts-2-{plugin name}-plugin.jar). There is one in there for spring and another for JSF. There are also example applications shipped with struts 2 the one I suggest you take a look at is the showcase. It has an example of struts 2 with JSF. As far as spring integration my understanding take a look at this link. Its says its for webwork but struts 2 is based on webwork so it should still apply. http://www.learntechnology.net/content/webwork/webwork_crud_lm.jsp If you are really interested in a specific architectural implementation I suggest that you just install struts 2 and start playing around with it. There is no better way to learn that trying it out. However, from the way you worded your question I think you may want to gain a better understanding of these specific technologies, since they dont clash the way your phrase implies. Both Spring and JSF both compliment a Struts2 implementation. Matt Filion CSC - GTS -- Raytheon - ISF (818) 468-6271 [EMAIL PROTECTED] This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. puchacz [EMAIL PROTECTED] 03/02/2007 12:10 PM Please respond to Struts Users Mailing List user@struts.apache.org To user@struts.apache.org cc Subject Re: [S2] Working with other technologies That I have my project in Struts Technologies , but I can add some functionality or component or anything from other Framework technologies like Spring or JSF Dave Newton-4 wrote: --- puchacz [EMAIL PROTECTED] wrote: I don't understand. In one article I found information that Spring can be intagrated with Struts, JSF, etc And the author wrote that it's diffrent situation than in Struts. And now, You tell me that the same situation is in Struts??? So this guy were telling that Spring is better I don't get it! :) You asked an imprecise question, so you got an imprecise answer. What do you think you mean by integration? d. No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Working-with-other-technologies-tf3334031.html#a9276459 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Working-with-other-technologies-tf3334031.html#a9277327 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Working with other technologies
S1-Spring integration is also quite simple and the Spring distro includes several classes that make Actions-as-beans configuration trivial. --- puchacz [EMAIL PROTECTED] wrote: Ok thank YOu very much for Your answer, but I will ask You for something else :-). All You told me it's for Struts 2, but do You know if there was the same situation with Strus 1 ??? Thanx Matt Filion wrote: There are a lot of plugins that are shipped with the full struts release (if you look at the lib folder they have the name struts-2-{plugin name}-plugin.jar). There is one in there for spring and another for JSF. There are also example applications shipped with struts 2 the one I suggest you take a look at is the showcase. It has an example of struts 2 with JSF. As far as spring integration my understanding take a look at this link. Its says its for webwork but struts 2 is based on webwork so it should still apply. http://www.learntechnology.net/content/webwork/webwork_crud_lm.jsp If you are really interested in a specific architectural implementation I suggest that you just install struts 2 and start playing around with it. There is no better way to learn that trying it out. However, from the way you worded your question I think you may want to gain a better understanding of these specific technologies, since they dont clash the way your phrase implies. Both Spring and JSF both compliment a Struts2 implementation. Matt Filion CSC - GTS -- Raytheon - ISF (818) 468-6271 [EMAIL PROTECTED] This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. puchacz [EMAIL PROTECTED] 03/02/2007 12:10 PM Please respond to Struts Users Mailing List user@struts.apache.org To user@struts.apache.org cc Subject Re: [S2] Working with other technologies That I have my project in Struts Technologies , but I can add some functionality or component or anything from other Framework technologies like Spring or JSF Dave Newton-4 wrote: --- puchacz [EMAIL PROTECTED] wrote: I don't understand. In one article I found information that Spring can be intagrated with Struts, JSF, etc And the author wrote that it's diffrent situation than in Struts. And now, You tell me that the same situation is in Struts??? So this guy were telling that Spring is better I don't get it! :) You asked an imprecise question, so you got an imprecise answer. What do you think you mean by integration? d. No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Working-with-other-technologies-tf3334031.html#a9276459 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Working-with-other-technologies-tf3334031.html#a9277327 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The fish are biting. Get more visitors on your site using Yahoo! Search Marketing. http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Working with other technologies
Spring can be tightly integrated w/ Struts2. I use Spring *extensively* in S2 and it's great! I dont' work with JSF, so I can't comment on that. --- puchacz [EMAIL PROTECTED] wrote: That I have my project in Struts Technologies , but I can add some functionality or component or anything from other Framework technologies like Spring or JSF Dave Newton-4 wrote: --- puchacz [EMAIL PROTECTED] wrote: I don't understand. In one article I found information that Spring can be intagrated with Struts, JSF, etc And the author wrote that it's diffrent situation than in Struts. And now, You tell me that the same situation is in Struts??? So this guy were telling that Spring is better I don't get it! :) You asked an imprecise question, so you got an imprecise answer. What do you think you mean by integration? d. No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Working-with-other-technologies-tf3334031.html#a9276459 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Working with other technologies
I was searching in struts 1 lib directory and there is nothing like struts-2-{plugin name}-plugin.jar. I found it in Struts 2 but I would like to know how the situation looks in Struts 1. I know that i am bothering You, but I am a student who's compering Frameworks and I do this with Struts 1, Spring , and others. PLEASE tell me with what technologies I can intagrate STRUTS 1 ( all posibilities). Please :) Dave Newton-4 wrote: S1-Spring integration is also quite simple and the Spring distro includes several classes that make Actions-as-beans configuration trivial. --- puchacz [EMAIL PROTECTED] wrote: Ok thank YOu very much for Your answer, but I will ask You for something else :-). All You told me it's for Struts 2, but do You know if there was the same situation with Strus 1 ??? Thanx Matt Filion wrote: There are a lot of plugins that are shipped with the full struts release (if you look at the lib folder they have the name struts-2-{plugin name}-plugin.jar). There is one in there for spring and another for JSF. There are also example applications shipped with struts 2 the one I suggest you take a look at is the showcase. It has an example of struts 2 with JSF. As far as spring integration my understanding take a look at this link. Its says its for webwork but struts 2 is based on webwork so it should still apply. http://www.learntechnology.net/content/webwork/webwork_crud_lm.jsp If you are really interested in a specific architectural implementation I suggest that you just install struts 2 and start playing around with it. There is no better way to learn that trying it out. However, from the way you worded your question I think you may want to gain a better understanding of these specific technologies, since they dont clash the way your phrase implies. Both Spring and JSF both compliment a Struts2 implementation. Matt Filion CSC - GTS -- Raytheon - ISF (818) 468-6271 [EMAIL PROTECTED] This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. puchacz [EMAIL PROTECTED] 03/02/2007 12:10 PM Please respond to Struts Users Mailing List user@struts.apache.org To user@struts.apache.org cc Subject Re: [S2] Working with other technologies That I have my project in Struts Technologies , but I can add some functionality or component or anything from other Framework technologies like Spring or JSF Dave Newton-4 wrote: --- puchacz [EMAIL PROTECTED] wrote: I don't understand. In one article I found information that Spring can be intagrated with Struts, JSF, etc And the author wrote that it's diffrent situation than in Struts. And now, You tell me that the same situation is in Struts??? So this guy were telling that Spring is better I don't get it! :) You asked an imprecise question, so you got an imprecise answer. What do you think you mean by integration? d. No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Working-with-other-technologies-tf3334031.html#a9276459 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Working-with-other-technologies-tf3334031.html#a9277327 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Working with other technologies
--- puchacz [EMAIL PROTECTED] wrote: I would like to know how the situation looks in Struts 1. Spring provides several support classes that allow you to use Actions as Spring beans. See the org.springframework.web.struts JavaDocs for specific classes or various Spring/Struts docs online. PLEASE tell me with what technologies I can intagrate STRUTS 1 (all posibilities). I don't know how to answer that question. You can integrate any Java technology with Struts. Some integrate more tightly than others. d. Any questions? Get answers on any topic at www.Answers.yahoo.com. Try it now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Working with other technologies
Some basic google searches will reveal most of this information for you. Here are a few links i found that will be helpful. http://lijinjoseji.wordpress.com/2007/01/04/three-advantages-of-integrating-structs-into-spring-2/ http://www-128.ibm.com/developerworks/java/library/j-sr2.html One of the projects I worked on took advantage of Spring to inject services into an action. I wasnt a huge fan of it because of how closely it tied the business logic in with what i feel the view layer is (struts), although this was mostly due to the poor architectural design of the overall system. I also thought the Injection was clumsy because you not only had to specify a configuration within an XML file but you had to make sure that you had a getter and setter for the different services you were going to inject. Again, this may all have been a problem with the specfic implemetnation. However, I feel that frameworks, while providing flexability, should naturally guide a user to the proper implementation. With struts both 1 and 2 the implementation is clear, define an action, define your mappings and call your action and with struts 2 you can add interceptors and results to further manipulate your view. To me, these are well defined frameworks, struts 2 more so, but they both provide all the flexability you need to accomplish the task at hand while also guiding you to the proper implementation naturally (through the struts.xml file). With spring there are so many ways you can take advantage of and misuse it in a lot of cases, due to magazine architects or your hack-ademicly inclined engineers, its more dangerous than it is helpful. Anyway, thats my $.02. Dont worry, you can keep the change. Matt Filion CSC - GTS -- Raytheon - ISF (818) 468-6271 [EMAIL PROTECTED] This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. puchacz [EMAIL PROTECTED] 03/02/2007 01:36 PM Please respond to Struts Users Mailing List user@struts.apache.org To user@struts.apache.org cc Subject Re: [S2] Working with other technologies I was searching in struts 1 lib directory and there is nothing like struts-2-{plugin name}-plugin.jar. I found it in Struts 2 but I would like to know how the situation looks in Struts 1. I know that i am bothering You, but I am a student who's compering Frameworks and I do this with Struts 1, Spring , and others. PLEASE tell me with what technologies I can intagrate STRUTS 1 ( all posibilities). Please :) Dave Newton-4 wrote: S1-Spring integration is also quite simple and the Spring distro includes several classes that make Actions-as-beans configuration trivial. --- puchacz [EMAIL PROTECTED] wrote: Ok thank YOu very much for Your answer, but I will ask You for something else :-). All You told me it's for Struts 2, but do You know if there was the same situation with Strus 1 ??? Thanx Matt Filion wrote: There are a lot of plugins that are shipped with the full struts release (if you look at the lib folder they have the name struts-2-{plugin name}-plugin.jar). There is one in there for spring and another for JSF. There are also example applications shipped with struts 2 the one I suggest you take a look at is the showcase. It has an example of struts 2 with JSF. As far as spring integration my understanding take a look at this link. Its says its for webwork but struts 2 is based on webwork so it should still apply. http://www.learntechnology.net/content/webwork/webwork_crud_lm.jsp If you are really interested in a specific architectural implementation I suggest that you just install struts 2 and start playing around with it. There is no better way to learn that trying it out. However, from the way you worded your question I think you may want to gain a better understanding of these specific technologies, since they dont clash the way your phrase implies. Both Spring and JSF both compliment a Struts2 implementation. Matt Filion CSC - GTS -- Raytheon - ISF (818) 468-6271 [EMAIL PROTECTED] This is a PRIVATE
What view technologies I can use with Struts 1 ???
Hi I make comaprison of frameworks (Spring, Struts 1 and JSF) If anyone could list me all view technologies that I can use with JSF? And tell me where I can find information how to add them to application. Please... ps In Spring 2.0 those are: o JSP o Excel o Tiles o Velocity o FreeMarker -- View this message in context: http://www.nabble.com/What-view-technologies-I-can-use-with-Struts-1-tf3336636.html#a9279545 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What view technologies I can use with Struts 1 ???
Maybe it's just Friday and I'm tired and cranky, but can't you do your own homework? You're not going to learn anything by having us do it for you. Several people have suggested starting with some Google research -- I agree that would be a good place to start. Research is so easy these days that there's no excuse for not doing it. Sorry for being a grump. Chris -Original Message- From: puchacz [mailto:[EMAIL PROTECTED] Sent: Friday, March 02, 2007 6:25 PM To: user@struts.apache.org Subject: What view technologies I can use with Struts 1 ??? Hi I make comaprison of frameworks (Spring, Struts 1 and JSF) If anyone could list me all view technologies that I can use with JSF? And tell me where I can find information how to add them to application. Please... ps In Spring 2.0 those are: o JSP o Excel o Tiles o Velocity o FreeMarker -- View this message in context: http://www.nabble.com/What-view-technologies-I-can-use-with-Struts-1 -tf3336636.html#a9279545 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What view technologies I can use with Struts 1 ???
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Puchaz, puchacz wrote: If anyone could list me all view technologies that I can use with JSF? And tell me where I can find information how to add them to application. Please... ps In Spring 2.0 those are: o JSP o Excel o Tiles o Velocity o FreeMarker Don't forget JDBC. That's pretty easy to integrate. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF6LhJ9CaO5/Lv0PARAh5WAJ91Cvi4ivS5MhchlxF/G6PhcNxMZwCfbAKP Ad+gAd3Gv+7vqTgm6nji5y8= =s7dK -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutputStreamPath
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, Dave Newton wrote: --- Laurie Harper [EMAIL PROTECTED] wrote: URL res = Thread.currentThread() .getContextClassLoader() .getResource(pathToConfigurationFile); // Save the properties OutputStream out = new FileOutputStream(res); properties.store(out, ); Ooo, I didn't know that. Hopefully I'll never want to use it, but still really good to know! :) I'm not sure where this will work. FileOutputStream doesn't accept a URL as a constructor argument. I think it's something more involved like: URL res = ...; URLConnection conn = res.openConnection(); conn.setDoOutput(true); OutputStream out = conn.getOutputStream(); Of course, you'd want lots of error checking, too. It's still butt-ugly. Or, more simply, URL res = ...; String path = res.getPath(); OutputStrem out = new FileOutputStream(path); ... I think you should be guaranteed a file URL from getResource(), at least in the situations where this whole approach is viable (i.e. where the target file is going to be a writable resource). L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LazyLists
My first guess would be that your accessor methods are inconsistent: public List getBeneficiaries() public BeneficiaryVO getBeneficiaries(int index) public void setBeneficiaries(BeneficiaryVO beneficiaryVO) The setter is wrong, which will confuse the property introspection. On the other hand, you said if you remove the indexed getter things start working, though that would still leave you with inconsistent method signatures, so I'm not sure. What happens if you remove the setter instead? Change it to take a List argument? Change it to take a BeneficiaryVO and an index? I always have to check what the JavaBeans spec requires for indexed properties, but if you make sure you follow those conventions you should be OK. L. Glenn wrote: Thanks for the help its very appreciated. This code has been working for over a year without any problems in a Java 1.4 and J2EE 1.3. The LazyList hand cranking can be found here: http://wiki.apache.org/struts/StrutsCatalogLazyList Here are the plain methods in the InsuranceForm: private BeneficiaryVO beneficiary = new BeneficiaryVO(); /** * Methods to hand crank Beneficiary lazy list */ public List getBeneficiaries() { return beneficiaries; } public BeneficiaryVO getBeneficiaries(int index) { while (index = beneficiaries.size()) { beneficiaries.add(new BeneficiaryVO()); } return (BeneficiaryVO) beneficiaries.get(index); } public void setBeneficiaries(BeneficiaryVO beneficiaryVO) { beneficiaries.add(beneficiaryVO); } public void populateBeneficiaries(List beneficiaries) { this.beneficiaries.addAll(beneficiaries); } public void resetBeneficiaries(List beneficiaries) { this.beneficiaries = beneficiaries; } This is the error I get:[Servlet Error]-[action]: * javax.servlet.jsp.el.ELException*: Unable to find a value for beneficiaries in object of class hronline.secure.personal.insurances.InsuranceForm using operator . I have debugged the code in the debugger and there is data in the Beneficiaries list (just before exiting the ActionForm). Also, the InsuranceForm has other attributes that are displayable. Here is the wierd part... if I comment out this method: public BeneficiaryVO getBeneficiaries(int index) { while (index = beneficiaries.size()) { beneficiaries.add(new BeneficiaryVO()); } return (BeneficiaryVO) beneficiaries.get(index); } the page is now displayed, no error. However the application won't work since it needs the method to capture the submitted data. What is going on? Any clues? - Glenn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]