Please help me in resolving the problem(dojo + struts 2)
I am trying to do a sample ajax application(Struts 2.3 latest) which is based on dojo. but the ajax functionality not working for me. I have included the necessary dojo plugin in the classpath. but still the ajax functionality is not working.. getting the following errors while testing my action. .. pls help *Error 1* TypeError: $Rev$.match(...) is null revision: Number($Rev$.match(/[0-9]+/)[0]), *Error 2* TypeError: dojo.require is not a function dojo.hostenv.writeIncludes(true); Please help me in resolving the issue.
Re: Please help me in resolving the problem(dojo + struts 2)
Have you tried using jquery plugin, dojo is outdated plugin for strust2 latest. Fyi : https://cwiki.apache.org/confluence/display/S2PLUGINS/jQuery+plugin+-+Easy+AJAX+and+Widget+Integration -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Mon, Jul 7, 2014 at 4:37 PM, Ratna Kar ratnakarb.t...@gmail.com wrote: I am trying to do a sample ajax application(Struts 2.3 latest) which is based on dojo. but the ajax functionality not working for me. I have included the necessary dojo plugin in the classpath. but still the ajax functionality is not working.. getting the following errors while testing my action. .. pls help *Error 1* TypeError: $Rev$.match(...) is null revision: Number($Rev$.match(/[0-9]+/)[0]), *Error 2* TypeError: dojo.require is not a function dojo.hostenv.writeIncludes(true); Please help me in resolving the issue.
Re: Please help me in resolving the problem(dojo + struts 2)
Thanks Srikanth.. Seems like there is a bug on the above issue.. https://issues.apache.org/jira/browse/WW-4349 Also seems like dojo plugin is going to be deprecated from the next major release 2.5.. Can any one confirm this.. One more question, in order to develop ajax based application... Which plugin is more suitable and popular at this point of time.. ? Is it jquery plugin ? Please help me in choosing the right plugin.. Thanks once again On Mon, Jul 7, 2014 at 4:49 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Have you tried using jquery plugin, dojo is outdated plugin for strust2 latest. Fyi : https://cwiki.apache.org/confluence/display/S2PLUGINS/jQuery+plugin+-+Easy+AJAX+and+Widget+Integration -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Mon, Jul 7, 2014 at 4:37 PM, Ratna Kar ratnakarb.t...@gmail.com wrote: I am trying to do a sample ajax application(Struts 2.3 latest) which is based on dojo. but the ajax functionality not working for me. I have included the necessary dojo plugin in the classpath. but still the ajax functionality is not working.. getting the following errors while testing my action. .. pls help *Error 1* TypeError: $Rev$.match(...) is null revision: Number($Rev$.match(/[0-9]+/)[0]), *Error 2* TypeError: dojo.require is not a function dojo.hostenv.writeIncludes(true); Please help me in resolving the issue.
Re: Please help me in resolving the problem(dojo + struts 2)
Yes its, within my knowledge, jquery plugin is at the top priority now. -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Mon, Jul 7, 2014 at 5:08 PM, Ratna Kar ratnakarb.t...@gmail.com wrote: Thanks Srikanth.. Seems like there is a bug on the above issue.. https://issues.apache.org/jira/browse/WW-4349 Also seems like dojo plugin is going to be deprecated from the next major release 2.5.. Can any one confirm this.. One more question, in order to develop ajax based application... Which plugin is more suitable and popular at this point of time.. ? Is it jquery plugin ? Please help me in choosing the right plugin.. Thanks once again On Mon, Jul 7, 2014 at 4:49 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Have you tried using jquery plugin, dojo is outdated plugin for strust2 latest. Fyi : https://cwiki.apache.org/confluence/display/S2PLUGINS/jQuery+plugin+-+Easy+AJAX+and+Widget+Integration -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Mon, Jul 7, 2014 at 4:37 PM, Ratna Kar ratnakarb.t...@gmail.com wrote: I am trying to do a sample ajax application(Struts 2.3 latest) which is based on dojo. but the ajax functionality not working for me. I have included the necessary dojo plugin in the classpath. but still the ajax functionality is not working.. getting the following errors while testing my action. .. pls help *Error 1* TypeError: $Rev$.match(...) is null revision: Number($Rev$.match(/[0-9]+/)[0]), *Error 2* TypeError: dojo.require is not a function dojo.hostenv.writeIncludes(true); Please help me in resolving the issue.
Re: Please help me in resolving the problem(dojo + struts 2)
Hi Ratna, For AJAX implementation JQuery is best as you can find lots of option and example to implement it. Re: Please help me in resolving the problem(dojo + struts 2) Ratna Kar to: Struts Users Mailing List 07/07/2014 05:11 PM Please respond to Struts Users Mailing List Thanks Srikanth.. Seems like there is a bug on the above issue.. https://issues.apache.org/jira/browse/WW-4349 Also seems like dojo plugin is going to be deprecated from the next major release 2.5.. Can any one confirm this.. One more question, in order to develop ajax based application... Which plugin is more suitable and popular at this point of time.. ? Is it jquery plugin ? Please help me in choosing the right plugin.. Thanks once again On Mon, Jul 7, 2014 at 4:49 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Have you tried using jquery plugin, dojo is outdated plugin for strust2 latest. Fyi : https://cwiki.apache.org/confluence/display/S2PLUGINS/jQuery+plugin+-+Easy+AJAX+and+Widget+Integration -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Mon, Jul 7, 2014 at 4:37 PM, Ratna Kar ratnakarb.t...@gmail.com wrote: I am trying to do a sample ajax application(Struts 2.3 latest) which is based on dojo. but the ajax functionality not working for me. I have included the necessary dojo plugin in the classpath. but still the ajax functionality is not working.. getting the following errors while testing my action. .. pls help *Error 1* TypeError: $Rev$.match(...) is null revision: Number($Rev$.match(/[0-9]+/)[0]), *Error 2* TypeError: dojo.require is not a function dojo.hostenv.writeIncludes(true); Please help me in resolving the issue.
Re: Please help me in resolving the problem(dojo + struts 2)
Thanks srikanth and manoj. Please point me good documentation w.r.t jquery struts 2. I want to do some samples w.r.t ajax and i need to add the required jar's before doing the sample apps. (please suggest good documentation link to know these things.) On Mon, Jul 7, 2014 at 5:11 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Yes its, within my knowledge, jquery plugin is at the top priority now. -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Mon, Jul 7, 2014 at 5:08 PM, Ratna Kar ratnakarb.t...@gmail.com wrote: Thanks Srikanth.. Seems like there is a bug on the above issue.. https://issues.apache.org/jira/browse/WW-4349 Also seems like dojo plugin is going to be deprecated from the next major release 2.5.. Can any one confirm this.. One more question, in order to develop ajax based application... Which plugin is more suitable and popular at this point of time.. ? Is it jquery plugin ? Please help me in choosing the right plugin.. Thanks once again On Mon, Jul 7, 2014 at 4:49 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Have you tried using jquery plugin, dojo is outdated plugin for strust2 latest. Fyi : https://cwiki.apache.org/confluence/display/S2PLUGINS/jQuery+plugin+-+Easy+AJAX+and+Widget+Integration -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Mon, Jul 7, 2014 at 4:37 PM, Ratna Kar ratnakarb.t...@gmail.com wrote: I am trying to do a sample ajax application(Struts 2.3 latest) which is based on dojo. but the ajax functionality not working for me. I have included the necessary dojo plugin in the classpath. but still the ajax functionality is not working.. getting the following errors while testing my action. .. pls help *Error 1* TypeError: $Rev$.match(...) is null revision: Number($Rev$.match(/[0-9]+/)[0]), *Error 2* TypeError: dojo.require is not a function dojo.hostenv.writeIncludes(true); Please help me in resolving the issue.
Re: Please help me in resolving the problem(dojo + struts 2)
Hi Ratna, Just go to Jquery Ajax API this url and you will find all ajax implementation. you just need to specify url, data, and type and on success what ever you want to do just do... Re: Please help me in resolving the problem(dojo + struts 2) Ratna Kar to: Struts Users Mailing List 07/07/2014 05:41 PM Please respond to Struts Users Mailing List Thanks srikanth and manoj. Please point me good documentation w.r.t jquery struts 2. I want to do some samples w.r.t ajax and i need to add the required jar's before doing the sample apps. (please suggest good documentation link to know these things.) On Mon, Jul 7, 2014 at 5:11 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Yes its, within my knowledge, jquery plugin is at the top priority now. -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Mon, Jul 7, 2014 at 5:08 PM, Ratna Kar ratnakarb.t...@gmail.com wrote: Thanks Srikanth.. Seems like there is a bug on the above issue.. https://issues.apache.org/jira/browse/WW-4349 Also seems like dojo plugin is going to be deprecated from the next major release 2.5.. Can any one confirm this.. One more question, in order to develop ajax based application... Which plugin is more suitable and popular at this point of time.. ? Is it jquery plugin ? Please help me in choosing the right plugin.. Thanks once again On Mon, Jul 7, 2014 at 4:49 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Have you tried using jquery plugin, dojo is outdated plugin for strust2 latest. Fyi : https://cwiki.apache.org/confluence/display/S2PLUGINS/jQuery+plugin+-+Easy+AJAX+and+Widget+Integration -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Mon, Jul 7, 2014 at 4:37 PM, Ratna Kar ratnakarb.t...@gmail.com wrote: I am trying to do a sample ajax application(Struts 2.3 latest) which is based on dojo. but the ajax functionality not working for me. I have included the necessary dojo plugin in the classpath. but still the ajax functionality is not working.. getting the following errors while testing my action. .. pls help *Error 1* TypeError: $Rev$.match(...) is null revision: Number($Rev$.match(/[0-9]+/)[0]), *Error 2* TypeError: dojo.require is not a function dojo.hostenv.writeIncludes(true); Please help me in resolving the issue.
Re: Struts 2, session, s:iterator s:if not working, please help (this is revised)
Hi John, You have to use var instead of id in the s:iterator tag. Antonios On 19 November 2013 07:06, Lukasz Lenart lukaszlen...@apache.org wrote: Have you tried to use s:debug/ tag? 2013/11/19 john lee sh_thorn_b...@yahoo.com: from the following output, we can tell sell_price=36.97, display_price=1 why none of test statement works ? please advise, thanks in advance john Class Part { float sell_price; int display_price; ./*..get set here */ Action.java ArrayListPart parts=new ArrayListPart(); ./* doing some calculation for multiple part*/ session.put(detailpart,parts); JSP file s:iterator id=part value=#session.detailpart whys:property value=sell_price/- s:property value=display_price/why s:if test='%{#part.display_price==1}' 9s:property value=sell_price/9 /s:if s:if test='#part.display_price==1' 8s:property value=sell_price/8 /s:if s:if test='part.display_price==1' 7s:property value=sell_price/7 /s:if s:if test='%{#display_price==1}' 6s:property value=sell_price/6 /s:if s:if test='#display_price==1' 5s:property value=sell_price/5 /s:if end /s:iterator OutPut why 36.97- 1 why end - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts 2, session, s:iterator s:if not working, please help (this is revised)
from the following output, we can tell sell_price=36.97, display_price=1 why none of test statement works ? please advise, thanks in advance john Class Part { float sell_price; int display_price; ./*..get set here */ Action.java ArrayListPart parts=new ArrayListPart(); ./* doing some calculation for multiple part*/ session.put(detailpart,parts); JSP file s:iterator id=part value=#session.detailpart whys:property value=sell_price/- s:property value=display_price/why s:if test='%{#part.display_price==1}' 9s:property value=sell_price/9 /s:if s:if test='#part.display_price==1' 8s:property value=sell_price/8 /s:if s:if test='part.display_price==1' 7s:property value=sell_price/7 /s:if s:if test='%{#display_price==1}' 6s:property value=sell_price/6 /s:if s:if test='#display_price==1' 5s:property value=sell_price/5 /s:if end /s:iterator OutPut why 36.97- 1 why end
Re: Struts 2, session, s:iterator s:if not working, please help (this is revised)
Have you tried to use s:debug/ tag? 2013/11/19 john lee sh_thorn_b...@yahoo.com: from the following output, we can tell sell_price=36.97, display_price=1 why none of test statement works ? please advise, thanks in advance john Class Part { float sell_price; int display_price; ./*..get set here */ Action.java ArrayListPart parts=new ArrayListPart(); ./* doing some calculation for multiple part*/ session.put(detailpart,parts); JSP file s:iterator id=part value=#session.detailpart whys:property value=sell_price/- s:property value=display_price/why s:if test='%{#part.display_price==1}' 9s:property value=sell_price/9 /s:if s:if test='#part.display_price==1' 8s:property value=sell_price/8 /s:if s:if test='part.display_price==1' 7s:property value=sell_price/7 /s:if s:if test='%{#display_price==1}' 6s:property value=sell_price/6 /s:if s:if test='#display_price==1' 5s:property value=sell_price/5 /s:if end /s:iterator OutPut why 36.97- 1 why end - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: hi please help me struts2
thanks for the reply so by using the struts 2.1.8 jar files from apache the validation by giving he validation=true has to worked for that i asked on using hibernate the hibernate will make the class by anotation and for the validation also we has to do the same how can i make a crud with hibernate as model jsp as view struts2 as controller. in the struts2 is that the interceptor is excluded for the validation to remove for inpit and how On Fri, Jul 9, 2010 at 6:19 PM, Brian Thompson elephant...@gmail.comwrote: For client-side validation: Just write a javascript function and have it run for either the onclick event of the form submit button or the onsubmit event for the form itself. For Hibernate by property file, I'm not sure what you mean. I've always used either hibernate.cfg.xml files or annotations in the model classes. Could you post an example of what you're trying to do? -Brian On Fri, Jul 9, 2010 at 7:39 AM, Salish S ssal...@gmail.com wrote: -- Forwarded message -- From: Salish S ssal...@gmail.com Date: Fri, Jul 9, 2010 at 6:07 PM Subject: hi please help me struts2 To: es...@vaannila.com es...@vaannila.com Hi i had gone through the struts2 crud in the http://www.vaannila.com/struts-2/struts-2-example/struts-2-crud-example-1.html its fine and goog pgm for me but the problem came when i want to add client side validation how i add clientside validation i had gone though the hibernate validation also its also fine http://www.vaannila.com/struts-2/struts-2-tutorial/struts-2-hibernate-validation-tutorial-1.html is that clientside validation is doing therer and very important is that How can i use hibernate by property file not that by the hibernate.cfg.xml file to connectt to db in the same example please help me thenkuse - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Fwd: hi please help me struts2
-- Forwarded message -- From: Salish S ssal...@gmail.com Date: Fri, Jul 9, 2010 at 6:07 PM Subject: hi please help me struts2 To: es...@vaannila.com es...@vaannila.com Hi i had gone through the struts2 crud in the http://www.vaannila.com/struts-2/struts-2-example/struts-2-crud-example-1.html its fine and goog pgm for me but the problem came when i want to add client side validation how i add clientside validation i had gone though the hibernate validation also its also fine http://www.vaannila.com/struts-2/struts-2-tutorial/struts-2-hibernate-validation-tutorial-1.html is that clientside validation is doing therer and very important is that How can i use hibernate by property file not that by the hibernate.cfg.xml file to connectt to db in the same example please help me thenkuse
Re: hi please help me struts2
For client-side validation: Just write a javascript function and have it run for either the onclick event of the form submit button or the onsubmit event for the form itself. For Hibernate by property file, I'm not sure what you mean. I've always used either hibernate.cfg.xml files or annotations in the model classes. Could you post an example of what you're trying to do? -Brian On Fri, Jul 9, 2010 at 7:39 AM, Salish S ssal...@gmail.com wrote: -- Forwarded message -- From: Salish S ssal...@gmail.com Date: Fri, Jul 9, 2010 at 6:07 PM Subject: hi please help me struts2 To: es...@vaannila.com es...@vaannila.com Hi i had gone through the struts2 crud in the http://www.vaannila.com/struts-2/struts-2-example/struts-2-crud-example-1.html its fine and goog pgm for me but the problem came when i want to add client side validation how i add clientside validation i had gone though the hibernate validation also its also fine http://www.vaannila.com/struts-2/struts-2-tutorial/struts-2-hibernate-validation-tutorial-1.html is that clientside validation is doing therer and very important is that How can i use hibernate by property file not that by the hibernate.cfg.xml file to connectt to db in the same example please help me thenkuse - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
hi please help me struts2 with hibernate
hi hello i had done the project as described in this site example http://www.vaannila.com/struts-2/struts-2-example/struts-2-crud-example-1.html its working fine just the change is that the Db i used is mysql thatall But how can i do the clientside validtion by xml file and how can i do the same with hibernate config file not with a cfg file Please check and tell me Thanks in advance
RE: Please Help with struts2
namekey/name requiredrequired/required rtexprvaluefalse/rtexprvalue /attribute /tag tag namepassword/name tag-classorg.apache.struts2.views.jsp.ui.PasswordTag/tag-class body-contentJSP/body-content attribute namekey/name requiredrequired/required rtexprvaluefalse/rtexprvalue /attribute /tag tag nameinclude/name tag-classorg.apache.struts2.views.jsp.IncludeTag/tag-class body-contentJSP/body-content attribute namevalue/name requiredrequired/required rtexprvaluefalse/rtexprvalue /attribute /tag tag nameaction/name tag-classorg.apache.struts2.views.jsp.ActionTag/tag-class body-contentJSP/body-content attribute nameid/name requiredrequired/required rtexprvaluefalse/rtexprvalue /attribute attribute namename/name requiredrequired/required rtexprvaluefalse/rtexprvalue /attribute attribute namename/name requiredrequired/required rtexprvaluefalse/rtexprvalue /attribute attribute nameexecuteResult/name requiredrequired/required rtexprvaluefalse/rtexprvalue /attribute attribute namenamespace/name requiredrequired/required rtexprvaluefalse/rtexprvalue /attribute /tag tag nameiterator/name tag-classorg.apache.struts2.views.jsp.IteratorTag/tag-class body-contentJSP/body-content attribute namevalue/name requiredrequired/required rtexprvaluefalse/rtexprvalue /attribute attribute namestatus/name requiredrequired/required rtexprvaluefalse/rtexprvalue /attribute /tag tag nameif/name tag-classorg.apache.struts2.views.jsp.IfTag/tag-class body-contentJSP/body-content attribute nametest/name requiredrequired/required rtexprvaluefalse/rtexprvalue /attribute /tag tag nameelse/name tag-classorg.apache.struts2.views.jsp.ElseTag/tag-class body-contentJSP/body-content attribute nameid/name requiredrequired/required rtexprvaluefalse/rtexprvalue /attribute /tag tag namedate/name tag-classorg.apache.struts2.views.jsp.DateTag/tag-class body-contentJSP/body-content attribute namename/name requiredrequired/required rtexprvaluefalse/rtexprvalue /attribute /tag tag namesubmit/name tag-classorg.apache.struts2.views.jsp.ui.SubmitTag/tag-class /tag /taglib Thanks - Original Message - From: Martin Gainty mgai...@hotmail.com To: Struts Users Mailing List user@struts.apache.org Sent: Sunday, September 27, 2009 2:47 AM Subject: [Norton AntiSpam] RE: Please Help with struts2 which container are you using? please display entire jsp please display web.xml please display any applicable tld's Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Sat, 26 Sep 2009 15:26:57 -0400 From: newton.d...@yahoo.com To: user@struts.apache.org Subject: Re: Please Help with struts2 Konstantyn Harasevich wrote: Here is exception relative to this taglib in NetBeans7.1: %@ taglib uri=http://www.opensymphony.com/sitemesh/decorator; prefix=decorator % org.apache.jasper.JasperException: /WEB-INF/decorators/main.jsp(26,72) PWC6188: The absolute uri: http://www.opensymphony.com/sitemesh/page cannot be resolved in either web.xml or the jar files deployed with this application Do not now reason why this error appear because this is valid url ? I don't see how that exception could occur with that taglib directive--they're completely different uri values. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
Please Help with struts2
Hello When running samples struts 2 Here is exception relative to this taglib in NetBeans7.1: %@ taglib uri=http://www.opensymphony.com/sitemesh/decorator; prefix=decorator % org.apache.jasper.JasperException: /WEB-INF/decorators/main.jsp(26,72) PWC6188: The absolute uri: http://www.opensymphony.com/sitemesh/page cannot be resolved in either web.xml or the jar files deployed with this application Do not now reason why this error appear because this is valid url ? Thanks.
Re: Please Help with struts2
Konstantyn Harasevich wrote: Here is exception relative to this taglib in NetBeans7.1: %@ taglib uri=http://www.opensymphony.com/sitemesh/decorator; prefix=decorator % org.apache.jasper.JasperException: /WEB-INF/decorators/main.jsp(26,72) PWC6188: The absolute uri: http://www.opensymphony.com/sitemesh/page cannot be resolved in either web.xml or the jar files deployed with this application Do not now reason why this error appear because this is valid url ? I don't see how that exception could occur with that taglib directive--they're completely different uri values. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Please Help with struts2
which container are you using? please display entire jsp please display web.xml please display any applicable tld's Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Sat, 26 Sep 2009 15:26:57 -0400 From: newton.d...@yahoo.com To: user@struts.apache.org Subject: Re: Please Help with struts2 Konstantyn Harasevich wrote: Here is exception relative to this taglib in NetBeans7.1: %@ taglib uri=http://www.opensymphony.com/sitemesh/decorator; prefix=decorator % org.apache.jasper.JasperException: /WEB-INF/decorators/main.jsp(26,72) PWC6188: The absolute uri: http://www.opensymphony.com/sitemesh/page cannot be resolved in either web.xml or the jar files deployed with this application Do not now reason why this error appear because this is valid url ? I don't see how that exception could occur with that taglib directive--they're completely different uri values. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org _ Lauren found her dream laptop. Find the PC that’s right for you. http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290
Re: Please Help with struts2
Do you also have an exception for the decorator tag library? The one you have in your post is for the page tag library. Check that you have the struts2-sitemesh-plugin jar in WEB-INF/lib because that is where those tag libraries are. Also check that your web.xml has the appropriate elements for Sitemesh Chris -Original Message- From: Konstantyn Harasevich harasev...@yandex.ru To: Struts Users Mailing List user@struts.apache.org Sent: Sat, Sep 26, 2009 2:04 pm Subject: Please Help with struts2 Hello When running samples struts 2 Here is exception relative to this taglib in NetBeans7.1: %@ taglib uri=http://www.opensymphony.com/sitemesh/decorator; prefix=decorator % org.apache.jasper.JasperException: /WEB-INF/decorators/main.jsp(26,72) PWC6188: The absolute uri: http://www.opensymphony.com/sitemesh/page cannot be resolved in either web.xml or the jar files deployed with this application Do not now reason why this error appear because this is valid url ? Thanks.
Re: Strut2 Picture Upload question: Please Help!
Take a look at the showcase there are many sample for ajax form submits. http://www.weinfreund.de/struts2-jquery-showcase/ sx:head / s:form id=form action=echo theme=simple Echo: s:textfield id=echo name=echo value=Hello World!!!/ sj:submit targets=result value=AJAX Submit indicator=indicator/ /s:form This form works also with an fileupload element. hisameer wrote: Thanks for your reply. Can you please put some sample code in this regard. I am trying to read jquery plug-in documentation but would be great if you can put just a sample code for one picand I will handle the rest of it. Thanks in advance. Johannes Geppert wrote: you can use the jQuery Plugin for this use case. jQuery makes automatically a iframe submit for forms with file upload. http://code.google.com/p/struts2-jquery/ - --- web: http://www.jgeppert.com twitter: http://twitter.com/jogep -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp25266760p25290137.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Strut2 Picture Upload question: Please Help!
thanks for the info can you specify a div tag to receive results from action? any ability to specify received format eg json/xml? danke, Martin __ Verzicht und Vertraulichkeitanmerkung Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Date: Fri, 4 Sep 2009 01:21:30 -0700 From: jo...@web.de To: user@struts.apache.org Subject: Re: Strut2 Picture Upload question: Please Help! Take a look at the showcase there are many sample for ajax form submits. http://www.weinfreund.de/struts2-jquery-showcase/ sx:head / s:form id=form action=echo theme=simple Echo: s:textfield id=echo name=echo value=Hello World!!!/ sj:submit targets=result value=AJAX Submit indicator=indicator/ /s:form This form works also with an fileupload element. hisameer wrote: Thanks for your reply. Can you please put some sample code in this regard. I am trying to read jquery plug-in documentation but would be great if you can put just a sample code for one picand I will handle the rest of it. Thanks in advance. Johannes Geppert wrote: you can use the jQuery Plugin for this use case. jQuery makes automatically a iframe submit for forms with file upload. http://code.google.com/p/struts2-jquery/ - --- web: http://www.jgeppert.com twitter: http://twitter.com/jogep -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp25266760p25290137.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org _ Windows Live: Keep your friends up to date with what you do online. http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_online:082009
RE: Strut2 Picture Upload question: Please Help!
Hello Martin, did you take a look at the showcase? There are many examples for remote divs. Nice weekend Johannes mgainty wrote: thanks for the info can you specify a div tag to receive results from action? any ability to specify received format eg json/xml? danke, Martin - --- web: http://www.jgeppert.com twitter: http://twitter.com/jogep -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp25266760p25295825.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Strut2 Picture Upload question: Please Help!
- Original Message From: hisameer cool_sameer_fo...@yahoo.com To: user@struts.apache.org Sent: Wednesday, September 2, 2009 4:49:05 PM Subject: RE: Strut2 Picture Upload question: Please Help! Thanks for your comment. But my question is How can it be done using AJAX? I am using dojo plugin in my struts application. But if I use type=file name=docs value=Brows width=400px/ then it also shows the brows location as well. But in my case its only a simple upload button.What should I do? And initially there has to be a placeholder for those pictures as well. I am totally confused. Please help! Lee Clemens-4 wrote: Maybe have the Upload buttons refresh the page? And load the images from the action? Otherwise it would have to be done client side (ajax?) -Original Message- From: hisameer [mailto:cool_sameer_fo...@yahoo.com] Sent: Wednesday, September 02, 2009 6:27 PM To: user@struts.apache.org Subject: Strut2 Picture Upload question: Please Help! I am using Struts 2.1.6 and in my application I have a requirement where the user can upload four pictures of his vehicle.In my JSP, there will be four upload buttons corresponding to those four pics(As shown in the below image). After the user is done selecting the file it should be uploaded in the JSP right away. Below image shows the actual display of the requirement. http://www.nabble.com/file/p25266760/picUploading.jpg Can somebody put some sample code for this kind of requirement or suggest me what should I do? I am sure this is just a simple requirement but I am not able to crack it. -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp252 66760p25266760.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp25266760p25267581.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org I don't get what you're trying to achieve... scenario 1: something like youtube.com ajax uploads? The user can upload multiple files but only will be uploading while the rest in queue. The user can modify the settings as necessary (names, description, etc) while in the upload page and the files are uploading. scenario 2: the user selects a picture and ajax will show the picture dynamically on the browser so the user is looking at the picture to confirm it's the right picture prior to upload action??? NOT POSSIBLE! If this was, every identity thief on the net would have field days... scenario 3: the user select multiple files to be uploaded at once?? You might want to look deeper into the commons FileUpload... it's very nice and powerful if you can implement it correctly. If you haven't noticed it by now, most of the java frameworks I've seen Struts (1 2), JSF (Apache's MyFaces and Sun's Visual) uses the commons FileUpload. Regards, Tommy - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Strut2 Picture Upload question: Please Help!
A form with file input can't be submitted with Ajax. You either have to do some iframe magic or use a flash component. Do a google search for ajax file upload to find some options. I've been using SWFUpload [1] for this purpose. Nils-H [1] - http://code.google.com/p/swfupload/ On Thu, Sep 3, 2009 at 1:49 AM, hisameercool_sameer_fo...@yahoo.com wrote: Thanks for your comment. But my question is How can it be done using AJAX? I am using dojo plugin in my struts application. But if I use input type=file name=docs value=Brows width=400px/ then it also shows the brows location as well. But in my case its only a simple upload button.What should I do? And initially there has to be a placeholder for those pictures as well. I am totally confused. Please help! Lee Clemens-4 wrote: Maybe have the Upload buttons refresh the page? And load the images from the action? Otherwise it would have to be done client side (ajax?) -Original Message- From: hisameer [mailto:cool_sameer_fo...@yahoo.com] Sent: Wednesday, September 02, 2009 6:27 PM To: user@struts.apache.org Subject: Strut2 Picture Upload question: Please Help! I am using Struts 2.1.6 and in my application I have a requirement where the user can upload four pictures of his vehicle.In my JSP, there will be four upload buttons corresponding to those four pics(As shown in the below image). After the user is done selecting the file it should be uploaded in the JSP right away. Below image shows the actual display of the requirement. http://www.nabble.com/file/p25266760/picUploading.jpg Can somebody put some sample code for this kind of requirement or suggest me what should I do? I am sure this is just a simple requirement but I am not able to crack it. -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp252 66760p25266760.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp25266760p25267581.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Strut2 Picture Upload question: Please Help!
you can use the jQuery Plugin for this use case. jQuery makes automatically a iframe submit for forms with file upload. http://code.google.com/p/struts2-jquery/ Nils-Helge Garli wrote: A form with file input can't be submitted with Ajax. You either have to do some iframe magic or use a flash component. Do a google search for ajax file upload to find some options. I've been using SWFUpload [1] for this purpose. Nils-H - --- web: http://www.jgeppert.com twitter: http://twitter.com/jogep -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp25266760p25275259.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Strut2 Picture Upload question: Please Help!
I want to do something like this:-The user has upload button. There is an tag on the top of that button which has a picture saying please upload the picture. When the user clicks on upload button the file browser will open and user can select whatever picture he wants to upload. When user clicks ok the picture will be displayed in the JSP page replacing the please upload picture message . There are four upload buttons in that page and at the bottom there is save button. When the user hits save button all the pictures along with other input data should be saved. I hope the requirement is clear now. Please put your suggestions or any sample code if you have. hisameer wrote: Thanks for your comment. But my question is How can it be done using AJAX? I am using dojo plugin in my struts application. But if I use input type=file name=docs value=Brows width=400px/ then it also shows the brows location as well. But in my case its only a simple upload button.What should I do? And initially there has to be a placeholder for those pictures as well. I am totally confused. Please help! Lee Clemens-4 wrote: Maybe have the Upload buttons refresh the page? And load the images from the action? Otherwise it would have to be done client side (ajax?) -Original Message- From: hisameer [mailto:cool_sameer_fo...@yahoo.com] Sent: Wednesday, September 02, 2009 6:27 PM To: user@struts.apache.org Subject: Strut2 Picture Upload question: Please Help! I am using Struts 2.1.6 and in my application I have a requirement where the user can upload four pictures of his vehicle.In my JSP, there will be four upload buttons corresponding to those four pics(As shown in the below image). After the user is done selecting the file it should be uploaded in the JSP right away. Below image shows the actual display of the requirement. http://www.nabble.com/file/p25266760/picUploading.jpg Can somebody put some sample code for this kind of requirement or suggest me what should I do? I am sure this is just a simple requirement but I am not able to crack it. -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp252 66760p25266760.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp25266760p25276582.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Strut2 Picture Upload question: Please Help!
Thanks for your reply. Can you please put some sample code in this regard. I am trying to read jquery plug-in documentation but would be great if you can put just a sample code for one picand I will handle the rest of it. Thanks in advance. Johannes Geppert wrote: you can use the jQuery Plugin for this use case. jQuery makes automatically a iframe submit for forms with file upload. http://code.google.com/p/struts2-jquery/ Nils-Helge Garli wrote: A form with file input can't be submitted with Ajax. You either have to do some iframe magic or use a flash component. Do a google search for ajax file upload to find some options. I've been using SWFUpload [1] for this purpose. Nils-H -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp25266760p25276624.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Strut2 Picture Upload question: Please Help!
- Original Message From: hisameer cool_sameer_fo...@yahoo.com To: user@struts.apache.org Sent: Thursday, September 3, 2009 6:54:14 AM Subject: RE: Strut2 Picture Upload question: Please Help! I want to do something like this:-The user has upload button. There is an tag on the top of that button which has a picture saying please upload the picture. When the user clicks on upload button the file browser will open and user can select whatever picture he wants to upload. When user clicks ok the picture will be displayed in the JSP page replacing the please upload If you want to display the selected page dynamically before the actual upload takes place, see my reply regarding scenario 2: scenario 2: the user selects a picture and ajax will show the picture dynamically on the browser so the user is looking at the picture to confirm it's the right picture prior to upload action??? NOT POSSIBLE! If this was, every identity thief on the net would have field days... picture message . There are four upload buttons in that page and at the bottom there is save button. When the user hits save button all the pictures along with other input data should be saved. I hope the requirement is clear now. Please put your suggestions or any sample code if you have. hisameer wrote: Thanks for your comment. But my question is How can it be done using AJAX? I am using dojo plugin in my struts application. But if I use type=file name=docs value=Brows width=400px/ then it also shows the brows location as well. But in my case its only a simple upload button.What should I do? And initially there has to be a placeholder for those pictures as well. I am totally confused. Please help! Lee Clemens-4 wrote: Maybe have the Upload buttons refresh the page? And load the images from the action? Otherwise it would have to be done client side (ajax?) -Original Message- From: hisameer [mailto:cool_sameer_fo...@yahoo.com] Sent: Wednesday, September 02, 2009 6:27 PM To: user@struts.apache.org Subject: Strut2 Picture Upload question: Please Help! I am using Struts 2.1.6 and in my application I have a requirement where the user can upload four pictures of his vehicle.In my JSP, there will be four upload buttons corresponding to those four pics(As shown in the below image). After the user is done selecting the file it should be uploaded in the JSP right away. Below image shows the actual display of the requirement. http://www.nabble.com/file/p25266760/picUploading.jpg Can somebody put some sample code for this kind of requirement or suggest me what should I do? I am sure this is just a simple requirement but I am not able to crack it. -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp252 66760p25266760.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp25266760p25276582.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Strut2 Picture Upload question: Please Help!
Thanks for the reply. Now what I thought of doing is I will upload the picture and show it to in the image tag in the jsp. Now how do I do that? The upload should happen dynamically. Thanks for your help in advance. Tommy Pham wrote: - Original Message From: hisameer cool_sameer_fo...@yahoo.com To: user@struts.apache.org Sent: Thursday, September 3, 2009 6:54:14 AM Subject: RE: Strut2 Picture Upload question: Please Help! I want to do something like this:-The user has upload button. There is an tag on the top of that button which has a picture saying please upload the picture. When the user clicks on upload button the file browser will open and user can select whatever picture he wants to upload. When user clicks ok the picture will be displayed in the JSP page replacing the please upload If you want to display the selected page dynamically before the actual upload takes place, see my reply regarding scenario 2: scenario 2: the user selects a picture and ajax will show the picture dynamically on the browser so the user is looking at the picture to confirm it's the right picture prior to upload action??? NOT POSSIBLE! If this was, every identity thief on the net would have field days... picture message . There are four upload buttons in that page and at the bottom there is save button. When the user hits save button all the pictures along with other input data should be saved. I hope the requirement is clear now. Please put your suggestions or any sample code if you have. hisameer wrote: Thanks for your comment. But my question is How can it be done using AJAX? I am using dojo plugin in my struts application. But if I use type=file name=docs value=Brows width=400px/ then it also shows the brows location as well. But in my case its only a simple upload button.What should I do? And initially there has to be a placeholder for those pictures as well. I am totally confused. Please help! Lee Clemens-4 wrote: Maybe have the Upload buttons refresh the page? And load the images from the action? Otherwise it would have to be done client side (ajax?) -Original Message- From: hisameer [mailto:cool_sameer_fo...@yahoo.com] Sent: Wednesday, September 02, 2009 6:27 PM To: user@struts.apache.org Subject: Strut2 Picture Upload question: Please Help! I am using Struts 2.1.6 and in my application I have a requirement where the user can upload four pictures of his vehicle.In my JSP, there will be four upload buttons corresponding to those four pics(As shown in the below image). After the user is done selecting the file it should be uploaded in the JSP right away. Below image shows the actual display of the requirement. http://www.nabble.com/file/p25266760/picUploading.jpg Can somebody put some sample code for this kind of requirement or suggest me what should I do? I am sure this is just a simple requirement but I am not able to crack it. -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp252 66760p25266760.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp25266760p25276582.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp25266760p25277590.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
[OT] Re: Strut2 Picture Upload question: Please Help!
- Original Message From: hisameer cool_sameer_fo...@yahoo.com To: user@struts.apache.org Sent: Thursday, September 3, 2009 7:43:03 AM Subject: Re: Strut2 Picture Upload question: Please Help! Thanks for the reply. Now what I thought of doing is I will upload the picture and show it to in the image tag in the jsp. Now how do I do that? The upload should happen dynamically. Thanks for your help in advance. If I'm not mistaken, what you're asking for is not yet relevant to the list yet. I think you need to consider the business logic (site navigation, UI - layout and all, functionalities/features/purpose of the site, etc) before you begin coding... as this will save headaches to come. Here's my question your intention... do you want the user to waste his/her time trying to upload an image to a temporary location on your server (not mention waste of bandwith and server processing) before the user has the final decision whether (50%/50%) whether to keep the picture or not??? Shouldn't the user DECIDE that in the first before clicking browse (form/ajax) submit/upload ??? OTOH, if you want to permit the user to upload as many pictures as he/she wants, then selecting only the images the user likes best at a certain point later in time w/o having to upload then that's a another matter. This is what I mean by you need evaluate the functions/features of your site. After you figure out the 1st step, then deal with storage mechanisms (DB / Filesystems) for the pictures. Then comes coding / site layout design w/o clear understanding of the 1st 2... your coding will have unnecessary steps/codes, not to mention your current hurdle... After you figure out the details of what you want your site to be/have/offer, then try to learn more in details about the technology you want to use. If you then you try to implement something but fails, you should try to troubleshoot/debug 1st and research as much as you can before asking. All of this you're asking for 95% available on web... Just spend time to read it. You should first learn as much as you can about what you want to use, in this case Struts, before asking very basic question like picture upload... There many ways to implement this. Old school basic html form/post... new school ajax... another method to use is java applets... the list goes on... :) Regards, Tommy Tommy Pham wrote: - Original Message From: hisameer To: user@struts.apache.org Sent: Thursday, September 3, 2009 6:54:14 AM Subject: RE: Strut2 Picture Upload question: Please Help! I want to do something like this:-The user has upload button. There is an tag on the top of that button which has a picture saying please upload the picture. When the user clicks on upload button the file browser will open and user can select whatever picture he wants to upload. When user clicks ok the picture will be displayed in the JSP page replacing the please upload If you want to display the selected page dynamically before the actual upload takes place, see my reply regarding scenario 2: scenario 2: the user selects a picture and ajax will show the picture dynamically on the browser so the user is looking at the picture to confirm it's the right picture prior to upload action??? NOT POSSIBLE! If this was, every identity thief on the net would have field days... picture message . There are four upload buttons in that page and at the bottom there is save button. When the user hits save button all the pictures along with other input data should be saved. I hope the requirement is clear now. Please put your suggestions or any sample code if you have. hisameer wrote: Thanks for your comment. But my question is How can it be done using AJAX? I am using dojo plugin in my struts application. But if I use type=file name=docs value=Brows width=400px/ then it also shows the brows location as well. But in my case its only a simple upload button.What should I do? And initially there has to be a placeholder for those pictures as well. I am totally confused. Please help! Lee Clemens-4 wrote: Maybe have the Upload buttons refresh the page? And load the images from the action? Otherwise it would have to be done client side (ajax?) -Original Message- From: hisameer [mailto:cool_sameer_fo...@yahoo.com] Sent: Wednesday, September 02, 2009 6:27 PM To: user@struts.apache.org Subject: Strut2 Picture Upload question: Please Help! I am using Struts 2.1.6 and in my application I have a requirement where the user can upload four pictures of his vehicle.In my JSP, there will be four upload buttons corresponding to those four pics(As shown in the below image). After the user is done selecting the file it should be uploaded in the JSP right away
Re: [OT] Re: Strut2 Picture Upload question: Please Help!
Hi Tommy, Thanks for your reply. I thought I would get the answer very quickly if I post the answer on this form after struggling for a week.This is very general question thats why I did not mention all the requirement. I am working for an insurance company. And we have existing framework of Sturts+Spring+Hibernate. And the requirement which I am working on is that the person who wants to buy the car insurance he has the option to upload the four pictures of his car.Along with some other details.After selecting the picture he would like to see which picture he uploaded. He cannot delete the uploaded picture but at least he should be able to see those four pictures on the jsp page. He can upload png,jpg or gif files.At the bottom there is a continue button after continue I have to save those pics into the database. Let me know if you have any questions.Thanks for your efforts and help in advance. Tommy Pham wrote: - Original Message From: hisameer cool_sameer_fo...@yahoo.com To: user@struts.apache.org Sent: Thursday, September 3, 2009 7:43:03 AM Subject: Re: Strut2 Picture Upload question: Please Help! Thanks for the reply. Now what I thought of doing is I will upload the picture and show it to in the image tag in the jsp. Now how do I do that? The upload should happen dynamically. Thanks for your help in advance. If I'm not mistaken, what you're asking for is not yet relevant to the list yet. I think you need to consider the business logic (site navigation, UI - layout and all, functionalities/features/purpose of the site, etc) before you begin coding... as this will save headaches to come. Here's my question your intention... do you want the user to waste his/her time trying to upload an image to a temporary location on your server (not mention waste of bandwith and server processing) before the user has the final decision whether (50%/50%) whether to keep the picture or not??? Shouldn't the user DECIDE that in the first before clicking browse (form/ajax) submit/upload ??? OTOH, if you want to permit the user to upload as many pictures as he/she wants, then selecting only the images the user likes best at a certain point later in time w/o having to upload then that's a another matter. This is what I mean by you need evaluate the functions/features of your site. After you figure out the 1st step, then deal with storage mechanisms (DB / Filesystems) for the pictures. Then comes coding / site layout design w/o clear understanding of the 1st 2... your coding will have unnecessary steps/codes, not to mention your current hurdle... After you figure out the details of what you want your site to be/have/offer, then try to learn more in details about the technology you want to use. If you then you try to implement something but fails, you should try to troubleshoot/debug 1st and research as much as you can before asking. All of this you're asking for 95% available on web... Just spend time to read it. You should first learn as much as you can about what you want to use, in this case Struts, before asking very basic question like picture upload... There many ways to implement this. Old school basic html form/post... new school ajax... another method to use is java applets... the list goes on... :) Regards, Tommy Tommy Pham wrote: - Original Message From: hisameer To: user@struts.apache.org Sent: Thursday, September 3, 2009 6:54:14 AM Subject: RE: Strut2 Picture Upload question: Please Help! I want to do something like this:-The user has upload button. There is an tag on the top of that button which has a picture saying please upload the picture. When the user clicks on upload button the file browser will open and user can select whatever picture he wants to upload. When user clicks ok the picture will be displayed in the JSP page replacing the please upload If you want to display the selected page dynamically before the actual upload takes place, see my reply regarding scenario 2: scenario 2: the user selects a picture and ajax will show the picture dynamically on the browser so the user is looking at the picture to confirm it's the right picture prior to upload action??? NOT POSSIBLE! If this was, every identity thief on the net would have field days... picture message . There are four upload buttons in that page and at the bottom there is save button. When the user hits save button all the pictures along with other input data should be saved. I hope the requirement is clear now. Please put your suggestions or any sample code if you have. hisameer wrote: Thanks for your comment. But my question is How can it be done using AJAX? I am using dojo plugin in my struts application. But if I use type=file name=docs value=Brows width=400px/ then it also shows the brows location as well. But in my case its
Re: [OT] Re: Strut2 Picture Upload question: Please Help!
- Original Message From: hisameer cool_sameer_fo...@yahoo.com To: user@struts.apache.org Sent: Thursday, September 3, 2009 5:15:58 PM Subject: Re: [OT] Re: Strut2 Picture Upload question: Please Help! Hi Tommy, Thanks for your reply. I thought I would get the answer very quickly if I post the answer on this form after struggling for a week.This is very general question thats why I did not mention all the requirement. I am working for an insurance company. And we have existing framework of Sturts+Spring+Hibernate. And the requirement which I am working on is that the person who wants to buy the car insurance he has the option to upload the four pictures of his car.Along with some other details.After selecting the picture he would like to see which picture he uploaded. He cannot delete the uploaded picture but at least he should be able to see those four pictures on the jsp page. He can upload png,jpg or gif files.At the bottom there is a continue button after continue I have to save those pics into the database. Let me know if you have any questions.Thanks for your efforts and help in advance. snip I suggest you take a look at youtube.com's file upload. Perhaps you might want to consider implementing something similar to theirs but not as advanced? I haven't looked at AJAX in depth very much yet but if you implement simultaneous uploads, you'll have to use threads. You'll have to look at the Commons' FileUpload. That library is the best and probably the only for file upload there is. Like I said before, most of what you're asking is there on the internet. Just google for 'ajax file upload'. After seeing some samples and various methods, you decide to implement your own but run into problems where you can't find the solution, then I'm sure the list is more than happy to help you fix if it deals with Struts. Someone has suggest you to look at jquery plugin. That may work or may not work for you. That's why I suggest you read and find the options available and choose what you like. One of the many things I like about Java is you have more than one way to do something to reach your goal. Regards, Tommy - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Strut2 Picture Upload question: Please Help!
I am using Struts 2.1.6 and in my application I have a requirement where the user can upload four pictures of his vehicle.In my JSP, there will be four upload buttons corresponding to those four pics(As shown in the below image). After the user is done selecting the file it should be uploaded in the JSP right away. Below image shows the actual display of the requirement. http://www.nabble.com/file/p25266760/picUploading.jpg Can somebody put some sample code for this kind of requirement or suggest me what should I do? I am sure this is just a simple requirement but I am not able to crack it. -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp25266760p25266760.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Strut2 Picture Upload question: Please Help!
Maybe have the Upload buttons refresh the page? And load the images from the action? Otherwise it would have to be done client side (ajax?) -Original Message- From: hisameer [mailto:cool_sameer_fo...@yahoo.com] Sent: Wednesday, September 02, 2009 6:27 PM To: user@struts.apache.org Subject: Strut2 Picture Upload question: Please Help! I am using Struts 2.1.6 and in my application I have a requirement where the user can upload four pictures of his vehicle.In my JSP, there will be four upload buttons corresponding to those four pics(As shown in the below image). After the user is done selecting the file it should be uploaded in the JSP right away. Below image shows the actual display of the requirement. http://www.nabble.com/file/p25266760/picUploading.jpg Can somebody put some sample code for this kind of requirement or suggest me what should I do? I am sure this is just a simple requirement but I am not able to crack it. -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp252 66760p25266760.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Strut2 Picture Upload question: Please Help!
Thanks for your comment. But my question is How can it be done using AJAX? I am using dojo plugin in my struts application. But if I use input type=file name=docs value=Brows width=400px/ then it also shows the brows location as well. But in my case its only a simple upload button.What should I do? And initially there has to be a placeholder for those pictures as well. I am totally confused. Please help! Lee Clemens-4 wrote: Maybe have the Upload buttons refresh the page? And load the images from the action? Otherwise it would have to be done client side (ajax?) -Original Message- From: hisameer [mailto:cool_sameer_fo...@yahoo.com] Sent: Wednesday, September 02, 2009 6:27 PM To: user@struts.apache.org Subject: Strut2 Picture Upload question: Please Help! I am using Struts 2.1.6 and in my application I have a requirement where the user can upload four pictures of his vehicle.In my JSP, there will be four upload buttons corresponding to those four pics(As shown in the below image). After the user is done selecting the file it should be uploaded in the JSP right away. Below image shows the actual display of the requirement. http://www.nabble.com/file/p25266760/picUploading.jpg Can somebody put some sample code for this kind of requirement or suggest me what should I do? I am sure this is just a simple requirement but I am not able to crack it. -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp252 66760p25266760.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Strut2-Picture-Upload-question%3A-Please-Help%21-tp25266760p25267581.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Cannot find bean - Please HELP.
Dear all, I was trying to going from one JSP page to another, where each JSP page has a submit button... and a Form bean as well. But when I click a submit button on the first JSP page, it said that the second Form bean is not found in the second JSP page. The workflow is supposed to be: RedirectForm - RedirectHelpForm Can anyone please shed some light on me to resolve this issue? Thank you very much in advance. Here is the error: 02:26:27,748 ERROR [PortletRequestDispatcherImpl:316] org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean: RedirectHelpForm in any scope org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean: RedirectHelpForm in any scope at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) Here are all the codes: --- struts-config.xml: === # cat docroot/WEB-INF/struts-config.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.2//EN http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd; struts-config form-beans form-bean name=RedirectForm type=com.ip6networks.struts_redirect.portlet.RedirectForm/form-bean form-bean name=RedirectHelpForm type=com.ip6networks.struts_redirect.portlet.RedirectHelpForm/form-bean /form-beans action-mappings action path=/struts_redirect_portlet/input type=com.ip6networks.struts_redirect.portlet.RedirectAction name=RedirectForm scope=session validate=true input=/portlet/struts_redirect_portlet/input.jsp forward name=input path=/portlet/struts_redirect_portlet/input.jsp /forward forward name=help path=/portlet/struts_redirect_portlet/help.jsp /forward /action action path=/struts_redirect_portlet/help type=com.ip6networks.struts_redirect.portlet.RedirectHelpAction name=RedirectHelpForm scope=session validate=true input=/portlet/struts_redirect_portlet/help.jsp forward name=help path=/portlet/struts_redirect_portlet/help.jsp/forward /action /action-mappings message-resources parameter=resources.application null=true/message-resources plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/set-property /plug-in /struts-config --- input.jsp: === # cat input.jsp %@ include file=/html/portlet/struts_redirect_portlet/init.jsp % p align=centre Hello the hell. /p bean:define id=comment name=RedirectForm property=comment type=java.lang.String / logic:messagesPresent span class=es-error bean:message key=error.comment.invalid/ /span /logic:messagesPresent p align=centre html:form action=/struts_redirect_portlet/input method=post focus=comment table class=stats tr thbean:message key=form.title.comment//th thhtml:text name=RedirectForm property=comment size=50 //th /tr /table /p p align=left html:submitbean:message key=button.submit//html:submit /html:form /p --- help.jsp: === # cat help.jsp %@ include file=/html/portlet/struts_redirect_portlet/init.jsp % p align=centre Hello the HelP FORM ??. /p bean:define id=name name=RedirectHelpForm property=name type=java.lang.String / logic:messagesPresent span class=es-error bean:message key=error.name.invalid/ /span /logic:messagesPresent p align=centre html:form action=/struts_redirect_portlet/help method=post focus=name table class=stats tr thbean:message key=form.title.name//th thhtml:text name=RedirectHelpForm property=name size=50 //th /tr /table /p p align=left html:submitbean:message key=button.submit//html:submit /html:form /p --- RedirectAction.java: = public class RedirectAction extends PortletAction { public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception { RedirectForm redirectForm = (RedirectForm) form; String comment = redirectForm.getComment().trim(); if ( comment.length() 0) { return mapping.findForward(help); } return mapping.findForward(input);
empty validation.xml file - please help.
Hi, I tried generate a validation.xml file with form name, field property, msg name, and key in the file, but it doesn't generate these information in the file from the struts tags given in my ActionForm java file. Here is the java soruce file I have: package com.XYZ.onlinepayment.portlet; import org.apache.struts.validator.ValidatorForm; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; /** * Search query entry form. * * @struts.form name=OrderForm */ public class OrderForm extends ActionForm{ private String firstname=; private String lastname=; private String email_address=; private String phone_number=; private String shipping_address=; private String billing_address=; /** * Sets the query attribute of the OrderForm object * * @struts.validator type=required msgkey=error.firstname.required */ public void setFirstName(String fn){ this.firstname = fn; } public String getFirstName(){ return this.firstname; } /* * @struts.validator type=required msgkey=error.lastname.required */ public void setLastName(String ln){ this.lastname = ln; } public String getLastName(){ return this.lastname; } /* * @struts.validator type=required msgkey=error.email_address.required */ public void setEmailAddress(String email){ this.email_address = email; } public String getEmailAddress(){ return this.email_address; } /* * @struts.validator type=required msgkey=error.shipping_address.required */ public void setShippingAddress(String shipping) { this.shipping_address = shipping; } public String getShippingAddress(){ return this.shipping_address; } /* * @struts.validator type=required msgkey=error.billing_address.required */ public void setBillingAddress(String billing) { this.billing_address = billing; } public String getBillingAddress(){ return this.billing_address; } /* * @struts.validator type=required msgkey=error.phone_number.required */ public void setPhoneNumber(String ph) { this.phone_number = ph; } public String getPhoneNumber(){ return this.phone_number; } public void reset(ActionMapping mapping, HttpServletRequest req) { this.firstname=; this.lastname=; this.phone_number=; this.email_address=; this.shipping_address=; this.billing_address=; } And I also tried to run Ant with ant -Dform.name=OrderForm and just the ant ENTER command. It only genereated the following empty validation.xml file: # cat validation.xml ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN http://jakarta.apache.org/commons/dtds/validator_1_1.dtd; form-validation !-- Define global validation config in validation-global.xml -- formset !-- Define form validation config in validation-forms.xml -- /formset /form-validation What is wrong with my setup? Thanks - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: empty validation.xml file - please help.
are you using simple theme and struts 2.1.6 ? if yes you need to use tags s:fielderror and s:actionerror to display error On Sun, Jun 21, 2009 at 8:45 PM, Sam Wun swun2...@gmail.com wrote: Hi, I tried generate a validation.xml file with form name, field property, msg name, and key in the file, but it doesn't generate these information in the file from the struts tags given in my ActionForm java file. Here is the java soruce file I have: package com.XYZ.onlinepayment.portlet; import org.apache.struts.validator.ValidatorForm; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; /** * Search query entry form. * * @struts.form name=OrderForm */ public class OrderForm extends ActionForm{ private String firstname=; private String lastname=; private String email_address=; private String phone_number=; private String shipping_address=; private String billing_address=; /** * Sets the query attribute of the OrderForm object * * @struts.validator type=required msgkey=error.firstname.required */ public void setFirstName(String fn){ this.firstname = fn; } public String getFirstName(){ return this.firstname; } /* * @struts.validator type=required msgkey=error.lastname.required */ public void setLastName(String ln){ this.lastname = ln; } public String getLastName(){ return this.lastname; } /* * @struts.validator type=required msgkey=error.email_address.required */ public void setEmailAddress(String email){ this.email_address = email; } public String getEmailAddress(){ return this.email_address; } /* * @struts.validator type=required msgkey=error.shipping_address.required */ public void setShippingAddress(String shipping) { this.shipping_address = shipping; } public String getShippingAddress(){ return this.shipping_address; } /* * @struts.validator type=required msgkey=error.billing_address.required */ public void setBillingAddress(String billing) { this.billing_address = billing; } public String getBillingAddress(){ return this.billing_address; } /* * @struts.validator type=required msgkey=error.phone_number.required */ public void setPhoneNumber(String ph) { this.phone_number = ph; } public String getPhoneNumber(){ return this.phone_number; } public void reset(ActionMapping mapping, HttpServletRequest req) { this.firstname=; this.lastname=; this.phone_number=; this.email_address=; this.shipping_address=; this.billing_address=; } And I also tried to run Ant with ant -Dform.name=OrderForm and just the ant ENTER command. It only genereated the following empty validation.xml file: # cat validation.xml ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN http://jakarta.apache.org/commons/dtds/validator_1_1.dtd; form-validation !-- Define global validation config in validation-global.xml -- formset !-- Define form validation config in validation-forms.xml -- /formset /form-validation What is wrong with my setup? Thanks - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP
That's great! I'll look into that. Thanks again. Jim Kiley wrote: The checkstyle, FindBugs, or PMD plugin does this for sure. On Thu, May 7, 2009 at 8:50 PM, Dave Newton newton.d...@yahoo.com wrote: SofIAm wrote: Thank YOU ALL! What a dumb JAVA 101 mistake! I was never populating the class member variable myList, but the local one in my method, unintentionally of course. DUH!!! It's working like a charm! Thanks again! There is a warning available in Eclipse to notify you when a local variable shadows a property. (I think.) Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Jim Kiley Senior Technical Consultant | Summa [p] 412.258.3346 http://www.summa-tech.com -- View this message in context: http://www.nabble.com/Please-help%21-Struts-2-Eclipse---List-Object-is-not-displaying-in-JSP-tp23429087p23444897.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP
Take a close look at your getAllEmployees()method. You have declared the list with same name myList, which is a local variable. You need to either call setList and pass this or use the samelist. public String getAllEmployees() { //remove the ListString ListString myList = new ArrayListString(); } Cheers. Satya On Thu, May 7, 2009 at 8:54 AM, SofIAm sof.am...@yahoo.com wrote: Hi Everyone, I'm new to Struts. Please help me figure out why the List myList is not being displayed in JSP, although my String variable s is displayed. Your help will be greatly appreciated! Thanks! Here's the code: struts.xml ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts include file=struts-default.xml/ package name=default extends=struts-default action name=getAllEmployees method=getAllEmployees class=net.struts2demo.action.EmployeeAction resultemployees.jsp/result /action /package /struts Action class package net.struts2demo.action; import com.opensymphony.xwork2.ActionSupport; import com.sample.PersonController; import com.sample.Person; import java.util.List; import java.util.ArrayList; import org.apache.log4j.Level; import org.apache.log4j.Logger; public class EmployeeAction extends ActionSupport { //private static Logger logger = Logger.getLogger(EmployeeAction.class); private Person person; private ListString myList; private String s; public ListString getMyList() { return myList; } public String getS(){ return s; } public String getAllEmployees() { //PersonController pc = new PersonController(); //List people = pc.getAllPeople(); //logger.log(Level.TRACE, Action Class: And a trace message using log() method.); System.out.print(Action Class); ListString myList = new ArrayListString(); myList.add(Fruits); myList.add(Apple); myList.add(Mango); myList.add(Orange); myList.add(Pine Apple); s=Hello Struts was in the right method!; return SUCCESS; } public String getPerson() { PersonController pc = new PersonController(); person = pc.getPerson(1); return success; } public void setPerson(Person person) { this.person = person; } public void setMyList(ListString myList) { this.myList = myList; } } JSP Page: employee.jsp %@ taglib prefix=s uri=/struts-tags % html head titleIterator Tag Example!/title /head body h1Iterator Tag Example!/h1 s:iterator value=myList s:property /br /s:iterator table align=center class=borderAll trtd class=tdLabels:text name=s//td tds:textfield name=s size=30//td /tr /table /body /html -- View this message in context: http://www.nabble.com/Please-help%21-Struts-2-Eclipse---List-Object-is-not-displaying-in-JSP-tp23429087p23429087.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP
You're correct. That was exactly the problem. Thanks for responding! satyanarayana katta wrote: Take a close look at your getAllEmployees()method. You have declared the list with same name myList, which is a local variable. You need to either call setList and pass this or use the samelist. public String getAllEmployees() { //remove the ListString ListString myList = new ArrayListString(); } Cheers. Satya On Thu, May 7, 2009 at 8:54 AM, SofIAm sof.am...@yahoo.com wrote: Hi Everyone, I'm new to Struts. Please help me figure out why the List myList is not being displayed in JSP, although my String variable s is displayed. Your help will be greatly appreciated! Thanks! Here's the code: struts.xml ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts include file=struts-default.xml/ package name=default extends=struts-default action name=getAllEmployees method=getAllEmployees class=net.struts2demo.action.EmployeeAction resultemployees.jsp/result /action /package /struts Action class package net.struts2demo.action; import com.opensymphony.xwork2.ActionSupport; import com.sample.PersonController; import com.sample.Person; import java.util.List; import java.util.ArrayList; import org.apache.log4j.Level; import org.apache.log4j.Logger; public class EmployeeAction extends ActionSupport { //private static Logger logger = Logger.getLogger(EmployeeAction.class); private Person person; private ListString myList; private String s; public ListString getMyList() { return myList; } public String getS(){ return s; } public String getAllEmployees() { //PersonController pc = new PersonController(); //List people = pc.getAllPeople(); //logger.log(Level.TRACE, Action Class: And a trace message using log() method.); System.out.print(Action Class); ListString myList = new ArrayListString(); myList.add(Fruits); myList.add(Apple); myList.add(Mango); myList.add(Orange); myList.add(Pine Apple); s=Hello Struts was in the right method!; return SUCCESS; } public String getPerson() { PersonController pc = new PersonController(); person = pc.getPerson(1); return success; } public void setPerson(Person person) { this.person = person; } public void setMyList(ListString myList) { this.myList = myList; } } JSP Page: employee.jsp %@ taglib prefix=s uri=/struts-tags % html head titleIterator Tag Example!/title /head body h1Iterator Tag Example!/h1 s:iterator value=myList s:property /br /s:iterator table align=center class=borderAll trtd class=tdLabels:text name=s//td tds:textfield name=s size=30//td /tr /table /body /html -- View this message in context: http://www.nabble.com/Please-help%21-Struts-2-Eclipse---List-Object-is-not-displaying-in-JSP-tp23429087p23429087.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Please-help%21-Struts-2-Eclipse---List-Object-is-not-displaying-in-JSP-tp23429087p23449084.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Please help! Struts 2/Eclipse - List Object is not displaying in JSP
Hi Everyone, I'm new to Struts. Please help me figure out why the List myList is not being displayed in JSP, although my String variable s is displayed. Your help will be greatly appreciated! Thanks! Here's the code: struts.xml ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts include file=struts-default.xml/ package name=default extends=struts-default action name=getAllEmployees method=getAllEmployees class=net.struts2demo.action.EmployeeAction resultemployees.jsp/result /action /package /struts Action class package net.struts2demo.action; import com.opensymphony.xwork2.ActionSupport; import com.sample.PersonController; import com.sample.Person; import java.util.List; import java.util.ArrayList; import org.apache.log4j.Level; import org.apache.log4j.Logger; public class EmployeeAction extends ActionSupport { //private static Logger logger = Logger.getLogger(EmployeeAction.class); private Person person; private ListString myList; private String s; public ListString getMyList() { return myList; } public String getS(){ return s; } public String getAllEmployees() { //PersonController pc = new PersonController(); //List people = pc.getAllPeople(); //logger.log(Level.TRACE, Action Class: And a trace message using log() method.); System.out.print(Action Class); ListString myList = new ArrayListString(); myList.add(Fruits); myList.add(Apple); myList.add(Mango); myList.add(Orange); myList.add(Pine Apple); s=Hello Struts was in the right method!; return SUCCESS; } public String getPerson() { PersonController pc = new PersonController(); person = pc.getPerson(1); return success; } public void setPerson(Person person) { this.person = person; } public void setMyList(ListString myList) { this.myList = myList; } } JSP Page: employee.jsp %@ taglib prefix=s uri=/struts-tags % html head titleIterator Tag Example!/title /head body h1Iterator Tag Example!/h1 s:iterator value=myList s:property /br /s:iterator table align=center class=borderAll trtd class=tdLabels:text name=s//td tds:textfield name=s size=30//td /tr /table /body /html -- View this message in context: http://www.nabble.com/Please-help%21-Struts-2-Eclipse---List-Object-is-not-displaying-in-JSP-tp23429087p23429087.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP
2009/5/7 SofIAm sof.am...@yahoo.com: public String getAllEmployees() { This method is never called, renamed it to execute() and should be ok Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP
Even then it won't be OK. The OP is declaring myList as a local variable in getAllEmployees(), so getMyList won't return it. Change the line ListString myList = new ArrayListString(); in getAllEmployees() to just be myList = new ArrayListString(); and do as Lukasz suggests and you should be OK. jk On Thu, May 7, 2009 at 11:57 AM, Lukasz Lenart lukasz.len...@googlemail.com wrote: 2009/5/7 SofIAm sof.am...@yahoo.com: public String getAllEmployees() { This method is never called, renamed it to execute() and should be ok Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Jim Kiley Senior Technical Consultant | Summa [p] 412.258.3346 http://www.summa-tech.com
Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP
This is actually not correct, he defined the method as getAllEmployees in his struts.xml That said, I'm not sure of the default behavior of the s:property tag. Have you tried something like s:property value=top? I'm not huge on the struts tag libs, but this would be the first place I'd look, at a quick glance your action setup looks fine. Have you tried setting a breakpoint on the getter action to see that the list is actually populated? -Tim Lukasz Lenart wrote: 2009/5/7 SofIAm sof.am...@yahoo.com: public String getAllEmployees() { This method is never called, renamed it to execute() and should be ok Regards - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP
Ah good catch, this is whats causing it. Although as I said, you dont need to rename the method if you've setup your struts.xml as it is. Jim Kiley wrote: Even then it won't be OK. The OP is declaring myList as a local variable in getAllEmployees(), so getMyList won't return it. Change the line ListString myList = new ArrayListString(); in getAllEmployees() to just be myList = new ArrayListString(); and do as Lukasz suggests and you should be OK. jk On Thu, May 7, 2009 at 11:57 AM, Lukasz Lenart lukasz.len...@googlemail.com wrote: 2009/5/7 SofIAm sof.am...@yahoo.com: public String getAllEmployees() { This method is never called, renamed it to execute() and should be ok Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP
Thank YOU ALL! What a dumb JAVA 101 mistake! I was never populating the class member variable myList, but the local one in my method, unintentionally of course. DUH!!! It's working like a charm! Thanks again! Timothy Orme wrote: Ah good catch, this is whats causing it. Although as I said, you dont need to rename the method if you've setup your struts.xml as it is. Jim Kiley wrote: Even then it won't be OK. The OP is declaring myList as a local variable in getAllEmployees(), so getMyList won't return it. Change the line ListString myList = new ArrayListString(); in getAllEmployees() to just be myList = new ArrayListString(); and do as Lukasz suggests and you should be OK. jk On Thu, May 7, 2009 at 11:57 AM, Lukasz Lenart lukasz.len...@googlemail.com wrote: 2009/5/7 SofIAm sof.am...@yahoo.com: public String getAllEmployees() { This method is never called, renamed it to execute() and should be ok Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Please-help%21-Struts-2-Eclipse---List-Object-is-not-displaying-in-JSP-tp23429087p23430437.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP
SofIAm wrote: Thank YOU ALL! What a dumb JAVA 101 mistake! I was never populating the class member variable myList, but the local one in my method, unintentionally of course. DUH!!! It's working like a charm! Thanks again! There is a warning available in Eclipse to notify you when a local variable shadows a property. (I think.) Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP
The checkstyle, FindBugs, or PMD plugin does this for sure. On Thu, May 7, 2009 at 8:50 PM, Dave Newton newton.d...@yahoo.com wrote: SofIAm wrote: Thank YOU ALL! What a dumb JAVA 101 mistake! I was never populating the class member variable myList, but the local one in my method, unintentionally of course. DUH!!! It's working like a charm! Thanks again! There is a warning available in Eclipse to notify you when a local variable shadows a property. (I think.) Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Jim Kiley Senior Technical Consultant | Summa [p] 412.258.3346 http://www.summa-tech.com
please help me
i repeat my question i want populate the list from action tag whit ArrayList which is in a bean without to use action. Can i do? -- View this message in context: http://www.nabble.com/please-help-me-tp22933522p22933522.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: please help me
this is my bean package bean; import java.util.*; public class DataOre { List giorno=new ArrayList(); public DataOre(){ giorno = new ArrayList(); giorno.add(Sunday); giorno.add(Monday); giorno.add(Tuesday); giorno.add(Wednesday); giorno.add(Thursday); giorno.add(Friday); giorno.add(Saturday); } } anf in the jsp page there is %...@page import=bean.DataOre% s:select headerKey=1 headerValue=seleziona list=DataOre listValue=giorno / -- View this message in context: http://www.nabble.com/please-help-me-tp22933522p22933565.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: please help me
From the documentation: http://struts.apache.org/2.0.14/docs/select.html List: Iterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body. Now, you have list as DataOre. This is not, as the documentation says, an Iterable source to populate from. M. -Original Message- From: PEGASUS84 [mailto:pegasu...@hotmail.it] Sent: Tuesday, April 07, 2009 12:56 PM To: user@struts.apache.org Subject: Re: please help me this is my bean package bean; import java.util.*; public class DataOre { List giorno=new ArrayList(); public DataOre(){ giorno = new ArrayList(); giorno.add(Sunday); giorno.add(Monday); giorno.add(Tuesday); giorno.add(Wednesday); giorno.add(Thursday); giorno.add(Friday); giorno.add(Saturday); } } anf in the jsp page there is %...@page import=bean.DataOre% s:select headerKey=1 headerValue=seleziona list=DataOre listValue=giorno / -- View this message in context: http://www.nabble.com/please-help-me-tp22933522p22933565.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: please help me
please can you say me any solution because i don't undestand the documentation Security Management wrote: From the documentation: http://struts.apache.org/2.0.14/docs/select.html List: Iterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body. Now, you have list as DataOre. This is not, as the documentation says, an Iterable source to populate from. M. -Original Message- From: PEGASUS84 [mailto:pegasu...@hotmail.it] Sent: Tuesday, April 07, 2009 12:56 PM To: user@struts.apache.org Subject: Re: please help me this is my bean package bean; import java.util.*; public class DataOre { List giorno=new ArrayList(); public DataOre(){ giorno = new ArrayList(); giorno.add(Sunday); giorno.add(Monday); giorno.add(Tuesday); giorno.add(Wednesday); giorno.add(Thursday); giorno.add(Friday); giorno.add(Saturday); } } anf in the jsp page there is %...@page import=bean.DataOre% s:select headerKey=1 headerValue=seleziona list=DataOre listValue=giorno / -- View this message in context: http://www.nabble.com/please-help-me-tp22933522p22933565.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/please-help-me-tp22933522p22933911.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: please help me
2009/4/7 PEGASUS84 pegasu...@hotmail.it: public class DataOre { List giorno=new ArrayList(); public DataOre(){ giorno = new ArrayList(); You already created list, not needed %...@page import=bean.DataOre% s:select headerKey=1 headerValue=seleziona list=DataOre listValue=giorno / You can't use that bean directly, it has to be returned by getter from action, first add getter to DataOre return list public class MyAction extends ActionSupport { private DataOre dataOre = new DataOre(); public String execute() { return SUCCESS; } public List getDataOre() { return dataOre.getList(); } } And then on your jsp you can use s:select label=Select Ore name=daysname headerKey=1 headerValue=-- Please Select -- list=dataOre / There is a great example for select tag here [1] and for any other Struts2 tag [2] [1] http://www.roseindia.net/struts/struts2/struts2uitags/select-tag.shtml [2] http://www.roseindia.net/struts/struts2/index.shtml Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: please help me
What's the role of your action in this? Do you have a getter that returns the list? Do you use it in the select tag? Nils-H On Tue, Apr 7, 2009 at 7:14 PM, PEGASUS84 pegasu...@hotmail.it wrote: please can you say me any solution because i don't undestand the documentation Security Management wrote: From the documentation: http://struts.apache.org/2.0.14/docs/select.html List: Iterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body. Now, you have list as DataOre. This is not, as the documentation says, an Iterable source to populate from. M. -Original Message- From: PEGASUS84 [mailto:pegasu...@hotmail.it] Sent: Tuesday, April 07, 2009 12:56 PM To: user@struts.apache.org Subject: Re: please help me this is my bean package bean; import java.util.*; public class DataOre { List giorno=new ArrayList(); public DataOre(){ giorno = new ArrayList(); giorno.add(Sunday); giorno.add(Monday); giorno.add(Tuesday); giorno.add(Wednesday); giorno.add(Thursday); giorno.add(Friday); giorno.add(Saturday); } } anf in the jsp page there is %...@page import=bean.DataOre% s:select headerKey=1 headerValue=seleziona list=DataOre listValue=giorno / -- View this message in context: http://www.nabble.com/please-help-me-tp22933522p22933565.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/please-help-me-tp22933522p22933911.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org here's - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Parameters shows null please help
()); this.setDefaultItem(so.getServiceOwnerName()); } } return ServiceOwners; } public void setServiceOwners( ListServiceOwnerAndSuscriptionDetails serviceOwners) { ServiceOwners = serviceOwners; } public ListSubscriptionDetails getSubscriptions() { ServiceOwnerAndSuscriptionDetailsDAO sodao=new ServiceOwnerAndSuscriptionDetailsDAO(); if(Subscriptions==null ){ Subscriptions=new ArrayListSubscriptionDetails(); System.out.println(getServiceOwnerId--+this.getServiceOwnerId()); Subscriptions=sodao.getSubscriptions(this.getServiceOwnerId(),this.getSubscriptionType()); System.out.println(Subscriptions--+Subscriptions); if(Subscriptions.isEmpty()){ this.setDoubleDefaultItem(); }else{ SubscriptionDetails sd=Subscriptions.get(0); this.setDoubleDefaultItem(sd.getSubsriptionName()); } } return Subscriptions; } public void setSubscriptions(ListSubscriptionDetails subscriptions) { Subscriptions = subscriptions; } public String getDefaultItem() { return DefaultItem; } public void setDefaultItem(String defaultItem) { DefaultItem = defaultItem; } public String getDoubleDefaultItem() { return DoubleDefaultItem; } public void setDoubleDefaultItem(String doubleDefaultItem) { DoubleDefaultItem = doubleDefaultItem; } public String getSubscriptionType() { return SubscriptionType; } public void setSubscriptionType(String subscriptionType) { SubscriptionType = subscriptionType; } } struts.xml ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts constant name=struts.custom.i18n.resources value=MMSApplicationMessages / constant name=struts.enable.DynamicMethodInvocation value=false / !-- Some or all of these can be flipped to true for debugging -- constant name=struts.devMode value=false / constant name=struts.configuration.xml.reload value=true / !-- Constants can be delared in two ways in struts.xml or struts.properties constant name=struts.devMode value=true / -- include file=struts-default.xml / package name=sajid extends=struts-default default-interceptor-ref name=paramsPrepareParamsStack / action name=beforeComposeMMS class=com.teleparadigm.mms.application.common.ServiceOwnerAndSuscriptionDetails MMS interceptor-ref name=defaultStack/interceptor-ref result name=error type=redirect /pages/ComposeMMS.jsp /result result/pages/ComposeMMS.jsp/result /action /package /struts in JSP lis:url var=url action=beforeComposeMMS/s:a href=%{url}Compose MMS/s:a/li -- View this message in context: http://www.nabble.com/Parameters--shows-null-please-help-tp22657568p22657568.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Parameters shows null please help
In Console we get this result only once the i will get param next time it goes to null.i am using doubleselect for this getServiceOwnerId--7099107119529255786 query select SUBSCRIPTION_ID, SUBSCRIPTION_NAME from SUBSCRIPTION where CONTENT_PROVIDER_ID=7099107119529255786 and SUBSCRIPTION_TYPE like 'MMS' Subscriptions--[] getServiceOwnerId--7099107119529255786 query select SUBSCRIPTION_ID, SUBSCRIPTION_NAME from SUBSCRIPTION where CONTENT_PROVIDER_ID=7099107119529255786 and SUBSCRIPTION_TYPE like 'null' Subscriptions--[] getServiceOwnerId--8946059966905337120 query select SUBSCRIPTION_ID, SUBSCRIPTION_NAME from SUBSCRIPTION where CONTENT_PROVIDER_ID=8946059966905337120 and SUBSCRIPTION_TYPE like 'null' Subscriptions--[] -- View this message in context: http://www.nabble.com/Parameters--shows-null-please-help-tp22657568p22659158.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help to get Arabic i18n(internationalization) using struts2.1.6
Hi Friends, I am also trying out the same example and facing the same problem. I am trying to make japanese locale but not able to do that. I have saved the package_ja.properties file as UTF-8 type. I have tried all the option mention below but all in vain. Can anyone please help. Appriciate your help. Thanks Regards, Kavita sajidbigler wrote: Hi Friends, I tried struts2-blank-2.1.6.war example and its working fine.but when i tried to make it arabic locale i am not able to make it :( with reference to below link i am also facing same problem for Arabic.plz help! http://mail-archives.apache.org/mod_mbox/struts-issues/200902.mbox/%3c404086922.1233610965824.javamail.j...@brutus%3e Thanks Regards, Sajid -- View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp2312p22428688.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help to get Arabic i18n(internationalization) using struts2.1.6
Hi Kavita, If you use s:form theme=simple then key will work use utf-8 link which i have send or you can even go with s:text also.if you have any more clarity ping me on sajidbig...@gmail.com bye -- View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp2312p22437387.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help to get Arabic i18n(internationalization) using struts2.1.6
we can make it in Spanish,German and few but few we cant.which we cant is Arabic. is this a bug can i report to devlopment list?can any one help me out? :( -- View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp2312p22275384.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help to get Arabic i18n(internationalization) using struts2.1.6
sajidbigler wrote: we can make it in Spanish,German and few but few we cant.which we cant is Arabic. is this a bug can i report to devlopment list?can any one help me out? :( Can you describe the exact problem again? Under what circumstances are you unable to get localized Arabic messages? Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help to get Arabic i18n(internationalization) using struts2.1.6
Hi Dave, Its like when i tried struts2-blank-2.1.6.war example and its working fine.here the logic is not much more complicated.here s:text name=HelloWorld.message/ returns proper i18n even Arabic. s:property value=message / this tag wont return proper Arabic i18n .unless we do s:property value=message escape=false/. i really dint understand how come spanish ,german work but not Arabic. Next s:textfield name=username key=some.key / or s:textfield name=username label=%{getText('some.key1')} / wont even gives me proper i18n. When form is submitted s:actionerror / will be in i18n but not s:fielderror /.i have declared validation as follows field name=username field-validator type=requiredstring true message key=some.key8Login name is required/message /field-validator /field i used following link http://www.utf.ru/tables/arabic.html to get utf-8 characters.. MMSApplicationMessages_ar.properties error.password.match=#1551; some.key1=#1539; some.key=#1580; some.key8=#1594; MMSApplicationMessages.properties error.password.match= Sajid retype password some.key1=Login Name1 some.key=Login Name some.key8=Login Name8 struts.properties struts.multipart.maxSize=4194304 #struts.enable.DynamicMethodInvocation = false ### Parser to handle HTTP POST requests, encoded using the MIME-type multipart/form-data # struts.multipart.parser=cos # struts.multipart.parser=pell struts.multipart.parser=jakarta # uses javax.servlet.context.tempdir by default struts.multipart.saveDir=c:\gowri struts.devMode = true struts.i18n.reload=true struts.locale=ar_SA struts.i18n.encoding=UTF-8 struts.custom.i18n.resources=MMSApplicationMessages struts.ui.theme=xhtml struts.ui.templateDir=template Form div id=content h1Welcome to MMS Application .../h1 h2Enter Login Details /h2 s:form action=doLogin method=POST s:label label=SignIn/ s:actionerror / s:fielderror / s:textfield name=username key=some.key / !--s:textfield name=username label=%{getText('some.key1')} /-- s:password name=password label=Password / s:submit value=Login align=center / /s:form s:a href=pages/SignUp.jsp cssStyle=float:rightNew User SignUP/s:a /div More over i am able to see following warnings in console Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [theme] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [theme] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [templateDir] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [templateDir] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [theme] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [theme] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [fieldErrors] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [fieldErrors] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [fieldErrors] Please help me to sort out this issue.. Thanks Sajid -- View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp2312p22282614.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help to get Arabic i18n(internationalization) using struts2.1.6
Hi, have you tried this. s:property value=message escape=false/ Thanks, Nuwan Hi Nuwan, I tried and i got it as you said to s:property value=message escape=false/ Can you please elaborate what exactly it conveys to browser and what was going wrong ? But still that doest resolve my issue s:textfield name=username key=some.key / s:fielderror / These above Tag's are still not getting updated with localization and how will you differentiate spanish worked with out all these rules why? and the action fields after validation still giving me problem as key i will be getting in English Locale field name=username field-validator type=requiredstring true message key=some.key8Login name is required/message /field-validator /field s:actionerror / gets proper i18n but s:fielderror / won't How can we make sure s:fielderror / , s:textfield name=username key=some.key / will also work ? Thanks, Sajid -- View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp2312p22244146.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help to get Arabic i18n(internationalization) using struts2.1.6
http://struts.apache.org/2.x/docs/how-do-i-add-i18n-to-a-ui-tag-like-the-textfield-tag.html sajidbigler wrote: Hi, have you tried this. s:property value=message escape=false/ Thanks, Nuwan Hi Nuwan, I tried and i got it as you said to s:property value=message escape=false/ Can you please elaborate what exactly it conveys to browser and what was going wrong ? But still that doest resolve my issue s:textfield name=username key=some.key / s:fielderror / These above Tag's are still not getting updated with localization and how will you differentiate spanish worked with out all these rules why? and the action fields after validation still giving me problem as key i will be getting in English Locale field name=username field-validator type=requiredstring true message key=some.key8Login name is required/message /field-validator /field s:actionerror / gets proper i18n but s:fielderror / won't How can we make sure s:fielderror / , s:textfield name=username key=some.key / will also work ? Thanks, Sajid - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help to get Arabic i18n(internationalization) using struts2.1.6
i have changed s:textfield name=username key=some.key / to s:textfield label=%{getText('some.key')} name=username / Still problem din't resolved. How about s:fielderror / these too are not i18n only s:actionerror / works fine More over i am able to see following warnings in console Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [theme] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [theme] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [templateDir] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [templateDir] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [theme] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [theme] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [fieldErrors] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [fieldErrors] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [fieldErrors] -- View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp2312p22259630.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Please help to get Arabic i18n(internationalization) using struts2.1.6
Hi Friends, I tried struts2-blank-2.1.6.war example and its working fine.but when i tried to make it arabic locale i am not able to make it :( with reference to below link i am also facing same problem for Arabic.plz help! http://mail-archives.apache.org/mod_mbox/struts-issues/200902.mbox/%3c404086922.1233610965824.javamail.j...@brutus%3e Thanks Trgards, Sajid -- View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp2312p2312.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help to get Arabic i18n(internationalization) using struts2.1.6
Hi, you have to convert the arabic into Unicode and put to the message properties file, Thanks, Nuwan sajidbigler wrote: Hi Friends, I tried struts2-blank-2.1.6.war example and its working fine.but when i tried to make it arabic locale i am not able to make it :( with reference to below link i am also facing same problem for Arabic.plz help! http://mail-archives.apache.org/mod_mbox/struts-issues/200902.mbox/%3c404086922.1233610965824.javamail.j...@brutus%3e Thanks Trgards, Sajid - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help to get Arabic i18n(internationalization) using struts2.1.6
Hi Numan, I am doing that by using following site http://www.utf.ru/tables/arabic.html i am using sample example struts2-blank-2.1.6.war HelloWorld.jsp li s:url id=url action=HelloWorld s:param name=request_localear/s:param /s:url s:a href=%{url}Arabic/s:a /li package_ar.properties HelloWorld.message= #1578; requiredstring = ${getText(fieldName)} #1577;. password = #1578;#x62a; username = #1580;#x62c; Missing.message =#1539; I iam sucessful to get it in tittle but not in page why? :( -- View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp2312p22240539.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help to get Arabic i18n(internationalization) using struts2.1.6
Hi Nuwan, Thanks a lot for your quick response. I am doing that by using following site http://www.utf.ru/tables/arabic.html i am using sample example struts2-blank-2.1.6.war HelloWorld.jsp li s:url id=url action=HelloWorld s:param name=request_localear/s:param /s:url s:a href=%{url}Arabic/s:a /li package_ar.properties HelloWorld.message= ت requiredstring = ${getText(fieldName)} ة. password = تت username = جج Missing.message = I iam sucessful to get it in tittle but not in page why? :(.its like Arbic is recognized in Action class i.e java like setMessage(getText(MESSAGE)); ) and even in validation framework as field name=username field-validator type=requiredstring message key=requiredstring/ /field-validator /field above will also evaluate to proper arabic character but brower wont render it properly if its from jsp like s:property value=message/ I am using firefox and tools-options-advance-languages is to Arabic -- View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp2312p22240691.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help! Validation Errors
package name=web namespace=/web extends=struts-default action name=MyAction class=com.test.web.actions.MyAction result name=showResult/jsps/showResult.jsp/result result name=input/jsps/inputPage.jsp/result result/jsps/successPage/result /action /package Above is my struts mapping. And yes i am using struts2. On Mon, Dec 15, 2008 at 10:44 AM, Martin Gainty mgai...@hotmail.com wrote: can we see the struts action mappings and result mappings from struts.xml e.g.? i assume you're using Struts 2? struts package name=default extends=struts-default action name=hello class=com.opensymphony.xwork2.ActionSupport result name=successhello.jsp/result /action /package Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Mon, 15 Dec 2008 09:47:33 +0800 From: farazali.fa...@gmail.com To: user@struts.apache.org Subject: Re: Please help! Validation Errors Any idea? On Fri, Dec 12, 2008 at 6:04 PM, Faraz Ali farazali.fa...@gmail.com wrote: Hi Andy, Please take a look at the code snippet and suggest. *MyAction.java* public class MyAction extends ActionSupport { //getAction //setAction public String execute() throws Exception { if(action==1) { return input; } elseif(action==2) { return showResult; } else { return success; } } } *struts.xml:* package name=web namespace=/web extends=struts-default action name=MyAction class=com.test.web.actions.MyAction result name=showResult/jsps/showResult.jsp/result result name=input/jsps/inputPage.jsp/result result/jsps/successPage/result /action /package *index.jsp:* s:action name=MyAction namespace=/web executeResult=true s:param name=action2/s:param /s:action In my index.jsp, i am calling action to display showResult.jsp page. But dont know why it is displaying inputPage.jsp. I also put a breakpoint in my Action class and start the application in debug mode, but the execute method did not called. Please tell me whats happening? If you need more information please tell me On Thu, Dec 11, 2008 at 4:04 AM, Andy Sykes a.sy...@ucl.ac.uk wrote: Faraz, I think at this point some code would help. Could you post your struts.xml, and the action? Andy. On 10 Dec 2008, at 17:16, Faraz Ali wrote: Yes Andy, you are right. I added the result name=input, but why it is executing automatically. It is executed automatically when i start my application. On Wed, Dec 10, 2008 at 6:19 PM, Andy Sykes a.sy...@ucl.ac.uk wrote: Faraz, When using validation, the input result tells Struts where to dispatch/redirect to if there's a validation error. When you submit the form, Struts checks the fields against the validation XML - if there's an error, it adds FieldError objects to the FieldErrors object on the value stack, and dispatches to the JSP (or other resource) defined in the input result element. This is nearly always the JSP containing the form you submitted from. You have to have a result name=input because Struts has to know where to redirect in the event of a validation error. Not sure what you mean by the last bit of your question.. Andy. On 10 Dec 2008, at 05:56, Faraz Ali wrote: 13:45:18,390 ERROR [ActionComponent] Could not execute action: /web/MyAction No result defined for action com.web.actions.MyAction and result input - action - file:/C:/ jboss-4.2.3.GA/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB-http://jboss-4.2.3.ga/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB- http://jboss-4.2.3.ga/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB- http://jboss-4.2.3.ga/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB- INF/classes/struts.xml:12:69 1. I have a simple Action class MyAction 2. A corresponding MyAction-validation.xml present in same location as Action class 3. s:fielderror / is included in jsp 4. No result name=input is present My Question is why do we need this input element? Because i want to control it my way. And if i add this input element, its opening the jsp page at the start of the application. Can anybody help me how to do validation properly in struts2 application? -- Best Regards, Faraz Ali - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail
Re: Please help! Validation Errors
Any idea? On Fri, Dec 12, 2008 at 6:04 PM, Faraz Ali farazali.fa...@gmail.com wrote: Hi Andy, Please take a look at the code snippet and suggest. *MyAction.java* public class MyAction extends ActionSupport { //getAction //setAction public String execute() throws Exception { if(action==1) { return input; } elseif(action==2) { return showResult; } else { return success; } } } *struts.xml:* package name=web namespace=/web extends=struts-default action name=MyAction class=com.test.web.actions.MyAction result name=showResult/jsps/showResult.jsp/result result name=input/jsps/inputPage.jsp/result result/jsps/successPage/result /action /package *index.jsp:* s:action name=MyAction namespace=/web executeResult=true s:param name=action2/s:param /s:action In my index.jsp, i am calling action to display showResult.jsp page. But dont know why it is displaying inputPage.jsp. I also put a breakpoint in my Action class and start the application in debug mode, but the execute method did not called. Please tell me whats happening? If you need more information please tell me On Thu, Dec 11, 2008 at 4:04 AM, Andy Sykes a.sy...@ucl.ac.uk wrote: Faraz, I think at this point some code would help. Could you post your struts.xml, and the action? Andy. On 10 Dec 2008, at 17:16, Faraz Ali wrote: Yes Andy, you are right. I added the result name=input, but why it is executing automatically. It is executed automatically when i start my application. On Wed, Dec 10, 2008 at 6:19 PM, Andy Sykes a.sy...@ucl.ac.uk wrote: Faraz, When using validation, the input result tells Struts where to dispatch/redirect to if there's a validation error. When you submit the form, Struts checks the fields against the validation XML - if there's an error, it adds FieldError objects to the FieldErrors object on the value stack, and dispatches to the JSP (or other resource) defined in the input result element. This is nearly always the JSP containing the form you submitted from. You have to have a result name=input because Struts has to know where to redirect in the event of a validation error. Not sure what you mean by the last bit of your question.. Andy. On 10 Dec 2008, at 05:56, Faraz Ali wrote: 13:45:18,390 ERROR [ActionComponent] Could not execute action: /web/MyAction No result defined for action com.web.actions.MyAction and result input - action - file:/C:/ jboss-4.2.3.GA/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB-http://jboss-4.2.3.ga/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB- http://jboss-4.2.3.ga/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB- INF/classes/struts.xml:12:69 1. I have a simple Action class MyAction 2. A corresponding MyAction-validation.xml present in same location as Action class 3. s:fielderror / is included in jsp 4. No result name=input is present My Question is why do we need this input element? Because i want to control it my way. And if i add this input element, its opening the jsp page at the start of the application. Can anybody help me how to do validation properly in struts2 application? -- Best Regards, Faraz Ali - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Best Regards, Faraz Ali - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Best Regards, Faraz Ali -- Best Regards, Faraz Ali
RE: Please help! Validation Errors
can we see the struts action mappings and result mappings from struts.xml e.g.? i assume you're using Struts 2? struts package name=default extends=struts-default action name=hello class=com.opensymphony.xwork2.ActionSupport result name=successhello.jsp/result /action /package Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Mon, 15 Dec 2008 09:47:33 +0800 From: farazali.fa...@gmail.com To: user@struts.apache.org Subject: Re: Please help! Validation Errors Any idea? On Fri, Dec 12, 2008 at 6:04 PM, Faraz Ali farazali.fa...@gmail.com wrote: Hi Andy, Please take a look at the code snippet and suggest. *MyAction.java* public class MyAction extends ActionSupport { //getAction //setAction public String execute() throws Exception { if(action==1) { return input; } elseif(action==2) { return showResult; } else { return success; } } } *struts.xml:* package name=web namespace=/web extends=struts-default action name=MyAction class=com.test.web.actions.MyAction result name=showResult/jsps/showResult.jsp/result result name=input/jsps/inputPage.jsp/result result/jsps/successPage/result /action /package *index.jsp:* s:action name=MyAction namespace=/web executeResult=true s:param name=action2/s:param /s:action In my index.jsp, i am calling action to display showResult.jsp page. But dont know why it is displaying inputPage.jsp. I also put a breakpoint in my Action class and start the application in debug mode, but the execute method did not called. Please tell me whats happening? If you need more information please tell me On Thu, Dec 11, 2008 at 4:04 AM, Andy Sykes a.sy...@ucl.ac.uk wrote: Faraz, I think at this point some code would help. Could you post your struts.xml, and the action? Andy. On 10 Dec 2008, at 17:16, Faraz Ali wrote: Yes Andy, you are right. I added the result name=input, but why it is executing automatically. It is executed automatically when i start my application. On Wed, Dec 10, 2008 at 6:19 PM, Andy Sykes a.sy...@ucl.ac.uk wrote: Faraz, When using validation, the input result tells Struts where to dispatch/redirect to if there's a validation error. When you submit the form, Struts checks the fields against the validation XML - if there's an error, it adds FieldError objects to the FieldErrors object on the value stack, and dispatches to the JSP (or other resource) defined in the input result element. This is nearly always the JSP containing the form you submitted from. You have to have a result name=input because Struts has to know where to redirect in the event of a validation error. Not sure what you mean by the last bit of your question.. Andy. On 10 Dec 2008, at 05:56, Faraz Ali wrote: 13:45:18,390 ERROR [ActionComponent] Could not execute action: /web/MyAction No result defined for action com.web.actions.MyAction and result input - action - file:/C:/ jboss-4.2.3.GA/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB-http://jboss-4.2.3.ga/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB- http://jboss-4.2.3.ga/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB- INF/classes/struts.xml:12:69 1. I have a simple Action class MyAction 2. A corresponding MyAction-validation.xml present in same location as Action class 3. s:fielderror / is included in jsp 4. No result name=input is present My Question is why do we need this input element? Because i want to control it my way. And if i add this input element, its opening the jsp page at the start of the application. Can anybody help me how to do validation properly in struts2 application? -- Best Regards, Faraz Ali - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Best Regards, Faraz Ali - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Best Regards, Faraz Ali -- Best Regards, Faraz Ali _ Send e-mail faster without improving your typing skills. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008
Re: Please help! Validation Errors
Hi Andy, Please take a look at the code snippet and suggest. *MyAction.java* public class MyAction extends ActionSupport { //getAction //setAction public String execute() throws Exception { if(action==1) { return input; } elseif(action==2) { return showResult; } else { return success; } } } *struts.xml:* package name=web namespace=/web extends=struts-default action name=MyAction class=com.test.web.actions.MyAction result name=showResult/jsps/showResult.jsp/result result name=input/jsps/inputPage.jsp/result result/jsps/successPage/result /action /package *index.jsp:* s:action name=MyAction namespace=/web executeResult=true s:param name=action2/s:param /s:action In my index.jsp, i am calling action to display showResult.jsp page. But dont know why it is displaying inputPage.jsp. I also put a breakpoint in my Action class and start the application in debug mode, but the execute method did not called. Please tell me whats happening? If you need more information please tell me On Thu, Dec 11, 2008 at 4:04 AM, Andy Sykes a.sy...@ucl.ac.uk wrote: Faraz, I think at this point some code would help. Could you post your struts.xml, and the action? Andy. On 10 Dec 2008, at 17:16, Faraz Ali wrote: Yes Andy, you are right. I added the result name=input, but why it is executing automatically. It is executed automatically when i start my application. On Wed, Dec 10, 2008 at 6:19 PM, Andy Sykes a.sy...@ucl.ac.uk wrote: Faraz, When using validation, the input result tells Struts where to dispatch/redirect to if there's a validation error. When you submit the form, Struts checks the fields against the validation XML - if there's an error, it adds FieldError objects to the FieldErrors object on the value stack, and dispatches to the JSP (or other resource) defined in the input result element. This is nearly always the JSP containing the form you submitted from. You have to have a result name=input because Struts has to know where to redirect in the event of a validation error. Not sure what you mean by the last bit of your question.. Andy. On 10 Dec 2008, at 05:56, Faraz Ali wrote: 13:45:18,390 ERROR [ActionComponent] Could not execute action: /web/MyAction No result defined for action com.web.actions.MyAction and result input - action - file:/C:/ jboss-4.2.3.GA/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB-http://jboss-4.2.3.ga/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB- http://jboss-4.2.3.ga/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB- INF/classes/struts.xml:12:69 1. I have a simple Action class MyAction 2. A corresponding MyAction-validation.xml present in same location as Action class 3. s:fielderror / is included in jsp 4. No result name=input is present My Question is why do we need this input element? Because i want to control it my way. And if i add this input element, its opening the jsp page at the start of the application. Can anybody help me how to do validation properly in struts2 application? -- Best Regards, Faraz Ali - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Best Regards, Faraz Ali - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Best Regards, Faraz Ali
Re: Please help! Validation Errors
Yes Andy, you are right. I added the result name=input, but why it is executing automatically. It is executed automatically when i start my application. On Wed, Dec 10, 2008 at 6:19 PM, Andy Sykes [EMAIL PROTECTED] wrote: Faraz, When using validation, the input result tells Struts where to dispatch/redirect to if there's a validation error. When you submit the form, Struts checks the fields against the validation XML - if there's an error, it adds FieldError objects to the FieldErrors object on the value stack, and dispatches to the JSP (or other resource) defined in the input result element. This is nearly always the JSP containing the form you submitted from. You have to have a result name=input because Struts has to know where to redirect in the event of a validation error. Not sure what you mean by the last bit of your question.. Andy. On 10 Dec 2008, at 05:56, Faraz Ali wrote: 13:45:18,390 ERROR [ActionComponent] Could not execute action: /web/MyAction No result defined for action com.web.actions.MyAction and result input - action - file:/C:/ jboss-4.2.3.GA/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB-http://jboss-4.2.3.ga/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB- INF/classes/struts.xml:12:69 1. I have a simple Action class MyAction 2. A corresponding MyAction-validation.xml present in same location as Action class 3. s:fielderror / is included in jsp 4. No result name=input is present My Question is why do we need this input element? Because i want to control it my way. And if i add this input element, its opening the jsp page at the start of the application. Can anybody help me how to do validation properly in struts2 application? -- Best Regards, Faraz Ali - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards, Faraz Ali
Re: Please help! Validation Errors
--- On Wed, 12/10/08, Faraz Ali wrote: Yes Andy, you are right. I added the result name=input, but why it is executing automatically. It is executed automatically when i start my application. What do you mean by when i start my application? Are you visiting a URL? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please help! Validation Errors
i mean when i access my application's main page. when i hit http://localhost:8080/mywebapp. On Thu, Dec 11, 2008 at 1:20 AM, Dave Newton [EMAIL PROTECTED] wrote: --- On Wed, 12/10/08, Faraz Ali wrote: Yes Andy, you are right. I added the result name=input, but why it is executing automatically. It is executed automatically when i start my application. What do you mean by when i start my application? Are you visiting a URL? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards, Faraz Ali
Re: Please help! Validation Errors
--- On Wed, 12/10/08, Faraz Ali wrote: i mean when i access my application's main page. when i hit http://localhost:8080/mywebapp. If you hit an action that has validations then this is correct behavior. There are a few ways to handle this, including defining an action that runs the action's input() method, thus bypassing validation, or by using dynamic method invocation to avoid the extra action definition, and so on. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please help! Validation Errors
Faraz, I think at this point some code would help. Could you post your struts.xml, and the action? Andy. On 10 Dec 2008, at 17:16, Faraz Ali wrote: Yes Andy, you are right. I added the result name=input, but why it is executing automatically. It is executed automatically when i start my application. On Wed, Dec 10, 2008 at 6:19 PM, Andy Sykes [EMAIL PROTECTED] wrote: Faraz, When using validation, the input result tells Struts where to dispatch/redirect to if there's a validation error. When you submit the form, Struts checks the fields against the validation XML - if there's an error, it adds FieldError objects to the FieldErrors object on the value stack, and dispatches to the JSP (or other resource) defined in the input result element. This is nearly always the JSP containing the form you submitted from. You have to have a result name=input because Struts has to know where to redirect in the event of a validation error. Not sure what you mean by the last bit of your question.. Andy. On 10 Dec 2008, at 05:56, Faraz Ali wrote: 13:45:18,390 ERROR [ActionComponent] Could not execute action: /web/MyAction No result defined for action com.web.actions.MyAction and result input - action - file:/C:/ jboss-4.2.3.GA/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB- http://jboss-4.2.3.ga/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB- INF/classes/struts.xml:12:69 1. I have a simple Action class MyAction 2. A corresponding MyAction-validation.xml present in same location as Action class 3. s:fielderror / is included in jsp 4. No result name=input is present My Question is why do we need this input element? Because i want to control it my way. And if i add this input element, its opening the jsp page at the start of the application. Can anybody help me how to do validation properly in struts2 application? -- Best Regards, Faraz Ali - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best Regards, Faraz Ali - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Please help! Validation Errors
13:45:18,390 ERROR [ActionComponent] Could not execute action: /web/MyAction No result defined for action com.web.actions.MyAction and result input - action - file:/C:/ jboss-4.2.3.GA/server/default/tmp/deploy/tmp35854MyWeb-exp.war/WEB-INF/classes/struts.xml:12:69 1. I have a simple Action class MyAction 2. A corresponding MyAction-validation.xml present in same location as Action class 3. s:fielderror / is included in jsp 4. No result name=input is present My Question is why do we need this input element? Because i want to control it my way. And if i add this input element, its opening the jsp page at the start of the application. Can anybody help me how to do validation properly in struts2 application? -- Best Regards, Faraz Ali
Re: Dojo javascript errors with ajax theme. please help
In your web.xml ensure you have a filter-mapping defined for the /struts/...js files. You need to make sure that a request to the Javascript and CSS files defined in the struts jar file go thru the Struts 2 filter. That is, make sure you have something like this on your web.xml: filter-mapping filter-namestruts2Filter/filter-name url-pattern/struts/*/url-pattern /filter-mapping If the request to your struts 2 dojo javascript files do not go thru the Struts 2 filter, you will get 404 error when the browser attempts to retrieve those files. Rubens. -- View this message in context: http://www.nabble.com/Dojo-javascript-errors-with-ajax-theme.-please-help-tp18580332p19850152.html 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: Display tag : how to format the page number, Please help
I don¹t understand. Is it not working? We¹re often customising the displaytag properties file and it works fine. Z. Hello to all I am using the display tag to show the employee data , it showing the page banner in the following style. 25 items found, displaying 1 to 10 [first] [previous] 1 2 3 [next][last] I want give it a look of google page banner or any aother type as we see in the many sites. For the I modified the displaytag.properties file and include the following . paging.banner.full=div class=pagelinks align=righta href={1}img src= images/first.gif/aa href={2}img src= images/prev.gif/a{0}a href={3}img src= images/next.gif/aa href={4}img src= images/last.gif/a/div paging.banner.first=div class=pagelinks align=righta href={1}img src=images/first.gif/aa href={2}img src=images/previous.gif/a {0} a href={3}img src=static/images/next.gif/aa href={4}img src=images/last.gif/a/div paging.banner.last=div class=pagelinks align=righta href={1}img src=images/first.gif/aa href={2}img src=images/previous.gif/a {0} a href={3}img src=images/next.gif/aa href={4}img src=images/last.gif/a/div export.banner=div class=pagelinks align=right{0}/div please help me thanks in advance
RE: Display tag : how to format the page number, Please help
you are trying to populate a href based on a call to a action class passing a different locale param ul lia href=s:url action=Welcome?request_locale=en/English/a/li lia href=s:url action=Welcome?request_locale=ja/Japanese/a/li lia href=s:url action=Welcome?request_locale=ru/Russian/a/li lia href=s:url action=Welcome?request_locale=in/Indian/a/li lia href=s:url action=Welcome?request_locale=cn/Chinese/a/li lia href=s:url action=Welcome?request_locale=de/German/a/li lia href=s:url action=Welcome?request_locale=fr/French/a/li /ul The URL tag isn't meant to be used with a query string. The best way to write this would be: Use the param tag instead s:url action=Welcome s:param name=request_locale value=en / s:param name=request_locale value=ja / s:param name=request_locale value=cn / s:param name=request_locale value=in / s:param name=request_locale value=de / s:param name=request_locale value=fr / /s:url http://struts.apache.org/2.0.11.2/docs/why-are-request-parameters-appended-to-our-hyperlinks.html HTH Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Mon, 8 Sep 2008 10:27:01 +1000 Subject: Re: Display tag : how to format the page number, Please help From: [EMAIL PROTECTED] To: user@struts.apache.org; [EMAIL PROTECTED] I don¹t understand. Is it not working? We¹re often customising the displaytag properties file and it works fine. Z. Hello to all I am using the display tag to show the employee data , it showing the page banner in the following style. 25 items found, displaying 1 to 10 [first] [previous] 1 2 3 [next][last] I want give it a look of google page banner or any aother type as we see in the many sites. For the I modified the displaytag.properties file and include the following . paging.banner.full=div class=pagelinks align=righta href={1}img src= images/first.gif/aa href={2}img src= images/prev.gif/a{0}a href={3}img src= images/next.gif/aa href={4}img src= images/last.gif/a/div paging.banner.first=div class=pagelinks align=righta href={1}img src=images/first.gif/aa href={2}img src=images/previous.gif/a {0} a href={3}img src=static/images/next.gif/aa href={4}img src=images/last.gif/a/div paging.banner.last=div class=pagelinks align=righta href={1}img src=images/first.gif/aa href={2}img src=images/previous.gif/a {0} a href={3}img src=images/next.gif/aa href={4}img src=images/last.gif/a/div export.banner=div class=pagelinks align=right{0}/div please help me thanks in advance _ Stay up to date on your PC, the Web, and your mobile phone with Windows Live. http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/
Display tag : how to format the page number, Please help
Hello to all I am using the display tag to show the employee data , it showing the page banner in the following style. 25 items found, displaying 1 to 10 [first] [previous] 1 2 3 [next][last] I want give it a look of google page banner or any aother type as we see in the many sites. For the I modified the displaytag.properties file and include the following . paging.banner.full=div class=pagelinks align=righta href={1}img src= images/first.gif/aa href={2}img src= images/prev.gif/a{0}a href={3}img src= images/next.gif/aa href={4}img src= images/last.gif/a/div paging.banner.first=div class=pagelinks align=righta href={1}img src=images/first.gif/aa href={2}img src=images/previous.gif/a {0} a href={3}img src=static/images/next.gif/aa href={4}img src=images/last.gif/a/div paging.banner.last=div class=pagelinks align=righta href={1}img src=images/first.gif/aa href={2}img src=images/previous.gif/a {0} a href={3}img src=images/next.gif/aa href={4}img src=images/last.gif/a/div export.banner=div class=pagelinks align=right{0}/div please help me thanks in advance
Re: DOJO Dialog Problem? Please help me
I would like to know how and if it is possible to call a dialog box from a iframe? Or have the dialog box pop out from an iframe? and how can i pass variables from dialog box to my struts action class, if so how to retrieve them in my action, do i need to get the values using httpservletrequest? inbuilt dojo0.4 with s2 is not supportive, so i started using dojo1.1.1. Is this helpful. Your comments, questions anything would be appreciated? Thanks Prashanth -- View this message in context: http://www.nabble.com/DOJO-Dialog-Problem--Please-help-me-tp18951580p19048300.html 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: DOJO Dialog Problem? Please help me
--- On Tue, 8/19/08, prashanth2 [EMAIL PROTECTED] wrote: I would like to know how and if it is possible to call a dialog box from a iframe? Or have the dialog box pop out from an iframe? and how can i pass variables from dialog box to my struts action class, if so how to retrieve them in my action, do i need to get the values using httpservletrequest? inbuilt dojo0.4 with s2 is not supportive, so i started using dojo1.1.1. Is this helpful. Your comments, questions anything would be appreciated? All but one of your questions would be better asked on a Dojo or HTML forum or mailing list. [...] and how can i pass variables from dialog box to my struts action class, if so how to retrieve them in my action, do i need to get the values using httpservletrequest? You pass them by making an HTTP request to your Struts application. You access them in your application the same way as any other request parameters, generally by creating action properties with the same name as the request parameters. The Struts documentation, the showcase app, various online tutorials, and several books all cover this. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DOJO Dialog Problem? Please help me
It sounds like you want your iFrame to put up a modal? dialog on the page that contains the iframe? This can be difficult if the pages are served from different servers. You are getting into cross-site scripting issues. If I remember there are ways to sign or secure scripts these days so you can trust a script from a frame like that. I am sure the dojo list has a lot of experts who know that pattern in detail. -D On Aug 19, 2008, at 6:04 AM, prashanth2 wrote: I would like to know how and if it is possible to call a dialog box from a iframe? Or have the dialog box pop out from an iframe? and how can i pass variables from dialog box to my struts action class, if so how to retrieve them in my action, do i need to get the values using httpservletrequest? inbuilt dojo0.4 with s2 is not supportive, so i started using dojo1.1.1. Is this helpful. Your comments, questions anything would be appreciated? Thanks Prashanth -- View this message in context: http://www.nabble.com/DOJO-Dialog-Problem--Please-help-me-tp18951580p19048300.html 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]
DOJO Dialog Problem? Please help me
Hi, I am using s2 2.0.11 version, I am able to display the dojo dialog, but the contents that supposed to appear on the dialog are appearing on the jsp that iam calling from. I tried many possible ways but endup writing this question here. Well I have one more question, instead of displaying a div tag in the dojo dialog, is there a way to call the server and pass some variables, and based on the variables i would like to display some content on the dialog in a new jsp. Please find the attached output, you can find name-text box, that actually should appear on the Dialog.And also please help me in passing some variables to the dialog, so that i can display a new jsp based on the server response. http://www.nabble.com/file/p18951580/Doj-Dialog.JPG Doj-Dialog.JPG Here is my jsp as follows: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; %@ taglib prefix=s uri=/struts-tags% html head titleDojo: Hello World!/title script type=text/javascript src=s:url value='/js/thickBox/jquery.js'//script script type=text/javascript src=s:url value='/js/thickBox/thickbox-compressed.js'//script link href=s:url value='/theme/main.css'/ rel=stylesheet type=text/css/ link rel=stylesheet href=s:url value='/theme/thickbox.css'/ type=text/css media=screen / link href=s:url value='/js/dojo-1.1.1/dijit/themes/tundra/tundra.css'/ rel=stylesheet type=text/css / link href=s:url value='/js/dojo-1.1.1/dojo/resources/dojo.css'/ rel=stylesheet type=text/css / !-- SECTION 1 -- script type=text/javascript src=js/dojo-1.1.1/dojo/dojo.js djConfig=parseOnLoad: true/script script type=text/javascript // Load Dojo's code relating to the Button widget dojo.require(dojo.parser); dojo.require(dijit.form.Button); dojo.require(dijit.Dialog); dojo.require(dijit.form.TextBox); /script /head body class=tundra s:form action=detailedInfo method=post s:actionerror/ s:fielderror/ button dojoType=dijit.form.Button onclick=dijit.byId('dialog1').show()Show Dialog/button div dojoType=dijit.Dialog id=dialog1 title=First Dialog onfocus=console.log('user focus handler') onblur=console.log('user blur handler') execute=alert('submitted w/args:\n' + dojo.toJson(arguments[0], true)); table tr tdlabel for=nameName: /label/td tdinput dojoType=dijit.form.TextBox type=text name=name id=name/td /tr /table /div /s:form /body /html -- View this message in context: http://www.nabble.com/DOJO-Dialog-Problem--Please-help-me-tp18951580p18951580.html 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: sorting problem with display tag: please help
So what the others are saying is that you should NEVER use chopsticks when you are eating soup No just kidding. Depending on what version of struts you are using you likely need a s:set name=listOfEmployee value=listOfEmployee/ before the display tag. Otherwise your decorator could be messed up in which case you are back to eating soup with chopsticks. Varun Deep wrote: Hi I am using the display tag for displaying the employee names . I want to short the names of the employee. Following is the code that is in .jsp file. %@ taglib prefix=display uri=http://displaytag.sf.net% display:table id=displaycolumn name=listOfEmployee pagesize=6 requestURI=searchEmployeeByDep.action decorator=com.unclejis.action.restaurant.DisplayDecorator align=left sort=external defaultsort=1 display:column property=name title=Name sortable=true / /display:table when I use the above code nothing is display. Can anyone please help me to solve this problem. I will be vary thankful. Thanks in advance varun -- View this message in context: http://www.nabble.com/sorting-problem-with-display-tag%3A-please-help-tp18646452p18663908.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
sorting problem with display tag: please help
Hi I am using the display tag for displaying the employee names . I want to short the names of the employee. Following is the code that is in .jsp file. %@ taglib prefix=display uri=http://displaytag.sf.net% display:table id=displaycolumn name=listOfEmployee pagesize=6 requestURI=searchEmployeeByDep.action decorator=com.unclejis.action.restaurant.DisplayDecorator align=left sort=external defaultsort=1 display:column property=name title=Name sortable=true / /display:table when I use the above code nothing is display. Can anyone please help me to solve this problem. I will be vary thankful. Thanks in advance varun
Re: sorting problem with display tag: please help
What did the display tag people say when you posted on their lists at http://displaytag.sourceforge.net/11/mail-lists.html ? Varun Deep wrote: Hi I am using the display tag for displaying the employee names . I want to short the names of the employee. Following is the code that is in .jsp file. %@ taglib prefix=display uri=http://displaytag.sf.net% display:table id=displaycolumn name=listOfEmployee pagesize=6 requestURI=searchEmployeeByDep.action decorator=com.unclejis.action.restaurant.DisplayDecorator align=left sort=external defaultsort=1 display:column property=name title=Name sortable=true / /display:table when I use the above code nothing is display. Can anyone please help me to solve this problem. I will be vary thankful. Thanks in advance varun - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: sorting problem with display tag: please help
--- On Fri, 7/25/08, Al Sutton [EMAIL PROTECTED] wrote: What did the display tag people say when you posted on their lists [...] I see what you did there. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Friday][OT] Re: sorting problem with display tag: please help
You think he got the message?, or are you expecting another message tomorrow? Dave Newton wrote: --- On Fri, 7/25/08, Al Sutton [EMAIL PROTECTED] wrote: What did the display tag people say when you posted on their lists [...] I see what you did there. 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]
sorting problem with display tag: please help
Hi I am using the display tag for displaying the employee names . I want to short the names of the employee. Following is the code that is in .jsp file. %@ taglib prefix=display uri=http://displaytag.sf.net% display:table id=displaycolumn name=listOfEmployee pagesize=6 requestURI=searchEmployeeByDep.action decorator=com.unclejis.action.restaurant.DisplayDecorator align=left sort=external defaultsort=1 display:column property=name title=Name sortable=true / /display:table when I use the above code nothing is display. Can anyone please help me to solve this problem. I will be vary thankful. Thanks in advance varun
Re: sorting problem with display tag: please help
As there are no struts tags you should post this to the displaytag list for a better response; http://displaytag.sourceforge.net/11/mail-lists.html Varun Deep wrote: Hi I am using the display tag for displaying the employee names . I want to short the names of the employee. Following is the code that is in .jsp file. %@ taglib prefix=display uri=http://displaytag.sf.net% display:table id=displaycolumn name=listOfEmployee pagesize=6 requestURI=searchEmployeeByDep.action decorator=com.unclejis.action.restaurant.DisplayDecorator align=left sort=external defaultsort=1 display:column property=name title=Name sortable=true / /display:table when I use the above code nothing is display. Can anyone please help me to solve this problem. I will be vary thankful. Thanks in advance varun - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dojo javascript errors with ajax theme. please help
Pranav wrote: Hi, I am using s:head theme=ajax/ in my jsp files. I have included everything as per struts2 docs. But when I launch the page in FireFox, they show me 404 errors for several javascript files. Example are: ../struts/dojo/src/i18n/calendar/nls/en-us/gregorian.js ../struts/dojo/src/i18n/calendar/nls/en/gregorianExtras.js ../struts/dojo/src/i18n/calendar/nls/en-us/gregorianExtras.js ../struts/dojo/src/widget/nls/en/TimePicker.js ../struts/dojo/src/widget/nls/en-us/TimePicker.js ../mcpages/struts/dojo/src/widget/nls/en/DropdownTimePicker.js ../struts/dojo/src/widget/nls/en-us/DropdownTimePicker.js When I opened the struts2-core-2.0.11.jar file that my project is using, I did not find these files at all. I am not using any of these components like date-time picker or calendar objects but for some reason dojo plugin tries to GET these files. This gives a lot of problem in our pre-prod system where firewalls and proxies are installed. Can someone please help me get rid of these errors? What will I have to do? I will really appreciate help from experts. Thanks Pranav In Struts 2.0.x, the files are bundled in the jar under org/apache/struts/static or somewhere nearby. The are served by the struts filter only if the filter path enables it (eg. /*) and if the property struts.serve.static=true (default true). In a production system, it's a very good idea to extract the files and serve them directly from Apache or your container as there'll be a significant performance improvement (very significant if apache serves them). I'm not sure why it would be loading the timepicker and date picker if you're not using them - check the html to see why there's a Requires statement. In a production system, a good idea to create a custom dojo profile (in this case, for example, to remove locale files). It makes a massive performance improvement by reducing the large number of GETs. http://cwiki.apache.org/S2WIKI/creating-a-custom-dojo-profile-for-struts-20x.html Hope that helps. Jeromy Evans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dojo javascript errors with ajax theme. please help
Hi Jerome, You're a lifesaver. Thanks for your tips. I will try them out today. I fixed my issue temporarily yesterday by extracting the jar file, and manually creating copies of gregorian.js and gregorianExtras.js etc to appropriate locations and the problem did go away but I will surely put in this permanent fix to improve performance. Thanks - Original Message From: Jeromy Evans [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, July 22, 2008 5:38:55 AM Subject: Re: Dojo javascript errors with ajax theme. please help Pranav wrote: Hi, I am using s:head theme=ajax/ in my jsp files. I have included everything as per struts2 docs. But when I launch the page in FireFox, they show me 404 errors for several javascript files. Example are: ../struts/dojo/src/i18n/calendar/nls/en-us/gregorian.js ../struts/dojo/src/i18n/calendar/nls/en/gregorianExtras.js ../struts/dojo/src/i18n/calendar/nls/en-us/gregorianExtras.js ../struts/dojo/src/widget/nls/en/TimePicker.js ../struts/dojo/src/widget/nls/en-us/TimePicker.js ../mcpages/struts/dojo/src/widget/nls/en/DropdownTimePicker.js ../struts/dojo/src/widget/nls/en-us/DropdownTimePicker.js When I opened the struts2-core-2.0.11.jar file that my project is using, I did not find these files at all. I am not using any of these components like date-time picker or calendar objects but for some reason dojo plugin tries to GET these files. This gives a lot of problem in our pre-prod system where firewalls and proxies are installed. Can someone please help me get rid of these errors? What will I have to do? I will really appreciate help from experts. Thanks Pranav In Struts 2.0.x, the files are bundled in the jar under org/apache/struts/static or somewhere nearby. The are served by the struts filter only if the filter path enables it (eg. /*) and if the property struts.serve.static=true (default true). In a production system, it's a very good idea to extract the files and serve them directly from Apache or your container as there'll be a significant performance improvement (very significant if apache serves them). I'm not sure why it would be loading the timepicker and date picker if you're not using them - check the html to see why there's a Requires statement. In a production system, a good idea to create a custom dojo profile (in this case, for example, to remove locale files). It makes a massive performance improvement by reducing the large number of GETs. http://cwiki.apache.org/S2WIKI/creating-a-custom-dojo-profile-for-struts-20x.html Hope that helps. Jeromy Evans - 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: Dojo javascript errors with ajax theme. please help
Those files doesn't exist in the original Dojo source, because dojo looks the files acording to your language preferences, but the en and the en-us are the default. It's normal to have errors with those encodings. Si quieres ser más positivo, pierde un electrón Miguel Ruiz Velasco S. On Tue, Jul 22, 2008 at 10:57, Pranav [EMAIL PROTECTED] wrote: Hi Jerome, You're a lifesaver. Thanks for your tips. I will try them out today. I fixed my issue temporarily yesterday by extracting the jar file, and manually creating copies of gregorian.js and gregorianExtras.js etc to appropriate locations and the problem did go away but I will surely put in this permanent fix to improve performance. Thanks - Original Message From: Jeromy Evans [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, July 22, 2008 5:38:55 AM Subject: Re: Dojo javascript errors with ajax theme. please help Pranav wrote: Hi, I am using s:head theme=ajax/ in my jsp files. I have included everything as per struts2 docs. But when I launch the page in FireFox, they show me 404 errors for several javascript files. Example are: ../struts/dojo/src/i18n/calendar/nls/en-us/gregorian.js ../struts/dojo/src/i18n/calendar/nls/en/gregorianExtras.js ../struts/dojo/src/i18n/calendar/nls/en-us/gregorianExtras.js ../struts/dojo/src/widget/nls/en/TimePicker.js ../struts/dojo/src/widget/nls/en-us/TimePicker.js ../mcpages/struts/dojo/src/widget/nls/en/DropdownTimePicker.js ../struts/dojo/src/widget/nls/en-us/DropdownTimePicker.js When I opened the struts2-core-2.0.11.jar file that my project is using, I did not find these files at all. I am not using any of these components like date-time picker or calendar objects but for some reason dojo plugin tries to GET these files. This gives a lot of problem in our pre-prod system where firewalls and proxies are installed. Can someone please help me get rid of these errors? What will I have to do? I will really appreciate help from experts. Thanks Pranav In Struts 2.0.x, the files are bundled in the jar under org/apache/struts/static or somewhere nearby. The are served by the struts filter only if the filter path enables it (eg. /*) and if the property struts.serve.static=true (default true). In a production system, it's a very good idea to extract the files and serve them directly from Apache or your container as there'll be a significant performance improvement (very significant if apache serves them). I'm not sure why it would be loading the timepicker and date picker if you're not using them - check the html to see why there's a Requires statement. In a production system, a good idea to create a custom dojo profile (in this case, for example, to remove locale files). It makes a massive performance improvement by reducing the large number of GETs. http://cwiki.apache.org/S2WIKI/creating-a-custom-dojo-profile-for-struts-20x.html Hope that helps. Jeromy Evans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dojo javascript errors with ajax theme. please help
Thanks a lot Jermoy! This fixed my issue with ff3. I created a custom dojo build andd disabled struts.widget.StrutsTimePicker. I don't use the DateTimePickers. The svn repo is here: http://svn.dojotoolkit.org/src/tags/release-0.4.0/ regards -- Markus Stauffer On Tuesday 22 July 2008 17.57:15 Pranav wrote: Hi Jerome, You're a lifesaver. Thanks for your tips. I will try them out today. I fixed my issue temporarily yesterday by extracting the jar file, and manually creating copies of gregorian.js and gregorianExtras.js etc to appropriate locations and the problem did go away but I will surely put in this permanent fix to improve performance. Thanks - Original Message From: Jeromy Evans [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, July 22, 2008 5:38:55 AM Subject: Re: Dojo javascript errors with ajax theme. please help Pranav wrote: Hi, I am using s:head theme=ajax/ in my jsp files. I have included everything as per struts2 docs. But when I launch the page in FireFox, they show me 404 errors for several javascript files. Example are: ../struts/dojo/src/i18n/calendar/nls/en-us/gregorian.js ../struts/dojo/src/i18n/calendar/nls/en/gregorianExtras.js ../struts/dojo/src/i18n/calendar/nls/en-us/gregorianExtras.js ../struts/dojo/src/widget/nls/en/TimePicker.js ../struts/dojo/src/widget/nls/en-us/TimePicker.js ../mcpages/struts/dojo/src/widget/nls/en/DropdownTimePicker.js ../struts/dojo/src/widget/nls/en-us/DropdownTimePicker.js When I opened the struts2-core-2.0.11.jar file that my project is using, I did not find these files at all. I am not using any of these components like date-time picker or calendar objects but for some reason dojo plugin tries to GET these files. This gives a lot of problem in our pre-prod system where firewalls and proxies are installed. Can someone please help me get rid of these errors? What will I have to do? I will really appreciate help from experts. Thanks Pranav In Struts 2.0.x, the files are bundled in the jar under org/apache/struts/static or somewhere nearby. The are served by the struts filter only if the filter path enables it (eg. /*) and if the property struts.serve.static=true (default true). In a production system, it's a very good idea to extract the files and serve them directly from Apache or your container as there'll be a significant performance improvement (very significant if apache serves them). I'm not sure why it would be loading the timepicker and date picker if you're not using them - check the html to see why there's a Requires statement. In a production system, a good idea to create a custom dojo profile (in this case, for example, to remove locale files). It makes a massive performance improvement by reducing the large number of GETs. http://cwiki.apache.org/S2WIKI/creating-a-custom-dojo-profile-for-strut s-20x.html Hope that helps. Jeromy Evans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dojo javascript errors with ajax theme. please help
Hi Jerome, I tried this but unfortunately their dojo's svn does not have the release 0.4.0 anymore. I could only get the source code for release 0.4.3 from their download section. Do you think that will work? If not, can you tell me the exact svn location from where I can get the release 0.4.0 of dojo? Thanks Pranav - Original Message From: Pranav [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, July 22, 2008 8:57:15 AM Subject: Re: Dojo javascript errors with ajax theme. please help Hi Jerome, You're a lifesaver. Thanks for your tips. I will try them out today. I fixed my issue temporarily yesterday by extracting the jar file, and manually creating copies of gregorian.js and gregorianExtras.js etc to appropriate locations and the problem did go away but I will surely put in this permanent fix to improve performance. Thanks - Original Message From: Jeromy Evans [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, July 22, 2008 5:38:55 AM Subject: Re: Dojo javascript errors with ajax theme. please help Pranav wrote: Hi, I am using s:head theme=ajax/ in my jsp files. I have included everything as per struts2 docs. But when I launch the page in FireFox, they show me 404 errors for several javascript files. Example are: ../struts/dojo/src/i18n/calendar/nls/en-us/gregorian.js ../struts/dojo/src/i18n/calendar/nls/en/gregorianExtras.js ../struts/dojo/src/i18n/calendar/nls/en-us/gregorianExtras.js ../struts/dojo/src/widget/nls/en/TimePicker.js ../struts/dojo/src/widget/nls/en-us/TimePicker.js ../mcpages/struts/dojo/src/widget/nls/en/DropdownTimePicker.js ../struts/dojo/src/widget/nls/en-us/DropdownTimePicker.js When I opened the struts2-core-2.0.11.jar file that my project is using, I did not find these files at all. I am not using any of these components like date-time picker or calendar objects but for some reason dojo plugin tries to GET these files. This gives a lot of problem in our pre-prod system where firewalls and proxies are installed. Can someone please help me get rid of these errors? What will I have to do? I will really appreciate help from experts. Thanks Pranav In Struts 2.0.x, the files are bundled in the jar under org/apache/struts/static or somewhere nearby. The are served by the struts filter only if the filter path enables it (eg. /*) and if the property struts.serve.static=true (default true). In a production system, it's a very good idea to extract the files and serve them directly from Apache or your container as there'll be a significant performance improvement (very significant if apache serves them). I'm not sure why it would be loading the timepicker and date picker if you're not using them - check the html to see why there's a Requires statement. In a production system, a good idea to create a custom dojo profile (in this case, for example, to remove locale files). It makes a massive performance improvement by reducing the large number of GETs. http://cwiki.apache.org/S2WIKI/creating-a-custom-dojo-profile-for-struts-20x.html Hope that helps. Jeromy Evans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dojo javascript errors with ajax theme. please help
S2.0.11 uses Dojo 0.4.3. Dave --- On Tue, 7/22/08, Pranav [EMAIL PROTECTED] wrote: From: Pranav [EMAIL PROTECTED] Subject: Re: Dojo javascript errors with ajax theme. please help To: Struts Users Mailing List user@struts.apache.org Date: Tuesday, July 22, 2008, 6:58 PM Hi Jerome, I tried this but unfortunately their dojo's svn does not have the release 0.4.0 anymore. I could only get the source code for release 0.4.3 from their download section. Do you think that will work? If not, can you tell me the exact svn location from where I can get the release 0.4.0 of dojo? Thanks Pranav - Original Message From: Pranav [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, July 22, 2008 8:57:15 AM Subject: Re: Dojo javascript errors with ajax theme. please help Hi Jerome, You're a lifesaver. Thanks for your tips. I will try them out today. I fixed my issue temporarily yesterday by extracting the jar file, and manually creating copies of gregorian.js and gregorianExtras.js etc to appropriate locations and the problem did go away but I will surely put in this permanent fix to improve performance. Thanks - Original Message From: Jeromy Evans [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, July 22, 2008 5:38:55 AM Subject: Re: Dojo javascript errors with ajax theme. please help Pranav wrote: Hi, I am using s:head theme=ajax/ in my jsp files. I have included everything as per struts2 docs. But when I launch the page in FireFox, they show me 404 errors for several javascript files. Example are: ../struts/dojo/src/i18n/calendar/nls/en-us/gregorian.js ../struts/dojo/src/i18n/calendar/nls/en/gregorianExtras.js ../struts/dojo/src/i18n/calendar/nls/en-us/gregorianExtras.js ../struts/dojo/src/widget/nls/en/TimePicker.js ../struts/dojo/src/widget/nls/en-us/TimePicker.js ../mcpages/struts/dojo/src/widget/nls/en/DropdownTimePicker.js ../struts/dojo/src/widget/nls/en-us/DropdownTimePicker.js When I opened the struts2-core-2.0.11.jar file that my project is using, I did not find these files at all. I am not using any of these components like date-time picker or calendar objects but for some reason dojo plugin tries to GET these files. This gives a lot of problem in our pre-prod system where firewalls and proxies are installed. Can someone please help me get rid of these errors? What will I have to do? I will really appreciate help from experts. Thanks Pranav In Struts 2.0.x, the files are bundled in the jar under org/apache/struts/static or somewhere nearby. The are served by the struts filter only if the filter path enables it (eg. /*) and if the property struts.serve.static=true (default true). In a production system, it's a very good idea to extract the files and serve them directly from Apache or your container as there'll be a significant performance improvement (very significant if apache serves them). I'm not sure why it would be loading the timepicker and date picker if you're not using them - check the html to see why there's a Requires statement. In a production system, a good idea to create a custom dojo profile (in this case, for example, to remove locale files). It makes a massive performance improvement by reducing the large number of GETs. http://cwiki.apache.org/S2WIKI/creating-a-custom-dojo-profile-for-struts-20x.html Hope that helps. Jeromy Evans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]