Struts2 + jQuery issue action methods called twice.
We are trying to use the struts2 with jQuery (jQgrid + jQuery UI components) and not the struts jQuery plug-in. We are using the json-default . Found that the struts methods are being called twice. Has any one faced this issue before? Regards, Satya - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts2 + jQuery issue action methods called twice.
Resolved the issue. My actuon method was getXxx() and json plugin was causing the issue. Look at the post below. http://stackoverflow.com/questions/6061709/struts2-action-being-called-twice-if-result-type-is-json Sent from my iPhone On Sep 13, 2011, at 8:36 AM, satyanarayana katta saty.pra...@gmail.com wrote: We are trying to use the struts2 with jQuery (jQgrid + jQuery UI components) and not the struts jQuery plug-in. We are using the json-default . Found that the struts methods are being called twice. Has any one faced this issue before? Regards, Satya
Re: JSON Plugin - my execute method is being called twice
Check if the action is submitted twice! If you are using js submit of the form explicitly and form tag also has the same action configured. Sent from my iPhone On Mar 14, 2011, at 6:45 PM, fr...@meruvian.org wrote: We got current json plugins also have problem parse json I think the json jar is the current issue We modify to use jackson Anyone? The actionmapper using jackson we put in github.com/blueoxygen/cimande /m/ -Original Message- From: Muneer Malik tutti...@gmail.com Date: Mon, 14 Mar 2011 19:36:33 To: Struts Users Mailing Listuser@struts.apache.org Reply-To: Struts Users Mailing List user@struts.apache.org Subject: JSON Plugin - my execute method is being called twice Can someone help here? using the JSON plugin - my execute method is being called twice. Thanks -- Confidentiality Notice --- THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE UNDER APPLICABLE LAW. IF YOU ARE NOT THE INTENDED RECIPIENT, OR THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION, DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED. IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT tutti...@gmail.com OR BY TELEPHONE AT 817-458-1764. THANK YOU. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts2 jQuery Plugin Issue on Websphere 6.1
My bad. Realized it's not an issue with showcase example but with convention plugin on websphere 6.1. Sent from my iPhone On Jan 25, 2011, at 7:51 PM, satyanarayana katta saty.pra...@gmail.com wrote: Hi, I was trying the Struts2 jQuery Plugin(struts2-jquery-showcase-2.5.1) showcase example on Websphere 6.1 and was not able to load the index.jsp. Getting the following error. [1/25/11 19:49:41:709 PST] 001c ServletWrappe I SRVE0242I: [struts2-jquery-showcase-2.5.1EAR] [/jquery] [/pages/index.jsp]: Initialization successful. [1/25/11 19:49:41:772 PST] 001c SystemOut O 2011-01-25 19:49:41,772 DEBUG (com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor:68) - Entering getProperty (ognl.OgnlContext@d68e0c7,org.apache.struts2.util.AttributeMap@5c005c,templateDir) [1/25/11 19:49:41:772 PST] 001c SystemOut O 2011-01-25 19:49:41,772 DEBUG (com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor:68) - Entering getProperty (ognl.OgnlContext@d68e0c7,org.apache.struts2.util.AttributeMap@5c005c,templateDir) [1/25/11 19:49:41:787 PST] 001c SystemOut O 2011-01-25 19:49:41,787 DEBUG (com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor:68) - Entering getProperty (ognl.OgnlContext@29ffa442,org.apache.struts2.util.AttributeMap@11561156,templateDir) [1/25/11 19:49:41:787 PST] 001c SystemOut O 2011-01-25 19:49:41,787 WARN (org.apache.struts2.components.ServletUrlRenderer:56) - No configuration found for the specified action: 'index' in namespace: '/'. Form action defaulting to 'action' attribute's literal value. [1/25/11 19:49:41:787 PST] 001c SystemOut O 2011-01-25 19:49:41,787 DEBUG (com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor:68) - Entering getProperty (ognl.OgnlContext@29ffa442,org.apache.struts2.util.AttributeMap@11561156,templateDir) [1/25/11 19:49:41:803 PST] 001c SystemOut O 2011-01-25 19:49:41,803 DEBUG (com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor:68) - Entering getProperty (ognl.OgnlContext@d5e3068a,org.apache.struts2.util.AttributeMap@625c625c,templateDir) [1/25/11 19:49:41:803 PST] 001c ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: /pages/index.jsp. Exception thrown : tag 'select', field 'list', name 'theme': The requested list key 'themes' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location] at org.apache.struts2.components.Component.fieldError(Component.java:237) at org.apache.struts2.components.Component.findValue(Component.java:358) at org.apache.struts2.components.ListUIBean.evaluateExtraParams(ListUIBean.java:80) at org.apache.struts2.components.Select.evaluateExtraParams(Select.java:105) at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:856) at org.apache.struts2.components.UIBean.end(UIBean.java:510) at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42) at com.ibm._jsp._index._jspx_meth_s_select_0(_index.java:325) at com.ibm._jsp._index._jspx_meth_s_form_0(_index.java:411) at com.ibm._jsp._index._jspService(_index.java:122) at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:118) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464) at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:205) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:277) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:321) at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:159) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2
Struts2 jQuery Plugin Issue on Websphere 6.1
Hi, I was trying the Struts2 jQuery Plugin(struts2-jquery-showcase-2.5.1) showcase example on Websphere 6.1 and was not able to load the index.jsp. Getting the following error. [1/25/11 19:49:41:709 PST] 001c ServletWrappe I SRVE0242I: [struts2-jquery-showcase-2.5.1EAR] [/jquery] [/pages/index.jsp]: Initialization successful. [1/25/11 19:49:41:772 PST] 001c SystemOut O 2011-01-25 19:49:41,772 DEBUG (com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor:68) - Entering getProperty (ognl.OgnlContext@d68e0c7,org.apache.struts2.util.AttributeMap@5c005c,templateDir) [1/25/11 19:49:41:772 PST] 001c SystemOut O 2011-01-25 19:49:41,772 DEBUG (com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor:68) - Entering getProperty (ognl.OgnlContext@d68e0c7,org.apache.struts2.util.AttributeMap@5c005c,templateDir) [1/25/11 19:49:41:787 PST] 001c SystemOut O 2011-01-25 19:49:41,787 DEBUG (com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor:68) - Entering getProperty (ognl.OgnlContext@29ffa442,org.apache.struts2.util.AttributeMap@11561156,templateDir) [1/25/11 19:49:41:787 PST] 001c SystemOut O 2011-01-25 19:49:41,787 WARN (org.apache.struts2.components.ServletUrlRenderer:56) - No configuration found for the specified action: 'index' in namespace: '/'. Form action defaulting to 'action' attribute's literal value. [1/25/11 19:49:41:787 PST] 001c SystemOut O 2011-01-25 19:49:41,787 DEBUG (com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor:68) - Entering getProperty (ognl.OgnlContext@29ffa442,org.apache.struts2.util.AttributeMap@11561156,templateDir) [1/25/11 19:49:41:803 PST] 001c SystemOut O 2011-01-25 19:49:41,803 DEBUG (com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor:68) - Entering getProperty (ognl.OgnlContext@d5e3068a,org.apache.struts2.util.AttributeMap@625c625c,templateDir) [1/25/11 19:49:41:803 PST] 001c ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: /pages/index.jsp. Exception thrown : tag 'select', field 'list', name 'theme': The requested list key 'themes' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location] at org.apache.struts2.components.Component.fieldError(Component.java:237) at org.apache.struts2.components.Component.findValue(Component.java:358) at org.apache.struts2.components.ListUIBean.evaluateExtraParams(ListUIBean.java:80) at org.apache.struts2.components.Select.evaluateExtraParams(Select.java:105) at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:856) at org.apache.struts2.components.UIBean.end(UIBean.java:510) at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42) at com.ibm._jsp._index._jspx_meth_s_select_0(_index.java:325) at com.ibm._jsp._index._jspx_meth_s_form_0(_index.java:411) at com.ibm._jsp._index._jspService(_index.java:122) at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:118) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464) at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:205) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:277) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:321) at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:159) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
Re: checkbox problem
R u by any chance creating the new list in the action class. If so it won't work and u will get null. Sent from my iPhone On Oct 26, 2010, at 10:23 AM, Peter Bliznak pbliz...@gmail.com wrote: Opps...damn gmail. As I've said I am using pretty much same approach as it was suggested above by the other poster. I have list: private ListWorkOrderTask workOrderTaskList; with getter and setter' EAch : WorkOrderTask have : Long id; boolean completed ;// checkbox with getters and setter's in jsp iterate: s:if test=workOrderTaskList.size() 0 s:iterator value=workOrderTask proceList var=task status=assetStatus tr class=listRow td s:checkbox theme=simple name=completed fieldValue=%{#task.completed} / /td td ps:property value=strDescription //p/td so on at this stage I can display everything - all works including checkboxes. Problem is when I submit and trying to retrive workOrderTaskList inside my action for futher processing - list is null - and I do have getter/setter On Tue, Oct 26, 2010 at 12:20 PM, Dave Newton davelnew...@gmail.com wrote: This question has been asked and answered quite a few times. I agree the documentation should reflect this; as we're a volunteer group all assistance is appreciated. Feel free to file a CLA and update the docs to accurately reflect current behavior, and add entries to the FAQ if it addresses a typical pain point. And my book specifically *did* address many types of best practices, but mine, like all other books, have a limited number of pages, and which information is included/excluded is not always up to the author. The reason the docs for checkbox don't address this typical case is because it has nothing specifically to do with checkboxes. If you're having a specific issue, post your code, configuration, and Struts version, otherwise we can't really help. Dave On Tue, Oct 26, 2010 at 11:59 AM, Peter Bliznak pbliz...@gmail.com wrote: Listen I googled quite a while before I asked here and all I saw was sea of lost souls asking same question dating back to 2007...but NOT answers...if it is so simple and obvious then why docs for checkbox are not mentioning this trivial case. .. BTW would you please point me to the site where there is nicely organized reading on Best Struts2 PracticesI will truly appreciate it. (S2 in Action didn't mention and book written by guy with similar same like yours neitheraside from that Ive' read 3 more...guess what... nobody mentioned it anywhere) On Tue, Oct 26, 2010 at 7:54 AM, Dave Newton davelnew...@gmail.com wrote: Oh, I understand. Definitely agree; I think the OP just isn't aware of some S2 functionality and/or best practices, that's all. Dave On Tuesday, October 26, 2010, Li Ying liying.cn.2...@gmail.com wrote: I mean: Representing associated data by a DTO class and then holding DTO instances in one List is better than Holding data in several separated Lists each represent one column. 2010/10/26 Dave Newton davelnew...@gmail.com: On Tue, Oct 26, 2010 at 4:32 AM, Li Ying wrote: I think this is a better design, because the data modal is more compliant with OO principles. Better than what? (And as an aside, there's nothing particularly OO about what's essentially a struct, although from a pragmatic viewpoint, particularly when doing data transfer, sometimes such constructs seem reasonable. See http://c2.com/cgi/wiki?DumbDataObject for a brief discussion.) Dave - 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 - 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: IE7 abruptly closes with struts 2.1.7
Thanks for the reply. We don't see any issues at the bak end. The IE just closes abruptly. These r intranet apps and support only IE7 right now. We see this happening only for certain set of users. Regards, Satya Sent from my iPhone On Jul 26, 2010, at 6:49 AM, Martin Gainty mgai...@hotmail.com wrote: IE options: enable script debugging display notification about every script error before the error is manifested append debug=browser on your Action e.g. index.action?query=browser http://struts.apache.org/2.1.8.1/docs/debugging-struts.html strip the jsp down to basics (a form) and add in one component at a time and observe behavior %@ taglib prefix=s uri=/struts-tags % html headtitleTitle/title/head body s:form action=YourAction s:submit value=submit/ /s:form /body /html add JSTL EL do you see error? add OGNL expressions do you see error? do you see error with other browsers?? Martin Gainty __ 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. Subject: IE7 abruptly closes with struts 2.1.7 From: saty.pra...@gmail.com Date: Tue, 20 Jul 2010 09:39:30 -0700 To: user@struts.apache.org Hi, We are using struts 2.1.7 with dojos for our application. Sometimes the Ie7 abruptly closes leaving no traces what so ever. Has any one faced this issue earlier? Sent from my iPhone - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org _ The New Busy is not the old busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
IE7 abruptly closes with struts 2.1.7
Hi, We are using struts 2.1.7 with dojos for our application. Sometimes the Ie7 abruptly closes leaving no traces what so ever. Has any one faced this issue earlier? Sent from my iPhone - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to modify Struts2 start up process.
See if ur web.XML has the spring configuration configured twice. We faced the same issue before Sent from my iPhone On Jul 13, 2010, at 11:42 AM, hisameer cool_sameer_fo...@yahoo.com wrote: - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to modify Struts2 start up process.
Using the application level spring container would be sufficient with init method set. Sent from my iPhone On Jun 25, 2010, at 11:36 AM, hisameer cool_sameer_fo...@yahoo.com wrote: Hi, I am using Struts2.1.6+Spring2.5.6+Hibernate+JPA in my web application. The application server is JBOSS5. I have to implement a logic so that when the server starts I can execute some database scripts using my DAO service layer. And this class is responsible loading some required variables from the database. The class should execute only one on the start up. Please give me some suggestions how to do this. If possible write some sample code. Thanks, Sameer -- View this message in context: http://old.nabble.com/How-to-modify-Struts2-start-up-process.-tp28995322p28995322.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: IMPORTANT Call action on application deploy, like servlet with load-on-startup (Struts 2)
If u have used spring in ur application then u can use the init-method. Here is how it works You can configure your war to load the spring upon app start-up. The init method will auomatically get invoked. Sent from my iPhone On Jun 23, 2010, at 11:03 AM, Oscar oscar.kalde...@gmail.com wrote: Hi to all, i have the next situation: I need to call an action on application startup like you can call a servlet on application startup by setting load-on-startup parameter servlet on web.xml . I can't use a servlet because i need to trigger my interceptors that initialize JPA EntityManager . Is there a way to achieve this? Best regards. -- Oscar Calderón SCJP 6 http://www.javahowto.net/ - 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: Page composition strategy
U should try tiles for this Sent from my iPhone On Jun 22, 2010, at 10:03 AM, Antonio S. inganto...@gmail.com wrote: Hello. I'm a beginner in web development with Struts2 and I'm planning the structure of my application. Let me tell you my problem. With 'page composition strategy' I mean the strategy for making all pages in the application share the same HTML structure (header, left-column, content, right column, footer) using template inclusion mechanisms or others. Currently I'm using inclusion and all my JSPs share the same structure: A. 'include' prelude content: header, left-column. B. Specific content. C. 'include' coda content: right-column, footer. I don't like this approach and I'm thinking about alternatives; I wonder if Struts2 can help with this: i. Use the very same JSP template for all requests. That template would include specific content by calling the corresponding segment. This would involve a default result pointing to this JSP template and some means of specifying the name of the specific segment that will be invoked from inside the main template. ii. Use result pages as segments and render only specific content. Later on, some interceptor or servlet filter would include prelude and coda in the output stream. So, my questions are: 1. Can you recommend the best practice for page composition in Struts2? 2. Can I use Struts2 for implementing above mentioned strategies i. and ii.? How? Thanks for your time. Regards. Antonio. - 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: same bean multiple fields
One way to have hidden variables for the remaining fields under the same form and by default all the fo fields get submitted Sent from my iPhone On Jun 8, 2010, at 1:05 AM, Upasana Sharma sharma...@gmail.com wrote: Thanks for ur reply... by i m using struts 2.0... 2010/6/8 Paweł Wielgus poulw...@gmail.com Hi Upasana, if You are using struts1 You may look here: http://struts.apache.org/1.x/struts-taglib/indexedprops.html Best greetings, Paweł Wielgus. 2010/6/8 Upasana Sharma sharma...@gmail.com: I have a form which needs to submit multiple values(user name , last used etc) of the same type for different users on a single click. But my form bean refers to one user's field only . i need to submit all the fields using a single form button click. how should i use beans n jsp in this case. -- Thanks in advance Upasana Sharma - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Thanks and Regards Upasana Sharma - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Encrypting parameters
How any keeping some basic Ida I'm session and verifying against the incoing request to ensure that no corruption has happened Sent from my iPhone On Jun 3, 2010, at 12:27 AM, Stephane Cosmeur cosm...@gmail.com wrote: Thank you for your answers. they are useful but not quite appropriate with my problem. I dont want my application be that secure. So i dont think i need SSL or HTTPS event if it could be good. I am going to give a concrete example : A user can have any contacts, he can delete it. His contacts are listed in a html table and each row has a delete link which call an action. Then i construct my url like this : s:url id=deleteALaCarteEntry action=DeleteALaCarteEntry s:param name=id value=id/ /s:url tds:a href=%{deleteALaCarteEntry}Delete/s:a/td In that case, how can i hide my id parameters ? If it's not posible i guess my only solution is to check in the server side if the contact is present in the list of the user. In that case i would like to find a generic solution to apply the test, not only for contact, but for company, supplier, orders, ..., as well. Regards 2010/6/3 Vishnu Vyasan Nelliparmbil vis...@mun.gov.bh Hi, The advantage of the post parameter is that it can't be viewed by the user in the url. But a attacker can still edit the header and attack the application without much trouble. To improve security you can validate the parameter properly where you receive the parameter. For example number only or does not contains invalid characters in string for eg, ,,_ ,/, etc like that. Another good thing will be to implement SSL. Now you can also go to OWASP and download the different security scanners and scan for the security loop holes. Best Regards Vishnu NV -Original Message- From: Rahul Mohan [mailto:rahul.mo...@tcs.com] Sent: Thursday, June 03, 2010 8:44 AM To: Struts Users Mailing List Subject: Re: Encrypting parameters Hi, I don't think its a good idea to expose the URLs to the users in a secure application. Avoid GET requests and stick to POST. Also, sticking to request forwarding instead of redirects will keep the URL fixed on the browser's address bar. You might have some issues with back button because of this, but in most business applications this is OK since going back one step in some process is anyways not allowed. Combined with HTTPS this will give you good enough protection against eavesdropping. But, to protect data access, you would still need to enforce some access control on the data based on the user credentials. cheers, Rahul Mohan From: Stephane Cosmeur cosm...@gmail.com To: Struts Users Mailing List user@struts.apache.org Date: 03-06-2010 08:53 Subject: Encrypting parameters Hello, I would like to improve the security of my web application. My problem is I would like to encrypt the visible parameters in the URL to prevent user to change it to access data he should not see. At start i thought the simple attribute encode of s:url will work for what i need, but it's not the case. Then i don't believe a such useful feature is implemented in struts 2. So what is the best solution to perform it ? I was thinking to an interceptor which unencrypt each request for each action and a java function which encry the url in each jsp, but i'm not sure it's the good way to do it. Any help would be appreciated ! Regards -- Stéphane Cosmeur =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Stéphane Cosmeur - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Webapp runs under Windows, throws OGNL error under Linux
Issue with logger. Suppress the messages at the logger level will resolve the issue. Sent from my iPhone On Apr 12, 2010, at 7:46 AM, RogerV roger.var...@googlemail.com wrote: Just to prove to myself that I'm not going mad, I've added a System.out.println message to the method that Ognl is complaining about and a second System.out.println message at the start of the application to prove that I am running the same version. I see both messages running under Windows and only the second message under Unix and the app throws the Ognl MethodNotFoundException. -- View this message in context: http://old.nabble.com/Webapp-runs-under-Windows%2C-throws-OGNL-error-under-Linux-tp28217837p28218762.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
Param Interceptor - Unable to save the data for Map of Lists
Hi, Struts Version - 2.1.7 We have an issue with the MapString, ListObject. Here is the scenario, we are displaying the data from the List on the UI as the text fields. When a user changes and submits the form, the form data has to be saved. We are able to display the data from the List onto the UI. When the form is submitted, the Map is coming back as null in the action class. s:iterator value=textMap status=iterStatus s:iterator value=value status=iterStatus1 s:textfield name=textMap['%{key}']['%{#iterStatus1.index}'].name value=%{name}/ /s:iterator /s:iterator I am also attaching the source code SampleAction.java Sample.java (Pojo representing the Object in the list) struts.xml struts sample.jsp. Please help. Rgds, Satya ?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 package name=test namespace=/test extends=as-tiles-default action name=testMapsShow class=test.SampleAction method=display result name=success/testapps/sample.jsp/result /action action name=testMapsSave class=test.SampleAction method=save result name=success/testapps/sample.jsp/result /action /package /struts - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Invoking multiple webservices from Action
In big enterprises everything is not controlled by one group. There will be a big legacy out there. It is not just one or two webservices you call to get the data. In our case, we had call around 12 webservices. Whatever kind of optimization you do, it is difficult to beat what we can get out of threading. I totally understand he multithreading is not allowed by servlet specification, but we didn't had an option but to use it. Rgds, Satya On Mon, May 18, 2009 at 12:46 AM, Lukasz Lenart lukasz.len...@googlemail.com wrote: 2009/5/17 sid5 siddharthchha...@hotmail.com: We currently have a SOA based application with a struts front end. We have to invoke multiple webservices to get the data to render a single page. I was thinking of writing an Executor service inside an Action class or an Interceptor to do this. Is this the right approach ? It's no so good to mess with threads on application server, as I remember it's not allowed by servlet specification, you should use given servlet specific approach. I would like the webservices to be invoked in parallel. Why? If it's so slow, try to optimize them. 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: Invoking multiple webservices from Action
You can choose to write your own threading mechanism to invoke the webservices in parallel. That is what we do. We are using FJTask, which has a neater Fork and join mechanism for invoking the threads in parallel. On Sun, May 17, 2009 at 11:38 AM, sid5 siddharthchha...@hotmail.com wrote: hi We currently have a SOA based application with a struts front end. We have to invoke multiple webservices to get the data to render a single page. I was thinking of writing an Executor service inside an Action class or an Interceptor to do this. Is this the right approach ? I would like the webservices to be invoked in parallel. Are there any ParallelAction in struts. -- View this message in context: http://www.nabble.com/Invoking-multiple-webservices-from-Action-tp23586299p23586299.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: NoSuchPropertyException Warining.
supress warn in the logger package you are using for this speicific package. It should work. On Fri, May 8, 2009 at 7:56 AM, Siddiq Syed siddiq...@yahoo.com wrote: Hi all, I want to avoid the waring displayed in the consloe when passing the attributes in the redirect action. Below is the struts.xml where the action is configured and so is the parameters ,stack trace of the waring and ongl exception -- action name=processRevocation class=us.ga.state.pap.cons.clemency.presentation.action.activity.UpdateCaseAction method=processRevocation result name=success type=redirect-action setupForRevocation ${caseNumber} ${caseEditReason} ${showButton} ${taskId} /result result name=input type=tileseditRevocation/result /action WARN - com.opensymphony.xwork2.util.OgnlUtil.internalSetProperty - GC0zQAqYxnujPwGB54TSGA** | Caught OgnlException while setting property 'showButton' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. ognl.NoSuchPropertyException: org.apache.struts2.dispatcher.ServletActionRedirectResult.showButton at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132) at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlValueStack.java:81) at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656). I just need to avoid the warning getting display on the console. Any help is highly appreicated. Thanks Siddiq. -- View this message in context: http://www.nabble.com/NoSuchPropertyException-Warining.-tp23447658p23447658.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: Issue in Action Chaining
No it doesn't work. Chain is not accepting any of the parameters strings. Its going to the global error page directly. Rgds, Satya On Tue, Apr 21, 2009 at 10:22 PM, Nils-Helge Garli Hegvik nil...@gmail.comwrote: I'm not sure if this applies to the chain result, but you could give it a shot: http://struts.apache.org/2.1.6/docs/parameters-in-configuration-results.html Nils-H On Wed, Apr 22, 2009 at 6:36 AM, satyanarayana katta saty.pra...@gmail.com wrote: Hi All, I have a Action class class BaseAction extends ActionSupport { private Sting data; public void getData() { return this.data; } public String setData(String data){ this.data = data; } } class Action extends BaseAction{ public String execute() throws Exception { System.out.println(getData()); setData(abc); return chain; } public String executeChain() throws Exception { System.out.println(getData()); return success } } xml configuration: action name=test class=Action result name=chaintest2/result /action action name=test2 class=Action method=execute1 result name=chain/result /action http://localhost:8080/test/test.action?data=ball Output of execute: ball Output of execute1: ball I am expecting the out of execute1 as abc Am I missing something please help me resolve the issue. Rgds, Satya - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Issue in Action Chaining
Hi Wesw, I also tried printing the object address and what you said is right!! It is creating a new object. The object address is not same. Is there any other way of passing the data to the chained method? I want to use the redirect as the last option!! Rgds, Satya On Tue, Apr 21, 2009 at 10:22 PM, satyanarayana katta saty.pra...@gmail.com wrote: Hi Wesw, Thanks for the reply. Yes, I meant to say testChain(). Thanks for that. So, how is the old data being retained. Does it take it from the http request and recreates the new instance? If that is the case, what other options do I have to get the changed data into the chained method? Thanks Satya On Tue, Apr 21, 2009 at 9:55 PM, Wes Wannemacher w...@wantii.com wrote: On Wednesday 22 April 2009 00:36:36 satyanarayana katta wrote: Hi All, I have a Action class class BaseAction extends ActionSupport { private Sting data; public void getData() { return this.data; } public String setData(String data){ this.data = data; } } class Action extends BaseAction{ public String execute() throws Exception { System.out.println(getData()); setData(abc); return chain; } public String executeChain() throws Exception { System.out.println(getData()); return success } } xml configuration: action name=test class=Action result name=chaintest2/result /action action name=test2 class=Action method=execute1 result name=chain/result /action http://localhost:8080/test/test.action?data=ball Output of execute: ball Output of execute1: ball I am expecting the out of execute1 as abc Am I missing something please help me resolve the issue. Rgds, Satya The configuration of test2 points to method execute1, but your action has executeChain(). I assume that's a typo. My (somewhat educated) guess is that when you chain to the next action, even though it is the same class, a new instance is created. In the new instance, setData(String) is never called since it is only called in the execute method. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Issue in Action Chaining
Hi All, I have a Action class class BaseAction extends ActionSupport { private Sting data; public void getData() { return this.data; } public String setData(String data){ this.data = data; } } class Action extends BaseAction{ public String execute() throws Exception { System.out.println(getData()); setData(abc); return chain; } public String executeChain() throws Exception { System.out.println(getData()); return success } } xml configuration: action name=test class=Action result name=chaintest2/result /action action name=test2 class=Action method=execute1 result name=chain/result /action http://localhost:8080/test/test.action?data=ball Output of execute: ball Output of execute1: ball I am expecting the out of execute1 as abc Am I missing something please help me resolve the issue. Rgds, Satya
Re: Issue in Action Chaining
Hi Wesw, Thanks for the reply. Yes, I meant to say testChain(). Thanks for that. So, how is the old data being retained. Does it take it from the http request and recreates the new instance? If that is the case, what other options do I have to get the changed data into the chained method? Thanks Satya On Tue, Apr 21, 2009 at 9:55 PM, Wes Wannemacher w...@wantii.com wrote: On Wednesday 22 April 2009 00:36:36 satyanarayana katta wrote: Hi All, I have a Action class class BaseAction extends ActionSupport { private Sting data; public void getData() { return this.data; } public String setData(String data){ this.data = data; } } class Action extends BaseAction{ public String execute() throws Exception { System.out.println(getData()); setData(abc); return chain; } public String executeChain() throws Exception { System.out.println(getData()); return success } } xml configuration: action name=test class=Action result name=chaintest2/result /action action name=test2 class=Action method=execute1 result name=chain/result /action http://localhost:8080/test/test.action?data=ball Output of execute: ball Output of execute1: ball I am expecting the out of execute1 as abc Am I missing something please help me resolve the issue. Rgds, Satya The configuration of test2 points to method execute1, but your action has executeChain(). I assume that's a typo. My (somewhat educated) guess is that when you chain to the next action, even though it is the same class, a new instance is created. In the new instance, setData(String) is never called since it is only called in the execute method. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: s:datetimepicker
Which version of struts are you using? If you using 2.1.6 and above, you need to have the struts-dojo lib and there is a tag include with sx: you need to use sx:datetimepicker It is something like struts extensions. You also need to include this..sx:head debug=true cache=false compressed=false / http://struts.apache.org/2.1.6/docs/datetimepicker.html Rgds, Satya On Sat, Apr 11, 2009 at 11:34 AM, john lee sh_thorn_b...@yahoo.com wrote: is s:datetimepicker struts default tag? if so, why it can not render the display? does it need to load additional .jar to support it? i tried the simple way s:datetimepicker lable=calendar value=2009-01-01 but just display calendar only, nothing display on the right side i tried the complex way, define action class public class DateBean extends ActionSupport { public String execute() throws Exception { setTodayDate(new Date()); return SUCCESS; } private Date todayDate; public Date getTodayDate() {return todayDate;} public void setTodayDate(Date value) {todayDate = value; } } the jsp file is s:datetimepicker name=todayDate label=calendar displayFormat=-MM-dd/ but just display 'calendar', nothing display on the right side either what happen? tks in advance john
Struts 2.1.6 DateTimePicker
Hi All, Does DateTimePicker has any way to disable a particular date or set of dates? I didn't find any parameters in the tag. I was looking at Dojo DatePicker and has parameter isDisabledDate. Don't we have something like that in sx:datetimepicker? For now I have used the DatePicker from the Dojo but was curious to know if there is one available with struts2 itself. Rgds, Satya
Re: Issue with the Browser Cache
Thanks a lot. It is working fine now. Looks like I had couple of issues. 1. I had specified more values to the response headers than required. 2. Use one get in the work flow. Rgds, Satya 2009/3/30 Paweł Wielgus poulw...@gmail.com Hi Satya, You can read my post about this matter, also You can download and run my simple app to see how it works, the link is in the bottom of post. http://poulwiel.blogspot.com/2009/01/browser-back-button-and-caching-problem.html Best greetings, Paweł Wielgus. 2009/3/27 satyanarayana katta saty.pra...@gmail.com: Hi All, We are developing an application with Struts 2.1.6 and tiles 2.0.6. We don't want the browser to cache the pages. I tried all the options and still the browser is caching the pages and when I hit the back button the page gets loaded. Tried Options 1. Wrote an interceptor and added the response header to have pragma no-cache, expires -1, no-store etc. 2. Added response headers directly in jsp Used the http-watch to see if the headers are being set. HttpWatch shows that the headers are infact set. Whatever I do, the back button doesn't expire the page. Am I missing something? Please help. Rgds, Satya - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Issue with the Browser Cache
Hi All, We are developing an application with Struts 2.1.6 and tiles 2.0.6. We don't want the browser to cache the pages. I tried all the options and still the browser is caching the pages and when I hit the back button the page gets loaded. Tried Options 1. Wrote an interceptor and added the response header to have pragma no-cache, expires -1, no-store etc. 2. Added response headers directly in jsp Used the http-watch to see if the headers are being set. HttpWatch shows that the headers are infact set. Whatever I do, the back button doesn't expire the page. Am I missing something? Please help. Rgds, Satya