Re: [ANN] YUI plugin
Good Day, Thanks for the great looking datepicker control. Is it possible to post the source code for the Java classes because I am trying to create my own plugin for some the Open Flash Chart component and would like to do it in a similar way to your YUI plug-in. Thank you in advance. Mark P Ashworth http://www.connext.co.za PS: Do you work for Google? Is that why you are able to host your project at Google Code? Musachy Barroso wrote: I'd like to announce the alpha release of the YUI plugin. Home Page Doc: http://cwiki.apache.org/confluence/display/S2PLUGINS/YUI+Plugin Downloads: http://code.google.com/p/struts2yuiplugin/downloads/list Comments/Complaints/Request/etc :) : http://code.google.com/p/struts2yuiplugin/issues/list There are only two tags on this release head, and datepicker. regards musachy -- Hey you! Would you help me to carry the stone? Pink Floyd -- View this message in context: http://www.nabble.com/-ANN--YUI-plugin-tf3947362.html#a11207642 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: [ANN] YUI plugin
Very nice! Thank you Musachy! Just one question: The label for the date field is empty.. the JSP: ... [EMAIL PROTECTED] prefix=yui uri=/struts-yui-tags% yui:head datepicker=true/ yui:datepicker id=toDate name=toDate value=%{'2006-10-20'} / ... the generated HTML: ... tr td class=tdLabel/td td input type=hidden name=toDate id=toDateInput value=2006-10-20 input name=dojo.toDate id=toDateInputVisible img id=toDateImg style=vertical-align: middle; src=/iopinion_hibernate00/struts/dateIcon.gif br / div id=toDateContainer style=display:none /div ... -- Robi Musachy Barroso wrote: I'd like to announce the alpha release of the YUI plugin. Home Page Doc: http://cwiki.apache.org/confluence/display/S2PLUGINS/YUI+Plugin Downloads: http://code.google.com/p/struts2yuiplugin/downloads/list Comments/Complaints/Request/etc :) : http://code.google.com/p/struts2yuiplugin/issues/list There are only two tags on this release head, and datepicker. regards musachy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Serious memory leak
Chris, Thanks a lot, these changes really did help, now MySQL reports that only one connection is used all over the website. I really do appreciate your help. Regards, MB - Original Message From: Christopher Schultz [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, June 19, 2007 7:10:49 PM Subject: Re: [OT] Serious memory leak Balazs, Balazs Michnay wrote: recently I found out that my memory consumption of my application is nothing compared to the memory consumption of my database server (MySQL). I'm theoretically using connection pool to save resources of my database server, but each time I make a query, I have a brand new connection. Well... are you /theoretically/ or /actually/ using a JDBC connection pool? Why doesn't PID 11 use the connection used by PID 10? There might be some errors in my code, however, it was previously reviewed and said to be correct. Do you trust the reviewer? Looking at the code you posted, I would not trust them any more :( private Statement getConnectionStatement(Connection conn) throws Exception { Context ctx = new InitialContext(); if(ctx == null ) throw new Exception(Boom - No Context); Context envCtx = (Context) ctx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/akr_db); if (ds != null) { conn = ds.getConnection(); if(conn == null) throw new Exception(); } else throw new Exception(); return conn.createStatement(); } Do you pass an active connection to this method? If you do, then you are leaking connections every time you try to create a statement. If you are always passing null, then why do you have the Connection parameter to this method? A proper method with the above signature should be implemented like this: private Statement getConnectionStatement(Connection conn) { return conn.createStatement(); } As you can see, this method is completely worthless. It looks like your method ought to be this instead: private Connection getConnection() { Context ctx = new InitialContext(); if(ctx == null ) throw new Exception(Boom - No Context); Context envCtx = (Context) ctx.lookup(java:comp/env); // Consider checking envCtx against null, here, too // Consider making the JNDI resource name configurable // instead of hard-coding. DataSource ds = (DataSource) envCtx.lookup(jdbc/akr_db); if (ds != null) { conn = ds.getConnection(); if(conn == null) throw new Exception(); } else throw new Exception(); return conn; } The closeConnection method looks fine except for these style comments: 1. Call this method close... it closes much more than the connection. 2. Don't swallow the SQLExceptions. At least log them, but never swallow an exception! 3. Don't bother setting each reference to null. This is a waste of time, and clutters the code. Selected lines from your code: Connection conn = null; try { stmt = getConnectionStatement(conn); // Note that conn is still null here. } catch (Exception e) { System.err.println(e.getMessage()); } finally { closeConnection(conn,stmt,rst); } Conn is still null, so it will never be closed. YOU ARE LEAKING CONNECTIONS. FIX YOUR CODE. It should look like this: Connection conn = null; Statement stmt = null; // Or PreparedStatement if needed ResultSet rst = null; String query = SELECT * FROM MyTable; try { conn = getConnection(); stmt = conn.createStatement(); rst = stmt.executeQuery(query); // YOU SHOULD CHECK THIS FOR false: rst.next(); this.setTartam(rst.getString(tartam)); } catch (Exception e) { System.err.println(e.getMessage()); } finally { closeConnection(conn,stmt,rst); } Note that PreparedStatements are universally better than bare Statements when using parameterized queries (which you are not using, here). These changes should help A LOT. You are probably leaking connections all over the place. I'm curious as to why you aren't getting messages on stderr that your connection pool is empty... -chris Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting
Re: Spring-webflow exception
Well as you said it was an xml config issue. But worked that out, i got an class not found exception in the log. The interface MapAdaptable could not be found. After a little investigation i found that the interface is in the spring-binding-1.0.3.jar. Once included the jar i got your example up and running. Now i will start to explore the webflow tith S2. /Rille Ian Roughley wrote: Let me know how it goes. I've worked with it a little, but had to drop the integration due to time constraints. /Ian Rikard wrote: Thanks Ian for the quick response. Now i can continue explore the spring-webflow plugin! :) Ian Roughley wrote: The source is available from the project site on google code. I haven't seen this error before, but I imagine it is a XML config issue. /Ian Rikard wrote: Hi im trying out the spring-weblow example. But i get this exception: 09:43:42,494 ERROR [[/spaceport].listenerStart] Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.springframework.org/schema/webflow-config] but in the applicationContext.xml i got: beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:aop=http://www.springframework.org/schema/aop; xmlns:flow=http://www.springframework.org/schema/webflow-config; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-1.0.xsd; default-autowire=byName Does any one have any clue? Thanks ! ps.. does anyone have the source code for the web-flow example ? - 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] -- View this message in context: http://www.nabble.com/Spring-webflow-exception-tf3944825.html#a11209248 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
where is the ognl source?
Hi, I have been to www.ognl,org and can only find the source for 2.6.9 where are the struts 2 team getting the new releases from as it seems to be a dead site? Thanks Dave. __ Ufi Limited Registered in England No. 3980770 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP learndirect Solutions Ltd Registered in England No. 5081669 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP UFI Charitable Trust Registered in England No. 3658378 Registered Charity No. 1081028 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP This email has been scanned by the MessageLabs Email Security System. __
Investigating the ValueStack
In order to better understand the ValueStack I wrote the following code to explore it: ValueStack myStack = ActionContext.getContext().getValueStack(); out.println(Stack size + myStack.size() + br/); java.util.Map myMap = myStack.getContext(); for (Object pollo : myMap.keySet()) { Object value = myMap.get(pollo); out.print(li); out.println(pollo.toString() + - ); if (value != null) { out.println(value.toString()); } } The results are much different from what I was expecting to see. First there is no notion of the different level of the satck. Second lots of objects accessible inside the jsp with struts tag and related to action properties are not present. Thanks Filippo -- View this message in context: http://www.nabble.com/Investigating-the-ValueStack-tf3951442.html#a11210514 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2][ANN] Unit Testing Struts 2 Actions wired with Spring using JUnit article
[arenselist] Hopefully this entry serves as some search engine friendly documentation on how one might unit test Struts 2 actions configured using Spring, something I would think many, many people want to do. This used to be done using StrutsTestCase in the Struts 1.x days but Webwork/Struts provides enough flexibility in its architecture to accommodate unit testing fairly easily. More ... http://arsenalist.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with showing ActionMessages
Try messages.add(Globals.MESSAGE_KEY,new ActionMessage(invalid.login)); ie use Globals.MESSAGE_KEY instead of ActionMessages.GLOBAL_MESSAGE -- Yoge, AdventNet, Inc. 925-965-6430 [EMAIL PROTECTED] site24x7.com http://www.site24x7.com/ On 6/20/07, Aleksandar Matijaca [EMAIL PROTECTED] wrote: Hi there, I am having some really stupid issues -- I am using Struts 1.2, and I have an action that does the following: public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionMessages messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage( invalid.login)); saveMessages(request, messages); return mapping.findForward(failure); } The relevant JSP section looks like this: logic:messagesPresent message=true tr td colspan=2font color=redbean:message key=errorTitle //font /td /tr html:messages message=true id=my_messages tr tdnbsp;nbsp;/td tdfont color=redbean:write name=my_messages //font/td /tr /html:messages /logic:messagesPresent All resources keys are available etc... When the Action executes, I get the following: 2007-06-20 00:06:52.051::WARN: Nested in javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean my_messages in any scope: javax.servlet.jsp.JspException: Cannot find bean my_messages in any scope at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:934) at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:225) The error appears to be around the bean:write name=my_messages / tag. If I replace the bean:message tag with just a XX string, the XX appears, and there are no exceptions... So, WHAT GIVES?? I have tried just about everything at this point, and am getting desperate... Thanks, Alex. -- --Yoge 91-9840425388
Re: Query on struts application design
Another alternative, Move all the images/css specific to abc.com to a subdirectory named /abc/... Let all the images related to xyz.com be in another sub-directory /xyx/ Change path of images in your application to /abc or /xyz based on the request.*getRemoteHost*() . -- Yoge, AdventNet, Inc. [EMAIL PROTECTED] On 6/15/07, Rakesh Sharma [EMAIL PROTECTED] wrote: Dear All, I am new to struts so would need your help here. My client has an enterprise application(struts1.0 based) with : 1 WAR (virtual host www.abc.com) 1 EJB module Now, the client want the same application(almost same business rules..i.e same EJB module) but in different look and feel on another domain( www.xyz.com). Can any one suggest me a good way out for this on struts. My take was : - Make one more webmodule in the same application which can be configured for www.xyz.com using virtual host settings. - Copy the JSPs/taglibs/CSS/image etc from the first webapp to second and make the customization on these UI components. - Copy the struts related configuration from the first webapp to second(I donot intend to change any thing is these files, including in the struts config xml.) I am not able to do a test of the above approach as I am at client location and donot have any IDE with me. Do you guys thinks that I would be able to achieve what I want ? Please note that all the 3 modules(2 webapp and 1 EJB) would be deployed on same JVM, so my guess was that there should not be any issue while accessig the struts related classes(such as controller etc..) in webapp2 at runtime. Please help me out here and tell me if my thinking is flawed... Your help would be highly appreciated. Thanks and Regards Rakesh -- --Yoge 91-9840425388
PROBLEM SOLVED - Re: problem with showing ActionMessages
First of all, thank you all for replying. Jeff you are right, invalid.login was put into the WRONG PROPERTIES file. I moved the projects around, and a new Properties file was created, however, the struts-config.xml was not updated with the location of the new properties file, instead, the old one was being used. How did I find this out? I decided to try the latest 1.x struts - the 1.3.8 - and, 1.3.8 does NOT terminate ungracefully like 1.2 - it actually said in the rendered message that I am missing a property.. Once again, thanks to everyone that helped... Cheers, Alex. On 6/20/07, Jeff Amiel [EMAIL PROTECTED] wrote: On 6/19/07, Aleksandar Matijaca [EMAIL PROTECTED] wrote: All resources keys are available etc... The code looks rightare you sure that the key invalid.login is available? I'm pretty sure that the results would be as you see if it was not. Try bean:message key=invalid.login/ somewhere in your jsp. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validation and XHTML
Hello, We have a client using Struts 1.2.9. They are experiencing a problem when trying to use client side validation on a struts page that is using html:xhtml. It's the exact problem described in this bug report: http://issues.apache.org/struts/browse/STR-2482 The above link leads me to believe this problem was fixed in 1.2.8. Any idea why we would still be experiencing the problem using 1.2.9? Regards.
javax.el.ExpressionFactory
Hi. I created an interceptor which extends AbstractInterceptor and implements StrutsStatics. Also I added it in the applicationcontext.xml of the Spring framework. My problem is the following and I don't know where to get the missing class: Jun 20, 2007 2:32:16 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class com.sun.faces.config.GlassFishConfigureListener java.lang.NoClassDefFoundError: javax/el/ExpressionFactory at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3678) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Jun 20, 2007 2:32:16 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) Jun 20, 2007 2:32:18 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Thank you. -- View this message in context: http://www.nabble.com/javax.el.ExpressionFactory-tf3951985.html#a11212054 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] FreeMarker template and custom tag
Good Day, I have a custom tag that I am developing and I am trying to figure out where the parameter.id values come from. For example, lt;#if parameters.align?existsgt; align=${parameters.align?html} lt;/#ifgt; This is used in the graph.ftl that is in template.simple. My tag has those parameters and my tld has those parameters. What do I need to do to get it to work? Regards, Mark P Ashworth http://www.connext.co.za -- View this message in context: http://www.nabble.com/-S2--FreeMarker-template-and-custom-tag-tf3952011.html#a11212172 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Ajax form submission doesn't work after the DIV is updated
I am developing a web page which contains two layouts (left right). On the left side, there are some buttons. And the right side, it is a DIV which use s:div/ to create. It will invoke the JavaScript to send a request to one specific S2 action and updates the div with the return page when click the button. The updated page on the right side is always a form containing some fields. I want to send the form with AJAX without refresh the whole page. The JavaScript is using the dojo.io.bind() to send an asynchronous request to S2 action to obtain the web page. Then use the callback to update the DIV. It works fine with the JavaScript to update the DIV. My problem is the AJAX of the form in the updated page doesn’t work. When I click the submit button, it works like the normal form and refresh the whole page. The code of the form is something like the following: struts:head theme=ajax/ …… struts:form method=post id=testForm action=update theme=ajax TABLE tr tdstruts:textfield name=descBean.name//td /tr tr tdstruts:textfield name=descBean.address//td /tr tr td struts:submit value=Save align=left targets=updateDiv/ /td /tr /table /struts:form And the JavaScript is the following: function Connector(updateTargetArray){ // the ids of the target div this.targetsArray = updateTargetArray; } Connector.prototype.send = function(location){ dojo.io.bind({ url: location, handle: dojo.lang.hitch(this, this.bindHandler), mimetype: text/html }); } Connector.prototype.bindHandler = function(type, data, e) { if(type == load) { this.setContent(data); } } Connector.prototype.setContent = function(text){ if(this.targetsArray) { if (this.targetsArray instanceof Array){ for( var i=0; ithis.targetsArray.length; i++){ var node = dojo.byId(this.targetsArray[i]); node.innerHTML = text; } } else { var node = dojo.byId(this.targetsArray); node.innerHTML = text; } } The onClick event of the button will invoke the Connector.send(location) to send the request. The form code works fine in an individual page. I am not quite sure which part is wrong. Does anyone can help me? Thank you so much!~~~ -- View this message in context: http://www.nabble.com/Ajax-form-submission-doesn%27t-work-after-the-DIV-is-updated-tf3952031.html#a11212235 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: [OT] Serious memory leak
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Balazs, Balazs Michnay wrote: Thanks a lot, these changes really did help, now MySQL reports that only one connection is used all over the website. I really do appreciate your help. No problem. Another good tip is to set your connection pool size to 1 when working in development (and maybe even test). This will allow your connection pool to be exhausted any time there is a potential for deadlock (from the cp, that is). Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGeR2o9CaO5/Lv0PARAspgAJ4yMYS06yOQ5CLE29ezyf1D5oaLhQCfWXuu GHdfh1DPw+q/1WXEByma8L4= =8bHg -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax form submission doesn't work after the DIV is updated
Does your s:div.../ have executeScripts=true? d. --- FanCo [EMAIL PROTECTED] wrote: I am developing a web page which contains two layouts (left right). On the left side, there are some buttons. And the right side, it is a DIV which use s:div/ to create. It will invoke the JavaScript to send a request to one specific S2 action and updates the div with the return page when click the button. The updated page on the right side is always a form containing some fields. I want to send the form with AJAX without refresh the whole page. The JavaScript is using the dojo.io.bind() to send an asynchronous request to S2 action to obtain the web page. Then use the callback to update the DIV. It works fine with the JavaScript to update the DIV. My problem is the AJAX of the form in the updated page doesnât work. When I click the submit button, it works like the normal form and refresh the whole page. The code of the form is something like the following: struts:head theme=ajax/ â¦â¦ struts:form method=post id=testForm action=update theme=ajax TABLE tr tdstruts:textfield name=descBean.name//td /tr tr tdstruts:textfield name=descBean.address//td /tr tr td struts:submit value=Save align=left targets=updateDiv/ /td /tr /table /struts:form And the JavaScript is the following: function Connector(updateTargetArray){ // the ids of the target div this.targetsArray = updateTargetArray; } Connector.prototype.send = function(location){ dojo.io.bind({ url: location, handle: dojo.lang.hitch(this, this.bindHandler), mimetype: text/html }); } Connector.prototype.bindHandler = function(type, data, e) { if(type == load) { this.setContent(data); } } Connector.prototype.setContent = function(text){ if(this.targetsArray) { if (this.targetsArray instanceof Array){ for( var i=0; ithis.targetsArray.length; i++){ var node = dojo.byId(this.targetsArray[i]); node.innerHTML = text; } } else { var node = dojo.byId(this.targetsArray); node.innerHTML = text; } } The onClick event of the button will invoke the Connector.send(location) to send the request. The form code works fine in an individual page. I am not quite sure which part is wrong. Does anyone can help me? Thank you so much!~~~ -- View this message in context: http://www.nabble.com/Ajax-form-submission-doesn%27t-work-after-the-DIV-is-updated-tf3952031.html#a11212235 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: where is the ognl source?
On 6/20/07, David Harland [EMAIL PROTECTED] wrote: Hi, I have been to www.ognl,org and can only find the source for 2.6.9 where are the struts 2 team getting the new releases from as it seems to be a dead site? http://www.opensymphony.com/ognl/ Niall Thanks Dave. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 limitations with DOJO
I'm not really sure about limitations, if you have specific questions, I could help. Just one word of advise, stay away from the datetimepicker tag until 2.1. regards musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: Hi, Can someone let us know the limitations of using DOJO library with S2 provided AJAX features. What exactly these limitations are? Any references or articles would be advantageous. Thanks, Lalitha Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: [ANN] YUI plugin
You need to set the label with the label attribute, just like the other Struts tags. regards musachy On 6/20/07, Roberto Nunnari [EMAIL PROTECTED] wrote: Very nice! Thank you Musachy! Just one question: The label for the date field is empty.. the JSP: ... [EMAIL PROTECTED] prefix=yui uri=/struts-yui-tags% yui:head datepicker=true/ yui:datepicker id=toDate name=toDate value=%{'2006-10-20'} / ... the generated HTML: ... tr td class=tdLabel/td td input type=hidden name=toDate id=toDateInput value=2006-10-20 input name=dojo.toDate id=toDateInputVisible img id=toDateImg style=vertical-align: middle; src=/iopinion_hibernate00/struts/dateIcon.gif br / div id=toDateContainer style=display:none /div ... -- Robi Musachy Barroso wrote: I'd like to announce the alpha release of the YUI plugin. Home Page Doc: http://cwiki.apache.org/confluence/display/S2PLUGINS/YUI+Plugin Downloads: http://code.google.com/p/struts2yuiplugin/downloads/list Comments/Complaints/Request/etc :) : http://code.google.com/p/struts2yuiplugin/issues/list There are only two tags on this release head, and datepicker. regards musachy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: Validation and XHTML
On 6/20/07, lextest [EMAIL PROTECTED] wrote: Hello, We have a client using Struts 1.2.9. They are experiencing a problem when trying to use client side validation on a struts page that is using html:xhtml. It's the exact problem described in this bug report: http://issues.apache.org/struts/browse/STR-2482 The above link leads me to believe this problem was fixed in 1.2.8. Any idea why we would still be experiencing the problem using 1.2.9? Saying your client is experiencing the same problem doesn't really tell us alot. If they are running Struts 1.2.9 then they should see different markup being rendered for the form (i.e. it should be rendered with an id attribute rather than name) - is that the case? If not it would suggest they are not running Struts 1.2.9. If they do see that then as well as the fixes to Struts - there were also related changes in Commons Validator - I believe in Validator 1.2.0 (but I would recommend the latest Validator 1.3.1 which is compatible with Struts 1.2.9) - so they also need to make sure they have upgraded to that version of validator. Niall Regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] YUI plugin
Hi Mark, The code is proprietary, so I can't give it away. Just kidding, go here: http://code.google.com/p/struts2yuiplugin/ and click on the source tab, the license is Apache 2 ;) //anyone can host a project at googlecode : http://code.google.com/hosting/ regards musachy On 6/20/07, Mark P Ashworth [EMAIL PROTECTED] wrote: Good Day, Thanks for the great looking datepicker control. Is it possible to post the source code for the Java classes because I am trying to create my own plugin for some the Open Flash Chart component and would like to do it in a similar way to your YUI plug-in. Thank you in advance. Mark P Ashworth http://www.connext.co.za PS: Do you work for Google? Is that why you are able to host your project at Google Code? Musachy Barroso wrote: I'd like to announce the alpha release of the YUI plugin. Home Page Doc: http://cwiki.apache.org/confluence/display/S2PLUGINS/YUI+Plugin Downloads: http://code.google.com/p/struts2yuiplugin/downloads/list Comments/Complaints/Request/etc :) : http://code.google.com/p/struts2yuiplugin/issues/list There are only two tags on this release head, and datepicker. regards musachy -- Hey you! Would you help me to carry the stone? Pink Floyd -- View this message in context: http://www.nabble.com/-ANN--YUI-plugin-tf3947362.html#a11207642 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: Spring Action Instantiation
I'm using the spring id only. On 6/19/07, Adam Ruggles [EMAIL PROTECTED] wrote: Are you specifying the entire class name in the action mapping definition instead of using the spring bean id? [EMAIL PROTECTED] wrote: It appears as though I am not getting a new Action instance created for each request! I have placed a logging statement in the constructor of my Action class and it is not emitting output. The Bean inside the Action *is* emitting log statements from its constructor so I must have the Spring beans wired correctly. I am injecting both the Actions and Action Beans via Spring. I have scope=prototype on them both. Any ideas? Thanks, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED]
Re: Spring Action Instantiation
I'm using Spring 2.x and the attribute scope=prototype On 6/19/07, Zarar Siddiqi [EMAIL PROTECTED] wrote: It sounds to me like your Action class might be configured as a singleton. If that's the case the action class' constructor would only be called once on startup. Make sure you have singleton=false in your Spring config for the action class. The default value for singleton is true. stanlick wrote: It appears as though I am not getting a new Action instance created for each request! I have placed a logging statement in the constructor of my Action class and it is not emitting output. The Bean inside the Action *is* emitting log statements from its constructor so I must have the Spring beans wired correctly. I am injecting both the Actions and Action Beans via Spring. I have scope=prototype on them both. Any ideas? Thanks, Scott -- View this message in context: http://www.nabble.com/Spring-Action-Instantiation-tf3948840.html#a11205652 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED]
Re: Spring Action Instantiation
I replaced the spring bean id in my action mapping with the fully qualified class name to rule Spring out completely. I am still never seeing the log4j output in the constructor of my action class! I have double checked my log4j.properties and the debug output would be written out if the constructor were called. Any ideas? Could this have anything to do with an interceptor? On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm using Spring 2.x and the attribute scope=prototype On 6/19/07, Zarar Siddiqi [EMAIL PROTECTED] wrote: It sounds to me like your Action class might be configured as a singleton. If that's the case the action class' constructor would only be called once on startup. Make sure you have singleton=false in your Spring config for the action class. The default value for singleton is true. stanlick wrote: It appears as though I am not getting a new Action instance created for each request! I have placed a logging statement in the constructor of my Action class and it is not emitting output. The Bean inside the Action *is* emitting log statements from its constructor so I must have the Spring beans wired correctly. I am injecting both the Actions and Action Beans via Spring. I have scope=prototype on them both. Any ideas? Thanks, Scott -- View this message in context: http://www.nabble.com/Spring-Action-Instantiation-tf3948840.html#a11205652 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED]
RE: Validation and XHTML
Yes - They are seeing id instead of name in the generated form tag. You are correct about the commons jar. They had an old version of that. I just tested with 1.3.1 and it works fine. Thanks for your help and the speedy reply. Regards -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 20, 2007 9:13 AM To: Struts Users Mailing List Subject: Re: Validation and XHTML On 6/20/07, lextest [EMAIL PROTECTED] wrote: Hello, We have a client using Struts 1.2.9. They are experiencing a problem when trying to use client side validation on a struts page that is using html:xhtml. It's the exact problem described in this bug report: http://issues.apache.org/struts/browse/STR-2482 The above link leads me to believe this problem was fixed in 1.2.8. Any idea why we would still be experiencing the problem using 1.2.9? Saying your client is experiencing the same problem doesn't really tell us alot. If they are running Struts 1.2.9 then they should see different markup being rendered for the form (i.e. it should be rendered with an id attribute rather than name) - is that the case? If not it would suggest they are not running Struts 1.2.9. If they do see that then as well as the fixes to Struts - there were also related changes in Commons Validator - I believe in Validator 1.2.0 (but I would recommend the latest Validator 1.3.1 which is compatible with Struts 1.2.9) - so they also need to make sure they have upgraded to that version of validator. Niall Regards. - 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: Spring Action Instantiation
Oooop! The struts.xml change did not force the context to reload! Now that I have changed the class in the action mapping to the fully qualified class name, it *is* being instantiated on each request! So why is it not working with the Spring bean id? On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I replaced the spring bean id in my action mapping with the fully qualified class name to rule Spring out completely. I am still never seeing the log4j output in the constructor of my action class! I have double checked my log4j.properties and the debug output would be written out if the constructor were called. Any ideas? Could this have anything to do with an interceptor? On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm using Spring 2.x and the attribute scope=prototype On 6/19/07, Zarar Siddiqi [EMAIL PROTECTED] wrote: It sounds to me like your Action class might be configured as a singleton. If that's the case the action class' constructor would only be called once on startup. Make sure you have singleton=false in your Spring config for the action class. The default value for singleton is true. stanlick wrote: It appears as though I am not getting a new Action instance created for each request! I have placed a logging statement in the constructor of my Action class and it is not emitting output. The Bean inside the Action *is* emitting log statements from its constructor so I must have the Spring beans wired correctly. I am injecting both the Actions and Action Beans via Spring. I have scope=prototype on them both. Any ideas? Thanks, Scott -- View this message in context: http://www.nabble.com/Spring-Action-Instantiation-tf3948840.html#a11205652 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED]
nested s:iterator
How would one iterate a bean's collectionhashmap row values by key of bean's collectionstring columnName? Here's what I have on the jsp: s:iterator id=row value=bean.tableColumnData status=rowStatus s:iterator id=columnName value=bean.tableColumns status=status s:property value=row.columnName/ s:property value=#row.columnName/ /s:iterator /s:iterator Neither s:property shows any values. Can anyone throw me a bone here? James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Spring Action Instantiation
Assuming Spring is your AOP framework Logging is now an Advised entity to be injected at compile time or runtime via 'pointcut' details on implementation are located here http://www.devx.com/Java/Article/30799/0/page/1 to quote 'Because this FactoryBean concept is how Spring wraps beans and then creates a proxy for the bean (using some internal tool such as dynamic proxies, CGLIB, etc.) that executes some advice on method calls when the pointcut says the method is a joinpoint (assuming a pointcut is defined). ' M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, June 20, 2007 9:45 AM Subject: Re: Spring Action Instantiation I replaced the spring bean id in my action mapping with the fully qualified class name to rule Spring out completely. I am still never seeing the log4j output in the constructor of my action class! I have double checked my log4j.properties and the debug output would be written out if the constructor were called. Any ideas? Could this have anything to do with an interceptor? On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm using Spring 2.x and the attribute scope=prototype On 6/19/07, Zarar Siddiqi [EMAIL PROTECTED] wrote: It sounds to me like your Action class might be configured as a singleton. If that's the case the action class' constructor would only be called once on startup. Make sure you have singleton=false in your Spring config for the action class. The default value for singleton is true. stanlick wrote: It appears as though I am not getting a new Action instance created for each request! I have placed a logging statement in the constructor of my Action class and it is not emitting output. The Bean inside the Action *is* emitting log statements from its constructor so I must have the Spring beans wired correctly. I am injecting both the Actions and Action Beans via Spring. I have scope=prototype on them both. Any ideas? Thanks, Scott -- View this message in context: http://www.nabble.com/Spring-Action-Instantiation-tf3948840.html#a11205652 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Spring Action Instantiation
?! --- Martin Gainty [EMAIL PROTECTED] wrote: Assuming Spring is your AOP framework Logging is now an Advised entity to be injected at compile time or runtime via 'pointcut' details on implementation are located here http://www.devx.com/Java/Article/30799/0/page/1 to quote 'Because this FactoryBean concept is how Spring wraps beans and then creates a proxy for the bean (using some internal tool such as dynamic proxies, CGLIB, etc.) that executes some advice on method calls when the pointcut says the method is a joinpoint (assuming a pointcut is defined). ' M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, June 20, 2007 9:45 AM Subject: Re: Spring Action Instantiation I replaced the spring bean id in my action mapping with the fully qualified class name to rule Spring out completely. I am still never seeing the log4j output in the constructor of my action class! I have double checked my log4j.properties and the debug output would be written out if the constructor were called. Any ideas? Could this have anything to do with an interceptor? On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm using Spring 2.x and the attribute scope=prototype On 6/19/07, Zarar Siddiqi [EMAIL PROTECTED] wrote: It sounds to me like your Action class might be configured as a singleton. If that's the case the action class' constructor would only be called once on startup. Make sure you have singleton=false in your Spring config for the action class. The default value for singleton is true. stanlick wrote: It appears as though I am not getting a new Action instance created for each request! I have placed a logging statement in the constructor of my Action class and it is not emitting output. The Bean inside the Action *is* emitting log statements from its constructor so I must have the Spring beans wired correctly. I am injecting both the Actions and Action Beans via Spring. I have scope=prototype on them both. Any ideas? Thanks, Scott -- View this message in context: http://www.nabble.com/Spring-Action-Instantiation-tf3948840.html#a11205652 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. http://tv.yahoo.com/collections/222 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: nested s:iterator
Quick follow up to correct myself. This works: s:property value=#row[(#columnName)]/ I referenced the following documentation http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/expressionEva luation.html James -Original Message- From: Hartrich, James CTR USTRANSCOM J6 [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 20, 2007 9:17 AM To: Struts Users Mailing List Subject: nested s:iterator How would one iterate a bean's collectionhashmap row values by key of bean's collectionstring columnName? Here's what I have on the jsp: s:iterator id=row value=bean.tableColumnData status=rowStatus s:iterator id=columnName value=bean.tableColumns status=status s:property value=row.columnName/ s:property value=#row.columnName/ /s:iterator /s:iterator Neither s:property shows any values. Can anyone throw me a bone here? James - 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: nested s:iterator
--- Hartrich, James CTR USTRANSCOM J6 wrote: s:property value=#row.columnName/ I'd probably try something like #row[#columnName] (or maybe #row[(#columnName)] to force OGNL to eval again); I'm doing something similar but I don't have the example in front of me at the moment. d. Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax form submission doesn't work after the DIV is updated
I didn't set the executeScripts attribute for the DIV. So the default value should be false. What is the function of this attribute if it is true? newton.dave wrote: Does your s:div.../ have executeScripts=true? d. --- FanCo [EMAIL PROTECTED] wrote: I am developing a web page which contains two layouts (left right). On the left side, there are some buttons. And the right side, it is a DIV which use s:div/ to create. It will invoke the JavaScript to send a request to one specific S2 action and updates the div with the return page when click the button. The updated page on the right side is always a form containing some fields. I want to send the form with AJAX without refresh the whole page. The JavaScript is using the dojo.io.bind() to send an asynchronous request to S2 action to obtain the web page. Then use the callback to update the DIV. It works fine with the JavaScript to update the DIV. My problem is the AJAX of the form in the updated page doesnât work. When I click the submit button, it works like the normal form and refresh the whole page. The code of the form is something like the following: struts:head theme=ajax/ â¦â¦ struts:form method=post id=testForm action=update theme=ajax TABLE tr tdstruts:textfield name=descBean.name//td /tr tr tdstruts:textfield name=descBean.address//td /tr tr td struts:submit value=Save align=left targets=updateDiv/ /td /tr /table /struts:form And the JavaScript is the following: function Connector(updateTargetArray){ // the ids of the target div this.targetsArray = updateTargetArray; } Connector.prototype.send = function(location){ dojo.io.bind({ url: location, handle: dojo.lang.hitch(this, this.bindHandler), mimetype: text/html }); } Connector.prototype.bindHandler = function(type, data, e) { if(type == load) { this.setContent(data); } } Connector.prototype.setContent = function(text){ if(this.targetsArray) { if (this.targetsArray instanceof Array){ for( var i=0; ithis.targetsArray.length; i++){ var node = dojo.byId(this.targetsArray[i]); node.innerHTML = text; } } else { var node = dojo.byId(this.targetsArray); node.innerHTML = text; } } The onClick event of the button will invoke the Connector.send(location) to send the request. The form code works fine in an individual page. I am not quite sure which part is wrong. Does anyone can help me? Thank you so much!~~~ -- View this message in context: http://www.nabble.com/Ajax-form-submission-doesn%27t-work-after-the-DIV-is-updated-tf3952031.html#a11212235 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Ajax-form-submission-doesn%27t-work-after-the-DIV-is-updated-tf3952031.html#a11214704 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: nested s:iterator
--- Hartrich, James CTR USTRANSCOM J6 wrote: Quick follow up to correct myself. This works: s:property value=#row[(#columnName)]/ Yeah, that ;) d. Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] App generate lot (2GB) of garbage!
I discussed the problem with the freemarker team and I used a suggestion that PARTIALLY resolved. They said : = You can use the code below to enable the model cache, assuming myConfiguration is the reference to your Configuration object: ((BeansWrapper)myConfiguration.getObjectWrapper()).setUseCache(true) and see if it helps you with your GC load levels. = This actually seems to happen. In struts how can this be done ? I used : freemarker.template.Configuration fmc = (freemarker.template.Configuration) ServletActionContext.getServletContext().getAttribute (FreemarkerManager.CONFIG_SERVLET_CONTEXT_KEY); if (fmc != null) { ((freemarker.ext.beans.BeansWrapper)fmc.getObjectWrapper ()).setUseCache(true); } but I think there must be a configuration somewhere (struts.properties?). To completely solve my problem I really need to understand the following : How struts uses freemarker ? If i have a jsp page that contains html, jsp tags, struts tags and jsp EL expression, where freemarker is used ? I suppose that it's used ONLY on struts tags... So if my page is composed primarly of jsp EL and jsp tags and a few struts tags can I focus on struts tags only to try to understand why the app is producing garbage ? Thank you Il giorno 19/giu/07, alle ore 12:58, Ing. Andrea Vettori ha scritto: Il giorno 19/giu/07, alle ore 12:07, Antonio Petrelli ha scritto: 2007/6/19, Ing. Andrea Vettori [EMAIL PROTECTED]: Moreover I'm not using freemaker in my project! It's struts that's using it. My page are all jsps !! This is pretty strange... Is FreeMarker servlet declared in your web.xml? No it's not. I think that freemarker classes are used by struts internally for the themes... I use the simple theme. I really can't understand what's producing near 2GB of garbage every 10 seconds! -- Ing. Andrea Vettori Consulente per l'Information Technology - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ing. Andrea Vettori Consulente per l'Information Technology - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Spring Action Instantiation
Spring is my IOC container. So are you suggesting Spring is *not* instantiating action classes on each request? I am confused that it would be creating the beans used by the actions on each invocation but not the action itself. Also, I am not sure how Spring could advise which methods to call on a dirty action class without *some* advice from me! On 6/20/07, Martin Gainty [EMAIL PROTECTED] wrote: Assuming Spring is your AOP framework Logging is now an Advised entity to be injected at compile time or runtime via 'pointcut' details on implementation are located here http://www.devx.com/Java/Article/30799/0/page/1 to quote 'Because this FactoryBean concept is how Spring wraps beans and then creates a proxy for the bean (using some internal tool such as dynamic proxies, CGLIB, etc.) that executes some advice on method calls when the pointcut says the method is a joinpoint (assuming a pointcut is defined). ' M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, June 20, 2007 9:45 AM Subject: Re: Spring Action Instantiation I replaced the spring bean id in my action mapping with the fully qualified class name to rule Spring out completely. I am still never seeing the log4j output in the constructor of my action class! I have double checked my log4j.properties and the debug output would be written out if the constructor were called. Any ideas? Could this have anything to do with an interceptor? On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm using Spring 2.x and the attribute scope=prototype On 6/19/07, Zarar Siddiqi [EMAIL PROTECTED] wrote: It sounds to me like your Action class might be configured as a singleton. If that's the case the action class' constructor would only be called once on startup. Make sure you have singleton=false in your Spring config for the action class. The default value for singleton is true. stanlick wrote: It appears as though I am not getting a new Action instance created for each request! I have placed a logging statement in the constructor of my Action class and it is not emitting output. The Bean inside the Action *is* emitting log statements from its constructor so I must have the Spring beans wired correctly. I am injecting both the Actions and Action Beans via Spring. I have scope=prototype on them both. Any ideas? Thanks, Scott -- View this message in context: http://www.nabble.com/Spring-Action-Instantiation-tf3948840.html#a11205652 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED]
Re: Ajax form submission doesn't work after the DIV is updated
Scripts in the html returned will be executed (script.../script) http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html#AjaxandJavaScriptRecipes-ExecuteJavaScriptinthereturnedcontent musachy On 6/20/07, FanCo [EMAIL PROTECTED] wrote: I didn't set the executeScripts attribute for the DIV. So the default value should be false. What is the function of this attribute if it is true? newton.dave wrote: Does your s:div.../ have executeScripts=true? d. --- FanCo [EMAIL PROTECTED] wrote: I am developing a web page which contains two layouts (left right). On the left side, there are some buttons. And the right side, it is a DIV which use s:div/ to create. It will invoke the JavaScript to send a request to one specific S2 action and updates the div with the return page when click the button. The updated page on the right side is always a form containing some fields. I want to send the form with AJAX without refresh the whole page. The JavaScript is using the dojo.io.bind() to send an asynchronous request to S2 action to obtain the web page. Then use the callback to update the DIV. It works fine with the JavaScript to update the DIV. My problem is the AJAX of the form in the updated page doesn’t work. When I click the submit button, it works like the normal form and refresh the whole page. The code of the form is something like the following: struts:head theme=ajax/ …… struts:form method=post id=testForm action=update theme=ajax TABLE tr tdstruts:textfield name=descBean.name//td /tr tr tdstruts:textfield name=descBean.address//td /tr tr td struts:submit value=Save align=left targets=updateDiv/ /td /tr /table /struts:form And the JavaScript is the following: function Connector(updateTargetArray){ // the ids of the target div this.targetsArray = updateTargetArray; } Connector.prototype.send = function(location){ dojo.io.bind({ url: location, handle: dojo.lang.hitch(this, this.bindHandler), mimetype: text/html }); } Connector.prototype.bindHandler = function(type, data, e) { if(type == load) { this.setContent(data); } } Connector.prototype.setContent = function(text){ if(this.targetsArray) { if (this.targetsArray instanceof Array){ for( var i=0; ithis.targetsArray.length; i++){ var node = dojo.byId(this.targetsArray [i]); node.innerHTML = text; } } else { var node = dojo.byId(this.targetsArray); node.innerHTML = text; } } The onClick event of the button will invoke the Connector.send(location) to send the request. The form code works fine in an individual page. I am not quite sure which part is wrong. Does anyone can help me? Thank you so much!~~~ -- View this message in context: http://www.nabble.com/Ajax-form-submission-doesn%27t-work-after-the-DIV-is-updated-tf3952031.html#a11212235 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Ajax-form-submission-doesn%27t-work-after-the-DIV-is-updated-tf3952031.html#a11214704 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: Spring Action Instantiation
On 20/06/07, Dave Newton [EMAIL PROTECTED] wrote: ?! I didn't understand a word of that either :-) --- Martin Gainty [EMAIL PROTECTED] wrote: Assuming Spring is your AOP framework Logging is now an Advised entity to be injected at compile time or runtime via 'pointcut' details on implementation are located here http://www.devx.com/Java/Article/30799/0/page/1 to quote 'Because this FactoryBean concept is how Spring wraps beans and then creates a proxy for the bean (using some internal tool such as dynamic proxies, CGLIB, etc.) that executes some advice on method calls when the pointcut says the method is a joinpoint (assuming a pointcut is defined). ' M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, June 20, 2007 9:45 AM Subject: Re: Spring Action Instantiation I replaced the spring bean id in my action mapping with the fully qualified class name to rule Spring out completely. I am still never seeing the log4j output in the constructor of my action class! I have double checked my log4j.properties and the debug output would be written out if the constructor were called. Any ideas? Could this have anything to do with an interceptor? On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm using Spring 2.x and the attribute scope=prototype On 6/19/07, Zarar Siddiqi [EMAIL PROTECTED] wrote: It sounds to me like your Action class might be configured as a singleton. If that's the case the action class' constructor would only be called once on startup. Make sure you have singleton=false in your Spring config for the action class. The default value for singleton is true. stanlick wrote: It appears as though I am not getting a new Action instance created for each request! I have placed a logging statement in the constructor of my Action class and it is not emitting output. The Bean inside the Action *is* emitting log statements from its constructor so I must have the Spring beans wired correctly. I am injecting both the Actions and Action Beans via Spring. I have scope=prototype on them both. Any ideas? Thanks, Scott -- View this message in context: http://www.nabble.com/Spring-Action-Instantiation-tf3948840.html#a11205652 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. http://tv.yahoo.com/collections/222 - 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: Spring Action Instantiation
That should be it, and scope=prototype has always done the trick for me, why don't you post relevant parts of the spring conf file? regards musachy On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Oooop! The struts.xml change did not force the context to reload! Now that I have changed the class in the action mapping to the fully qualified class name, it *is* being instantiated on each request! So why is it not working with the Spring bean id? On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I replaced the spring bean id in my action mapping with the fully qualified class name to rule Spring out completely. I am still never seeing the log4j output in the constructor of my action class! I have double checked my log4j.properties and the debug output would be written out if the constructor were called. Any ideas? Could this have anything to do with an interceptor? On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm using Spring 2.x and the attribute scope=prototype On 6/19/07, Zarar Siddiqi [EMAIL PROTECTED] wrote: It sounds to me like your Action class might be configured as a singleton. If that's the case the action class' constructor would only be called once on startup. Make sure you have singleton=false in your Spring config for the action class. The default value for singleton is true. stanlick wrote: It appears as though I am not getting a new Action instance created for each request! I have placed a logging statement in the constructor of my Action class and it is not emitting output. The Bean inside the Action *is* emitting log statements from its constructor so I must have the Spring beans wired correctly. I am injecting both the Actions and Action Beans via Spring. I have scope=prototype on them both. Any ideas? Thanks, Scott -- View this message in context: http://www.nabble.com/Spring-Action-Instantiation-tf3948840.html#a11205652 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: Spring Action Instantiation
!-- Actions -- bean id=pufAction class=actions.PayrollUpdateAction scope=prototype property name=payrollUpdate ref=anUpdate/ /bean !-- Add actions here -- action name=PayrollUpdate_* method={1} class=pufAction result name=inputPayrollUpdate/result result name=listPayrollUpdate_list/result result name=addPayrollUpdate/result result name=showPayrollUpdate/result result name=editPayrollUpdate/result result name=destroyPayrollUpdate/result result name=notes type=chainPayrollUpdateNotes_list/result /action On 6/20/07, Musachy Barroso [EMAIL PROTECTED] wrote: That should be it, and scope=prototype has always done the trick for me, why don't you post relevant parts of the spring conf file? regards musachy On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Oooop! The struts.xml change did not force the context to reload! Now that I have changed the class in the action mapping to the fully qualified class name, it *is* being instantiated on each request! So why is it not working with the Spring bean id? On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I replaced the spring bean id in my action mapping with the fully qualified class name to rule Spring out completely. I am still never seeing the log4j output in the constructor of my action class! I have double checked my log4j.properties and the debug output would be written out if the constructor were called. Any ideas? Could this have anything to do with an interceptor? On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm using Spring 2.x and the attribute scope=prototype On 6/19/07, Zarar Siddiqi [EMAIL PROTECTED] wrote: It sounds to me like your Action class might be configured as a singleton. If that's the case the action class' constructor would only be called once on startup. Make sure you have singleton=false in your Spring config for the action class. The default value for singleton is true. stanlick wrote: It appears as though I am not getting a new Action instance created for each request! I have placed a logging statement in the constructor of my Action class and it is not emitting output. The Bean inside the Action *is* emitting log statements from its constructor so I must have the Spring beans wired correctly. I am injecting both the Actions and Action Beans via Spring. I have scope=prototype on them both. Any ideas? Thanks, Scott -- View this message in context: http://www.nabble.com/Spring-Action-Instantiation-tf3948840.html#a11205652 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd -- Scott [EMAIL PROTECTED]
properties at times not found
Hello. I have an action with a getter for a List. In the execute method of the action I can verify the list is not empty. But in the jsp view, at times it reports an empty list. the action: public class StorySearch extends ActionSupport { private ListStory stories = null; ... public String execute() throws Exception { ... stories = dataManager.searchStories(...); for (Story story : stories) { System.out.println( +story.getId()); } return SUCCESS; } public List getStories() { return stories; } the JSP: c:url var=storyURL value=/StoryView.action/ display:table name=${stories} requestURI=storySearch.action display:column property=id href=${storyURL} paramId=id/ display:column property=title/ display:column property=text/ display:column property=link autolink=true/ display:column property=accessCount sortable=true/ display:column property=creationDate sortable=true/ display:captionThis is the table caption/display:caption /display:table Any hints? Thank you. -- Robi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: properties at times not found
If you are trying to load your list by using a parameter passed in.. say and Id from a link or another page, you might need to use the paramsPrepareParamsStack interceptor and implement Preparable in you action. I ran into a similar problem the other day. You would need to put your code to populate the list in the Prepare() method. http://struts.apache.org/2.x/docs/crud-demo-i.html check out the The prepare approach in the above link. I hope this helps. -Scott -Original Message- From: Roberto Nunnari [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 20, 2007 12:16 PM To: Struts Users Mailing List Subject: properties at times not found Hello. I have an action with a getter for a List. In the execute method of the action I can verify the list is not empty. But in the jsp view, at times it reports an empty list. the action: public class StorySearch extends ActionSupport { private ListStory stories = null; ... public String execute() throws Exception { ... stories = dataManager.searchStories(...); for (Story story : stories) { System.out.println( +story.getId()); } return SUCCESS; } public List getStories() { return stories; } the JSP: c:url var=storyURL value=/StoryView.action/ display:table name=${stories} requestURI=storySearch.action display:column property=id href=${storyURL} paramId=id/ display:column property=title/ display:column property=text/ display:column property=link autolink=true/ display:column property=accessCount sortable=true/ display:column property=creationDate sortable=true/ display:captionThis is the table caption/display:caption /display:table Any hints? Thank you. -- Robi - 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: properties at times not found
Hello Scott. ..but.. the list is a property of the action, and it's populated in the execute method.. the JSP, should be rendered after the execute method has returned, and so at that time it should be safe to get the stories from the action, as by now it should be set and ready. Do I miss anyhing? -- Robi. Scott Trafton wrote: If you are trying to load your list by using a parameter passed in.. say and Id from a link or another page, you might need to use the paramsPrepareParamsStack interceptor and implement Preparable in you action. I ran into a similar problem the other day. You would need to put your code to populate the list in the Prepare() method. http://struts.apache.org/2.x/docs/crud-demo-i.html check out the The prepare approach in the above link. I hope this helps. -Scott -Original Message- From: Roberto Nunnari [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 20, 2007 12:16 PM To: Struts Users Mailing List Subject: properties at times not found Hello. I have an action with a getter for a List. In the execute method of the action I can verify the list is not empty. But in the jsp view, at times it reports an empty list. the action: public class StorySearch extends ActionSupport { private ListStory stories = null; ... public String execute() throws Exception { ... stories = dataManager.searchStories(...); for (Story story : stories) { System.out.println( +story.getId()); } return SUCCESS; } public List getStories() { return stories; } the JSP: c:url var=storyURL value=/StoryView.action/ display:table name=${stories} requestURI=storySearch.action display:column property=id href=${storyURL} paramId=id/ display:column property=title/ display:column property=text/ display:column property=link autolink=true/ display:column property=accessCount sortable=true/ display:column property=creationDate sortable=true/ display:captionThis is the table caption/display:caption /display:table Any hints? Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javax.el.ExpressionFactory
This is most probably not related to Struts. I can't claim to know the intrinsics of your setup but it looks like you're missing some jars need for JSF. It might be that you're running an older version of the J2EE stack. javax.el.ExpressionFactory comes with J2EE 5, and is part of JSF 1.2 GEDA wrote: Hi. I created an interceptor which extends AbstractInterceptor and implements StrutsStatics. Also I added it in the applicationcontext.xml of the Spring framework. My problem is the following and I don't know where to get the missing class: Jun 20, 2007 2:32:16 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class com.sun.faces.config.GlassFishConfigureListener java.lang.NoClassDefFoundError: javax/el/ExpressionFactory at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3678) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Jun 20, 2007 2:32:16 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) Jun 20, 2007 2:32:18 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Thank you. -- View this message in context: http://www.nabble.com/javax.el.ExpressionFactory-tf3951985.html#a11217621 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HDIV for Struts2
Hi all, HDIV project is an Apache-licensed Struts' Security extension that adds security functionalities to Struts, maintaining the API and Struts specification. This implies that we can use HDIV in applications developed in Struts in a transparent way to the programmer and without adding any complexity to the application development. The security functionalities added to the original Struts (Struts 1.x Struts 2) version are these: INTEGRITY: HDIV guarantees integrity (no data modification) of all the data generated by the server which should not be modified by the client (links, hidden fields, combo values, radio buttons, destiny pages, etc.). EDITABLE DATA VALIDATION: HDIV eliminates to a large extent the risk originated by attacks of type Cross-site scripting (XSS) and SQL Injection using generic validations of the editable data (text and textarea). CONFIDENTIALITY: HDIV guarantees the confidentiality of non editable data as well. Usually lots of the data sent to the client has key information for the attackers such as database registry identifiers, column or table names, web directories, etc. All these values are hidden by HDIV to avoid a malicious use of them. For example a link of this type, http://www.host.com?data1=12data2=24 is replaced by http://www.host.com?data1=0data2=1, guaranteeing confidentiality of the values representing database identifiers. HDIV 1.3 has just been released including Struts2 support. HDIV's project core it's the same for Struts1 and Struts2. It has been added a new tag module for Struts 2.0.6 tags support. You can have a look at it at http://www.hdiv.org In addition to that there is a quick introduction about HDIV using OWASP top ten 2007 as reference at http://www.hdiv.org/docs/hdiv.ppt Regards, Gorka Vicente Martiarena - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Incorrect validation behaviour
I have a couple of actions with validation configuration. The validation works fine for most of them, except for one in which case all the fields are always invalidated even when I fill them correctly. Also, I noticed that, after submitting the form, the values of the fields are not preserved. I can't understand why it doesn't work right, because I simply copied and pasted from existing files of another action. I've already spent hours trying to fix that, but can't figure out what's wrong. alteracao-senha-form.jsp --- %@ taglib prefix=s uri=/struts-tags% html head titles:property value=%{getText('alteracao-senha')}//title /head body s:actionerror/ s:actionmessage/ s:fielderror/ br s:form action=alteracaoDeSenha!salvar s:token/ s:textfield name=senhaAtual label=%{getText('alteracao-senha.senha-atual')}/ s:textfield name=novaSenha label=%{getText('alteracao-senha.nova-senha')}/ s:textfield name=confirmacaoDaSenha label=%{getText('alteracao-senha.confirmacao-senha')}/ s:submit value=%{getText('registro.salvar')}/ /s:form a href=javascript:void(null); onclick=history.go(-1);/s:text name=navegacao.voltar//a /body /html AlteracaoDeSenhaAction.java -- package br.com.radice.labore.web.actions; import br.com.radice.labore.Usuario; import br.com.radice.labore.dao.UsuarioDao; import br.com.radice.labore.web.SessionKeys; import br.com.radice.web.struts2.actions.SessionProvidedAction; public class AlteracaoDeSenhaAction extends SessionProvidedAction { private static final long serialVersionUID = 1L; private UsuarioDao usuarioDao; private String senhaAtual, novaSenha, confirmacaoDaSenha; public AlteracaoDeSenhaAction() { } public void setConfirmacaoDaSenha(String confirmacaoDaSenha) { this.confirmacaoDaSenha = confirmacaoDaSenha; } public void setNovaSenha(String novaSenha) { this.novaSenha = novaSenha; } public void setUsuarioDao(UsuarioDao usuarioDao) { this.usuarioDao = usuarioDao; } public void setSenhaAtual(String senha) { this.senhaAtual = senha; } public String salvar() throws Exception { Usuario usuarioLogado = getUsuarioLogado(); if (!usuarioLogado.possuiEstaSenha(senhaAtual)) { addActionError(getText(alteracao-senha.senha-atual-incorreta)); return INPUT; } if (!novaSenha.equals(confirmacaoDaSenha)) { addActionError(getText(alteracao-senha.nova-senha-nao-confere)); return INPUT; } usuarioLogado.setSenha(novaSenha); usuarioDao.save(usuarioLogado); addActionMessage(getText(alteracao-senha.alterada-com-sucesso)); return SUCCESS; } private Usuario getUsuarioLogado() { Usuario usuarioLogado = (Usuario) getSession().get(SessionKeys.USUARIO); return usuarioDao.get(usuarioLogado.getId()); } } AlteracaoDeSenhaAction-validation.xml ?xml version=1.0 encoding=utf-8 ? !DOCTYPE validators PUBLIC -//OpenSymphony Group//XWork Validator 1.0.2//EN http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd; validators field name=senhaAtual field-validator type=requiredstring message key=alteracao-senha.campo-obrigatorio.senha-atual/ /field-validator /field field name=novaSenha field-validator type=requiredstring message key=alteracao-senha.campo-obrigatorio.nova-senha/ /field-validator /field field name=confirmacaoDaSenha field-validator type=requiredstring message key=alteracao-senha.campo-obrigatorio.confirmacao-senha/ /field-validator /field /validators spring.actions.xml -- ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd; !-- other stuff omitted -- bean id=alteracaoDeSenhaAction class=br.com.radice.labore.web.actions.AlteracaoDeSenhaAction scope=prototype property name=usuarioDao ref=usuarioDao/ /bean /beans struts.xml -- ?xml version=1.0 encoding=utf-8 ?
Re: properties at times not found
Hi again Scott. I tried anyways adding default-interceptor-ref name=paramsPrepareParamsStack/ to my struts.xml but it doesn't help.. Any more hints? Roberto Nunnari wrote: Hello Scott. ..but.. the list is a property of the action, and it's populated in the execute method.. the JSP, should be rendered after the execute method has returned, and so at that time it should be safe to get the stories from the action, as by now it should be set and ready. Do I miss anyhing? -- Robi. Scott Trafton wrote: If you are trying to load your list by using a parameter passed in.. say and Id from a link or another page, you might need to use the paramsPrepareParamsStack interceptor and implement Preparable in you action. I ran into a similar problem the other day. You would need to put your code to populate the list in the Prepare() method. http://struts.apache.org/2.x/docs/crud-demo-i.html check out the The prepare approach in the above link. I hope this helps. -Scott -Original Message- From: Roberto Nunnari [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 20, 2007 12:16 PM To: Struts Users Mailing List Subject: properties at times not found Hello. I have an action with a getter for a List. In the execute method of the action I can verify the list is not empty. But in the jsp view, at times it reports an empty list. the action: public class StorySearch extends ActionSupport { private ListStory stories = null; ... public String execute() throws Exception { ... stories = dataManager.searchStories(...); for (Story story : stories) { System.out.println( +story.getId()); } return SUCCESS; } public List getStories() { return stories; } the JSP: c:url var=storyURL value=/StoryView.action/ display:table name=${stories} requestURI=storySearch.action display:column property=id href=${storyURL} paramId=id/ display:column property=title/ display:column property=text/ display:column property=link autolink=true/ display:column property=accessCount sortable=true/ display:column property=creationDate sortable=true/ display:captionThis is the table caption/display:caption /display:table Any hints? Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Roberto Nunnari Servizi Informatici SUPSI-DTI SUPSI-DTI - Via Cantonale - 6928 Manno - Switzerland email: mailto:[EMAIL PROTECTED] tel: +41-58-561 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: properties at times not found
If you do the following I am pretty sure it would work, assuming you are pasing in the id for dataManager.searchStories(id) . Action class: public class StorySearch extends ActionSupport implements Preparable { private ListStory stories = null; private String id; //add getters and setters for id ... public void prepare() throws Exception{ if(id != null ){ stories = dataManager.searchStories(id); } } public String execute() throws Exception { ... for (Story story : stories) { System.out.println( +story.getId()); } return SUCCESS; } public List getStories() { return stories; } Struts.xml == Use the following in interceptor stack in the display action interceptor-ref name=paramsPrepareParamsStack/ If that doesn't work, I'm really not sure what to tell you. That was how I ended up getting my list to load. The interceptor stack will load the id from the request. Then run Prepare to get your list data before calling the jsp and execute. At least I believe that is how it works. -Scott -Original Message- From: Roberto Nunnari [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 20, 2007 12:49 PM To: Struts Users Mailing List Subject: Re: properties at times not found Hello Scott. ..but.. the list is a property of the action, and it's populated in the execute method.. the JSP, should be rendered after the execute method has returned, and so at that time it should be safe to get the stories from the action, as by now it should be set and ready. Do I miss anyhing? -- Robi. Scott Trafton wrote: If you are trying to load your list by using a parameter passed in.. say and Id from a link or another page, you might need to use the paramsPrepareParamsStack interceptor and implement Preparable in you action. I ran into a similar problem the other day. You would need to put your code to populate the list in the Prepare() method. http://struts.apache.org/2.x/docs/crud-demo-i.html check out the The prepare approach in the above link. I hope this helps. -Scott -Original Message- From: Roberto Nunnari [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 20, 2007 12:16 PM To: Struts Users Mailing List Subject: properties at times not found Hello. I have an action with a getter for a List. In the execute method of the action I can verify the list is not empty. But in the jsp view, at times it reports an empty list. the action: public class StorySearch extends ActionSupport { private ListStory stories = null; ... public String execute() throws Exception { ... stories = dataManager.searchStories(...); for (Story story : stories) { System.out.println( +story.getId()); } return SUCCESS; } public List getStories() { return stories; } the JSP: c:url var=storyURL value=/StoryView.action/ display:table name=${stories} requestURI=storySearch.action display:column property=id href=${storyURL} paramId=id/ display:column property=title/ display:column property=text/ display:column property=link autolink=true/ display:column property=accessCount sortable=true/ display:column property=creationDate sortable=true/ display:captionThis is the table caption/display:caption /display:table Any hints? Thank you. - 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: Spring Action Instantiation
That looks right to me :) musachy On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: !-- Actions -- bean id=pufAction class=actions.PayrollUpdateAction scope=prototype property name=payrollUpdate ref=anUpdate/ /bean !-- Add actions here -- action name=PayrollUpdate_* method={1} class=pufAction result name=inputPayrollUpdate/result result name=listPayrollUpdate_list/result result name=addPayrollUpdate/result result name=showPayrollUpdate/result result name=editPayrollUpdate/result result name=destroyPayrollUpdate/result result name=notes type=chainPayrollUpdateNotes_list/result /action On 6/20/07, Musachy Barroso [EMAIL PROTECTED] wrote: That should be it, and scope=prototype has always done the trick for me, why don't you post relevant parts of the spring conf file? regards musachy On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Oooop! The struts.xml change did not force the context to reload! Now that I have changed the class in the action mapping to the fully qualified class name, it *is* being instantiated on each request! So why is it not working with the Spring bean id? On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I replaced the spring bean id in my action mapping with the fully qualified class name to rule Spring out completely. I am still never seeing the log4j output in the constructor of my action class! I have double checked my log4j.properties and the debug output would be written out if the constructor were called. Any ideas? Could this have anything to do with an interceptor? On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm using Spring 2.x and the attribute scope=prototype On 6/19/07, Zarar Siddiqi [EMAIL PROTECTED] wrote: It sounds to me like your Action class might be configured as a singleton. If that's the case the action class' constructor would only be called once on startup. Make sure you have singleton=false in your Spring config for the action class. The default value for singleton is true. stanlick wrote: It appears as though I am not getting a new Action instance created for each request! I have placed a logging statement in the constructor of my Action class and it is not emitting output. The Bean inside the Action *is* emitting log statements from its constructor so I must have the Spring beans wired correctly. I am injecting both the Actions and Action Beans via Spring. I have scope=prototype on them both. Any ideas? Thanks, Scott -- View this message in context: http://www.nabble.com/Spring-Action-Instantiation-tf3948840.html#a11205652 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd -- Scott [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Restricting Direct Access to Jsp
Hi, I am using struts 1.3.8 for my application. Can anybody please help me how to restrict access to jsp pages directly in struts. I am not having any of jsp in web-inf, so I need to restrict direct access to JSP. Any suggestion will be a great help to me. -- Regards Archer
Re: Restricting Direct Access to Jsp
Archer wrote: Hi, I am using struts 1.3.8 for my application. Can anybody please help me how to restrict access to jsp pages directly in struts. I am not having any of jsp in web-inf, so I need to restrict direct access to JSP. Any suggestion will be a great help to me. Too many ways to do this, for example a servletfilter or web.xml security-constraint web-resource-collection web-resource-nameno_access/web-resource-name url-pattern*.jsp/url-pattern /web-resource-collection auth-constraint/ /security-constraint hth, Manos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
action mappings
Hello, I got an exception that my action mappings cannot be located... eg. namespace /program action name viewInvoices. - [UNKNOWN LOCATION] ... etc. so i gave my action an incorrect name eg. (viewInvoice) and guess what my action was suddenly located, even tough I triple checked that the s:url action=viewInvoices/ then I changed the action name to viewInvoicess - that also worked and only then, when I switched to my original viewInvoices in program.xml my action mappings became locatable. Can anyone explain this phenomenon ? Cheers. :) -- View this message in context: http://www.nabble.com/action-mappings-tf3954122.html#a11219017 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: properties at times not found
Hello, i had a similar problem, u may need a concrete implementation for your property something like: private ListStory stories = new LinkedListStory(); public ListStory getStories() { return stories; } and make sure to override toString() in your Story class... don't know what else to tell ya. Good Luck...:) Roberto Nunnari wrote: Hello. I have an action with a getter for a List. In the execute method of the action I can verify the list is not empty. But in the jsp view, at times it reports an empty list. the action: public class StorySearch extends ActionSupport { private ListStory stories = null; ... public String execute() throws Exception { ... stories = dataManager.searchStories(...); for (Story story : stories) { System.out.println( +story.getId()); } return SUCCESS; } public List getStories() { return stories; } the JSP: c:url var=storyURL value=/StoryView.action/ display:table name=${stories} requestURI=storySearch.action display:column property=id href=${storyURL} paramId=id/ display:column property=title/ display:column property=text/ display:column property=link autolink=true/ display:column property=accessCount sortable=true/ display:column property=creationDate sortable=true/ display:captionThis is the table caption/display:caption /display:table Any hints? Thank you. -- Robi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/properties-at-times-not-found-tf3953428.html#a11219495 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: properties at times not found
On 6/20/07, Roberto Nunnari [EMAIL PROTECTED] wrote: In the execute method of the action I can verify the list is not empty. But in the jsp view, at times it reports an empty list. Are you saying that 'sometimes' when the search actually brings back results (and you output it via that for loop in the action) that the display-tag section in the jsp is blank...? Not all the time? ...? I'd add title parameters to the display:column elements and see if displaytag is dying just trying to find the stories list or if it is finding an empty list. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Restricting Direct Access to Jsp
Thank you for the input Manos.I am new to struts and security implementation. So I am trying different things. My present implemetation has restricted access to JSP pages depending on role. I thought of restricting complete access to JSP pages itself as the jsp pages get the input from action classes(A error is displayed if the JSP page should get the variable ). Is this the right approach?. Other thing i want to try is bookmark a page and if a user clicks on it, it should go to the login page and after logging in it should display the page if he has access to that page(depending on role). I am not able to come up with a solution. Can you suggest me anything on this. Thanks once again for the solution Regards Viplav On 6/20/07, Manos Batsis [EMAIL PROTECTED] wrote: Archer wrote: Hi, I am using struts 1.3.8 for my application. Can anybody please help me how to restrict access to jsp pages directly in struts. I am not having any of jsp in web-inf, so I need to restrict direct access to JSP. Any suggestion will be a great help to me. Too many ways to do this, for example a servletfilter or web.xml security-constraint web-resource-collection web-resource-nameno_access/web-resource-name url-pattern*.jsp/url-pattern /web-resource-collection auth-constraint/ /security-constraint hth, Manos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Regards Archer
RE: Restricting Direct Access to Jsp
Fellows, I am unable to start apache tomcat server running simple application. The reason is that it cannot find mappings as given below, any input is appreciated. thanks Munwar Soomro Log messages: WARNING: Unable to load config class org.apache.struts2.interceptor.debugging.DebuggingInterceptor at interceptor - jar:file:/C:/struts2/struts-2.0.8/lib/struts2-core-2.0.8.jar!/struts-default.xml:76:115 probably due to a missing jar, which might be fine if you never plan to use the debugging interceptor Jun 20, 2007 3:14:37 PM com.opensymphony.xwork2.config.providers.InterceptorBuilder constructInterceptorReference SEVERE: Actual exception Caught Exception while registering Interceptor class org.apache.struts2.interceptor.debugging.DebuggingInterceptor - interceptor - jar:file:/C:/struts2/struts-2.0.8/lib/struts2-core-2.0.8.jar!/struts-default.xml:76:115 at org.apache.struts2.impl.StrutsObjectFactory.buildInterceptor(StrutsObjectFactory.java:78) Caused by: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=org.apache.struts2.views.freemarker.FreemarkerManager, name='default'] in public void org.apache.struts2.interceptor.debugging.DebuggingInterceptor.setFreemarkerManager(org.apache.struts2.views.freemarker.FreemarkerManager). at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:157) From: Archer [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org To: Struts Users Mailing List user@struts.apache.org Subject: Restricting Direct Access to Jsp Date: Wed, 20 Jun 2007 12:51:53 -0500 Hi, I am using struts 1.3.8 for my application. Can anybody please help me how to restrict access to jsp pages directly in struts. I am not having any of jsp in web-inf, so I need to restrict direct access to JSP. Any suggestion will be a great help to me. -- Regards Archer _ Dont miss your chance to WIN $10,000 and other great prizes from Microsoft Office Live http://clk.atdmt.com/MRT/go/aub0540003042mrt/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
unable to start tomcat5.5 with struts2
Fellows, I am unable to start apache tomcat server running simple application. The reason is that it cannot find mappings as given below, any input is appreciated. thanks Munwar Soomro Log messages: WARNING: Unable to load config class org.apache.struts2.interceptor.debugging.DebuggingInterceptor at interceptor - jar:file:/C:/struts2/struts-2.0.8/lib/struts2-core-2.0.8.jar!/struts-default.xml:76:115 probably due to a missing jar, which might be fine if you never plan to use the debugging interceptor Jun 20, 2007 3:14:37 PM com.opensymphony.xwork2.config.providers.InterceptorBuilder constructInterceptorReference SEVERE: Actual exception Caught Exception while registering Interceptor class org.apache.struts2.interceptor.debugging.DebuggingInterceptor - interceptor - jar:file:/C:/struts2/struts-2.0.8/lib/struts2-core-2.0.8.jar!/struts-default.xml:76:115 at org.apache.struts2.impl.StrutsObjectFactory.buildInterceptor(StrutsObjectFactory.java:78) Caused by: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=org.apache.struts2.views.freemarker.FreemarkerManager, name='default'] in public void org.apache.struts2.interceptor.debugging.DebuggingInterceptor.setFreemarkerManager(org.apache.struts2.views.freemarker.FreemarkerManager). at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:157) _ Like puzzles? Play free games earn great prizes. Play Clink now. http://club.live.com/clink.aspx?icid=clink_hotmailtextlink2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Implementing wizard like interface in struts
Hi there, May be someone has already solved this problem. I need to implement a wizard like page flow in my strut web application. This is what I've done: 1. Created one big action form and put it in session scope. 2. Created action class extending DispatchAction 3. Created several jsps. I successfully implemented the logic with previous, next, finish, and cancel button. I removed the action form from session if the user clicks cancel or finish buttons. The only problem i'm having is how to remove the action form from session if the user navigates to other pages from menu bar (without clicking cancel or finish buttons). The other problem I'm having is how to navigate the user to first step if he/she directly types the url of other subsequent pages. I think i'm not the first person to face this problem. someone must have already implemented this. Any hint will be greatly appreciated!! There are different third party plugins for struts wizard. Do they solve my problems? Thanks, semaj -- View this message in context: http://www.nabble.com/Implementing-wizard-like-interface-in-struts-tf3954707.html#a11220929 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: properties at times not found
Hi Jeff. Jeff Amiel wrote: On 6/20/07, Roberto Nunnari [EMAIL PROTECTED] wrote: In the execute method of the action I can verify the list is not empty. But in the jsp view, at times it reports an empty list. Are you saying that 'sometimes' when the search actually brings back results (and you output it via that for loop in the action) that the display-tag section in the jsp is blank...? Not all the time? Yes. That's it. It happens at random times.. not always. When it happens, all I get instead of the table in the browser is: Nothing found to display. ...? I'd add title parameters to the display:column elements and see if displaytag is dying just trying to find the stories list or if it is finding an empty list. I added the title parameters to the display:column elements and the result is just like before: Nothing found to display. Any more hints? Thank you. -- Robi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: properties at times not found
On 6/20/07, Roberto Nunnari [EMAIL PROTECTED] wrote: Yes. That's it. It happens at random times.. not always. When it happens, all I get instead of the table in the browser is: Nothing found to display. makes no sensesure you don't have a local variable inside the execute method called stories or something equally silly?... or even better...maybe another element called 'stories' being put on the value stack on top of the action class element with the same name... Doesn't display-tag have the ability to set the scope of the collection you are looking for (like sessionScope. as aprefix or requestScope.)..instead of the OGNL stuff with the name=${stories}, just do name=stories. Displaytag should just find it automagically...or you can play with those prefixes to try to pinpoint it in case some other element with same name is being placed first in the search path. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javax.el.ExpressionFactory
Thanks anyway for your answer. I have to say there are a great bunch of good guys on this forum. The thing is that I am not using intentionally the JSF framewrok. I just added an interceptor to the application. What is the problem here ? cilquirm wrote: This is most probably not related to Struts. I can't claim to know the intrinsics of your setup but it looks like you're missing some jars need for JSF. It might be that you're running an older version of the J2EE stack. javax.el.ExpressionFactory comes with J2EE 5, and is part of JSF 1.2 GEDA wrote: Hi. I created an interceptor which extends AbstractInterceptor and implements StrutsStatics. Also I added it in the applicationcontext.xml of the Spring framework. My problem is the following and I don't know where to get the missing class: Jun 20, 2007 2:32:16 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class com.sun.faces.config.GlassFishConfigureListener java.lang.NoClassDefFoundError: javax/el/ExpressionFactory at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3678) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Jun 20, 2007 2:32:16 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) Jun 20, 2007 2:32:18 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Thank you. -- View this message in context: http://www.nabble.com/javax.el.ExpressionFactory-tf3951985.html#a11221680 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: javax.el.ExpressionFactory
Did you see what happens when you take out the interceptor? As I see it, you should still be getting this error ( since I postulate they are unrelated :) ) If not, then this indeed is a mystery. GEDA wrote: Thanks anyway for your answer. I have to say there are a great bunch of good guys on this forum. The thing is that I am not using intentionally the JSF framewrok. I just added an interceptor to the application. What is the problem here ? cilquirm wrote: This is most probably not related to Struts. I can't claim to know the intrinsics of your setup but it looks like you're missing some jars need for JSF. It might be that you're running an older version of the J2EE stack. javax.el.ExpressionFactory comes with J2EE 5, and is part of JSF 1.2 GEDA wrote: Hi. I created an interceptor which extends AbstractInterceptor and implements StrutsStatics. Also I added it in the applicationcontext.xml of the Spring framework. My problem is the following and I don't know where to get the missing class: Jun 20, 2007 2:32:16 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class com.sun.faces.config.GlassFishConfigureListener java.lang.NoClassDefFoundError: javax/el/ExpressionFactory at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3678) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Jun 20, 2007 2:32:16 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) Jun 20, 2007 2:32:18 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Thank you. -- View this message in context: http://www.nabble.com/javax.el.ExpressionFactory-tf3951985.html#a11221750 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] FreeMarker template and custom tag
Good Day, I thought I would post a reply in case anyone needs to find the answer. Well it seems that the UIBean has an evaluateParams and so to get my parameters visible in the template is to do something like... public void evaluateParams() { super.evaluateParams(); if(width != null) addParameter(width, findString(width)); if(height != null) addParameter(height, findString(height)); if(align != null) addParameter(align, findString(align)); if(chartUrl != null) addParameter(chart, findString(chartUrl)); if(dataUrl != null) addParameter(url, findString(dataUrl)); if(dataAction != null) addParameter(action, findString(dataAction)); if(bgColor != null) addParameter(bgcolor, findString(bgColor)); } Regards, Mark P Ashworth http://www.connext.co.za Mark P Ashworth wrote: Good Day, I have a custom tag that I am developing and I am trying to figure out where the parameter.id values come from. For example, lt;#if parameters.align?existsgt; align=${parameters.align?html} lt;/#ifgt; This is used in the graph.ftl that is in template.simple. My tag has those parameters and my tld has those parameters. What do I need to do to get it to work? Regards, Mark P Ashworth http://www.connext.co.za -- View this message in context: http://www.nabble.com/-S2--FreeMarker-template-and-custom-tag-tf3952011.html#a11221801 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: javax.el.ExpressionFactory
cilquirm wrote: Did you see what happens when you take out the interceptor? As I see it, you should still be getting this error ( since I postulate they are unrelated :) ) I am sure they are unrelated ... I will try to rule it out from the struts.xml file If not, then this indeed is a mystery. Do you know if there are any libraries of struts or spring that could generate such claim of class ? Maybe I loaded in the project too much unneeded libraries. GEDA wrote: Thanks anyway for your answer. I have to say there are a great bunch of good guys on this forum. The thing is that I am not using intentionally the JSF framewrok. I just added an interceptor to the application. What is the problem here ? cilquirm wrote: This is most probably not related to Struts. I can't claim to know the intrinsics of your setup but it looks like you're missing some jars need for JSF. It might be that you're running an older version of the J2EE stack. javax.el.ExpressionFactory comes with J2EE 5, and is part of JSF 1.2 GEDA wrote: Hi. I created an interceptor which extends AbstractInterceptor and implements StrutsStatics. Also I added it in the applicationcontext.xml of the Spring framework. My problem is the following and I don't know where to get the missing class: Jun 20, 2007 2:32:16 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class com.sun.faces.config.GlassFishConfigureListener java.lang.NoClassDefFoundError: javax/el/ExpressionFactory at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3678) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Jun 20, 2007 2:32:16 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) Jun 20, 2007 2:32:18 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Thank you. -- View this message in context: http://www.nabble.com/javax.el.ExpressionFactory-tf3951985.html#a11221802 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
S2 Design Question
I have discovered an optimized (very little code) solution to CRUD using S2. My next question has to do with CRUD across a 1:M domain model. I have the Preparable and ModelDriven technique working nicely with the id (PK) being set in the BaseAction class. What I would like to work through next is how to link a parent with children where the children make up an entirely new CRUD. Ideas? -- Scott [EMAIL PROTECTED]
Re: javax.el.ExpressionFactory
What plugin libs are you using vs. having in WEB-INF/lib? For example, do you have the JSF plugin? d. --- GEDA [EMAIL PROTECTED] wrote: cilquirm wrote: Did you see what happens when you take out the interceptor? As I see it, you should still be getting this error ( since I postulate they are unrelated :) ) I am sure they are unrelated ... I will try to rule it out from the struts.xml file If not, then this indeed is a mystery. Do you know if there are any libraries of struts or spring that could generate such claim of class ? Maybe I loaded in the project too much unneeded libraries. GEDA wrote: Thanks anyway for your answer. I have to say there are a great bunch of good guys on this forum. The thing is that I am not using intentionally the JSF framewrok. I just added an interceptor to the application. What is the problem here ? cilquirm wrote: This is most probably not related to Struts. I can't claim to know the intrinsics of your setup but it looks like you're missing some jars need for JSF. It might be that you're running an older version of the J2EE stack. javax.el.ExpressionFactory comes with J2EE 5, and is part of JSF 1.2 GEDA wrote: Hi. I created an interceptor which extends AbstractInterceptor and implements StrutsStatics. Also I added it in the applicationcontext.xml of the Spring framework. My problem is the following and I don't know where to get the missing class: Jun 20, 2007 2:32:16 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class com.sun.faces.config.GlassFishConfigureListener java.lang.NoClassDefFoundError: javax/el/ExpressionFactory at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3678) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Jun 20, 2007 2:32:16 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) Jun 20, 2007 2:32:18 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Thank you. -- View this message in context: http://www.nabble.com/javax.el.ExpressionFactory-tf3951985.html#a11221802 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANN] Connext Graphs
Good Day, The first beta release of Connext Graphs is ready. This release provides a Struts 2 plug-in so that pages can use the Open Flash Chart library. The next release will focus on the data model so that actions can easily create the data source that the chart uses to render. The library and sample web application is available from my website at http://www.connext.co.za/index.html The library is license under Apache 2. Regards, Mark P Ashworth http://www.connext.co.za -- View this message in context: http://www.nabble.com/-ANN--Connext-Graphs-tf3955090.html#a11222429 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: properties at times not found
Jeff Amiel wrote: On 6/20/07, Roberto Nunnari [EMAIL PROTECTED] wrote: Yes. That's it. It happens at random times.. not always. When it happens, all I get instead of the table in the browser is: Nothing found to display. makes no sensesure you don't have a local variable inside the execute method called stories or something equally silly?... hehe.. no I don't have a local variable inside the execute method.. in that case the instance variable would never get assigned.. or even better...maybe another element called 'stories' being put on the value stack on top of the action class element with the same name... no.. by the way, do you know what scope would stories be put in? request, session, application, page, or action? I assume action, as the variable is on the action, but I used to access it via JSP EL, that doesn't know about action scope, but only request, session, application and page scopes.. Doesn't display-tag have the ability to set the scope of the collection you are looking for (like sessionScope. as aprefix or requestScope.)..instead of the OGNL stuff with the name=${stories}, just do name=stories. Displaytag should just find it automagically...or you can play with those prefixes to try to pinpoint it in case some other element with same name is being placed first in the search path. I didn't know I could use just name=stories. I tried that and it works.. but just like before, at random times, the view doesn't find the property, even though the execute method prints them on stdout. humm... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: properties at times not found
On 6/20/07, Roberto Nunnari [EMAIL PROTECTED] wrote: humm... If it's truly 'random' like that there are only 4 things that could be happening. 1. Display tag is broken (not likely) 2. You occasionally have another element in some other scope with the same name that is being picked up 'first' in the search path by the value-stack logic (or display-tag's logic if you just do the name=stories) 3. Displaytag is taking a crap trying to render certain elements (calling toString() on them? because you have no decorator classes) based on different search results. (You never said..if you put in the same search parameters every time, do you always get the same results (nothing found to display or good data) 4. You are insane. :) good luck! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Updating a Map of data
I am trying to write a page that views and updates values from MBeans. My Action class has a method that exposes a Map of MBean client objects which mostly contain properties from the MBean. I am using the Preparable interface where the prepare() method populates the map. The view portion is working fine. All values including the checkbox, labels and text boxes are populating correctly. The problem is with the update portion of the functionality. I am expecting the params interceptor to make calls like getInboundBridges.get('key1').setMaxAttempts from the OGNL expression in the textbox name field of inboundBridges['key1'].maxAttempts when I submit my form. During the update form submission, the map already exists from the prepare() method but the setters are never called. I did have this working once using List instead of Map and was using the index of the List for the update. The problem with this approach is there is no guarantees that the List created in the prepare() method would be the same one between view and update, so the indexes may not match anymore. I tried to solve this by using the KeyProperty feature in a type convertor but could not get it working. I have then switched to the Map approach which is at least working on the view side. Any ideas why this is happening? My action is defined like this: package name=default namespace=/ extends=struts-default action name=ServiceSummary class=serviceSummaryAction method=execute result/serviceSummary.jsp/result /action action name=UpdateServiceAction class=serviceSummaryAction method=update result/serviceSummary.jsp/result /action /package The getter for the action class looks like this: public MapString, MqMessageBridgeClient getInboundBridges() { return this.inboundBridges; } The snippet from the JSP that deals with populating the view with a checkbox and a couple of textboxes looks like this: s:form theme=simple action=UpdateServiceAction method=post ... s:iterator value=inboundBridges.keys status=stat id=key tr td align=center nowrap=nowrap s:checkbox theme=simple name=inboundBridges['%{#key}'].active/ /td td nowrap=nowraps:property value=inboundBridges[#key].name/nbsp;/td td nowrap=nowraps:property value=inboundBridges[#key].location/nbsp;/td td nowrap=nowraps:property value=inboundBridges[#key].bridgeDescription/nbsp;/td td nowrap=nowraps:property value=inboundBridges[#key].initialState/nbsp;/td td nowrap=nowraps:property value=inboundBridges[#key].bridgeDestinationName/nbsp;/td td nowrap=nowraps:property value=inboundBridges[#key].connectionFactoryName/nbsp;/td td nowrap=nowraps:textfield name=inboundBridges['%{#key}'].maxAttempts size=4//td td nowrap=nowraps:textfield name=inboundBridges['%{#key}'].retryDelay size=6//td /tr /s:iterator ... s:submit theme=simple value=Update/ /s:form This is a snippet of the actual HTML source that is being rendered: form id=UpdateServiceAction name=UpdateServiceAction onsubmit=return true; action=/struts2.demo/UpdateServiceAction.action method=post ... input type=checkbox name=inboundBridges['key1'].active value=true checked=checked id=UpdateServiceAction_inboundBridges_'key1'__active/ input type=hidden name=__checkbox_inboundBridges['key1'].active value=true/ /td td nowrap=nowrapTestBridgenbsp;/td td nowrap=nowrapAdminServernbsp;/td td nowrap=nowrapTest Bridgenbsp;/td td nowrap=nowrapMANAGEDnbsp;/td td nowrap=nowrapaid.test.jms.mq.TestInboundMqnbsp;/td td nowrap=nowrapaid.ail.jms.connectionfactory.TestMqConnectionFactorynb sp;/td td nowrap=nowrapinput type=text name=inboundBridges['key1'].maxAttempts size=4 value=3 id=UpdateServiceAction_inboundBridges_'key1'__maxAttempts/ /td td nowrap=nowrapinput type=text name=inboundBridges['key1'].retryDelay size=6 value=5000 id=UpdateServiceAction_inboundBridges_'key1'__retryDelay/ ... input type=submit id=UpdateServiceAction_1 value=Update/ /form Thanks for any help, Jeff
Re: [ANN] Connext Graphs
Adding and entry in the plugin registry will help users find it: http://cwiki.apache.org/S2PLUGINS/home.html regards musachy On 6/20/07, Mark P Ashworth [EMAIL PROTECTED] wrote: Good Day, The first beta release of Connext Graphs is ready. This release provides a Struts 2 plug-in so that pages can use the Open Flash Chart library. The next release will focus on the data model so that actions can easily create the data source that the chart uses to render. The library and sample web application is available from my website at http://www.connext.co.za/index.html The library is license under Apache 2. Regards, Mark P Ashworth http://www.connext.co.za -- View this message in context: http://www.nabble.com/-ANN--Connext-Graphs-tf3955090.html#a11222429 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Problem using list conversions
Hi, Im trying to use list conversions. I was testing the example in Type Conversion guide (http://struts.apache.org/2.0.8/docs/type-conversion.html). I had the example running, but when I tried to change the attribute id from MyBean to type String, it wont work when using big strings, or strings with letters. I can only use it with little numeric strings. For example if id=98765432110 it wont work, but if id=987, it works. Any suggestions? Tks in advance! Telmo Costa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javax.el.ExpressionFactory
On 6/20/07, cilquirm [EMAIL PROTECTED] wrote: This is most probably not related to Struts. I can't claim to know the intrinsics of your setup but it looks like you're missing some jars need for JSF. It might be that you're running an older version of the J2EE stack. javax.el.ExpressionFactory comes with J2EE 5, and is part of JSF 1.2 This is incorrect - javax.el.ExpressionFactory is part of the new Unified EL that was developed under JSR 245[1] - which is the JSR for JSP 2.1. However the Unified EL - (called that because it aims to unify the expression language implementations used by JSP and JSF) has been released as a separate specification under that JSR and is independant of any servlet technology (i.e. no dependencies on JSP, JSF or any servlet specs). So although its true to say that both JSP 2.1 and JSF 1.2 use the Unified EL (EL 2.1) - it is part of neither. Niall [1] http://jcp.org/en/jsr/detail?id=245 GEDA wrote: Hi. I created an interceptor which extends AbstractInterceptor and implements StrutsStatics. Also I added it in the applicationcontext.xml of the Spring framework. My problem is the following and I don't know where to get the missing class: Jun 20, 2007 2:32:16 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class com.sun.faces.config.GlassFishConfigureListener java.lang.NoClassDefFoundError: javax/el/ExpressionFactory at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3678) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Jun 20, 2007 2:32:16 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) Jun 20, 2007 2:32:18 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Thank you. -- View this message in context: http://www.nabble.com/javax.el.ExpressionFactory-tf3951985.html#a11217621 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: properties at times not found
Jeff Amiel wrote: On 6/20/07, Roberto Nunnari [EMAIL PROTECTED] wrote: humm... If it's truly 'random' like that there are only 4 things that could be happening. 1. Display tag is broken (not likely) don't think so.. the same thing happens also with another action that puts a list (different name) in session via SessionAware and then I loop the list via c:foreach and JSP EL (ie without using displaytag) 2. You occasionally have another element in some other scope with the same name that is being picked up 'first' in the search path by the value-stack logic (or display-tag's logic if you just do the name=stories) no. 3. Displaytag is taking a crap trying to render certain elements (calling toString() on them? because you have no decorator classes) based on different search results. (You never said..if you put in the same search parameters every time, do you always get the same results (nothing found to display or good data) always the same search.. in the action I get always the same data, in JSP nothing found to display or good data so.. don't think so.. see point 1 4. You are insane. :) That may be.. 5. libraries conflict? Best regards. -- Robi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 limitations with DOJO
When it comes to custom widgets, what is the support from the S2 framework, what is the best way to access those via S2 Thanks --- Musachy Barroso [EMAIL PROTECTED] wrote: I'm not really sure about limitations, if you have specific questions, I could help. Just one word of advise, stay away from the datetimepicker tag until 2.1. regards musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: Hi, Can someone let us know the limitations of using DOJO library with S2 provided AJAX features. What exactly these limitations are? Any references or articles would be advantageous. Thanks, Lalitha Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 limitations with DOJO
Struts doesn't add anything on top of dojo except for a few custom widgets (bind, and binddiv), an others that extend the dojo ones to add functionality (autocompleter, datepicker, timepicker, tree, treenode) musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: When it comes to custom widgets, what is the support from the S2 framework, what is the best way to access those via S2 Thanks --- Musachy Barroso [EMAIL PROTECTED] wrote: I'm not really sure about limitations, if you have specific questions, I could help. Just one word of advise, stay away from the datetimepicker tag until 2.1. regards musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: Hi, Can someone let us know the limitations of using DOJO library with S2 provided AJAX features. What exactly these limitations are? Any references or articles would be advantageous. Thanks, Lalitha Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: Nested Struts
Is there a way to use the s:action tag to call actions of other webapps deployed on the same container? Is there a way to get the result of an action from inside another action class? On 6/20/07, Asaf Paris Mandoki [EMAIL PROTECTED] wrote: I'm trying to make a web application that organizes a bunch of widgets. I want each widget to be programmed using struts and have it's own struts.xml. Each widget should be packed as a war file. I was told on an older thread that I could use a different name space for each widget and also that I could use the action tag to call the actions on each widget. My question is how should I deploy my Widgets? Should I do it as regular web applications? Thanks in advance , Asaf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 limitations with DOJO
What is the best way(best practice) to have the widgets that doesn't supported by the Struts2, Should I write a custom tag or call natively? --- Musachy Barroso [EMAIL PROTECTED] wrote: Struts doesn't add anything on top of dojo except for a few custom widgets (bind, and binddiv), an others that extend the dojo ones to add functionality (autocompleter, datepicker, timepicker, tree, treenode) musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: When it comes to custom widgets, what is the support from the S2 framework, what is the best way to access those via S2 Thanks --- Musachy Barroso [EMAIL PROTECTED] wrote: I'm not really sure about limitations, if you have specific questions, I could help. Just one word of advise, stay away from the datetimepicker tag until 2.1. regards musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: Hi, Can someone let us know the limitations of using DOJO library with S2 provided AJAX features. What exactly these limitations are? Any references or articles would be advantageous. Thanks, Lalitha Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 limitations with DOJO
There is a trade off, I guess, but using javascript directly, ala dojo will be easier. musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: What is the best way(best practice) to have the widgets that doesn't supported by the Struts2, Should I write a custom tag or call natively? --- Musachy Barroso [EMAIL PROTECTED] wrote: Struts doesn't add anything on top of dojo except for a few custom widgets (bind, and binddiv), an others that extend the dojo ones to add functionality (autocompleter, datepicker, timepicker, tree, treenode) musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: When it comes to custom widgets, what is the support from the S2 framework, what is the best way to access those via S2 Thanks --- Musachy Barroso [EMAIL PROTECTED] wrote: I'm not really sure about limitations, if you have specific questions, I could help. Just one word of advise, stay away from the datetimepicker tag until 2.1. regards musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: Hi, Can someone let us know the limitations of using DOJO library with S2 provided AJAX features. What exactly these limitations are? Any references or articles would be advantageous. Thanks, Lalitha Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Why two behaviours
Hi, I have a action class which get called by two ways in two different pages. 1) As a href 2)As part of a form submission In the action class I forward to another action instead of a jsp via the forward, hence struts.xml looks as follows. (note: testSetup action defined in the struts.xml) . result name=testHome/test/testSetup.action/result . The issue is it get forward to the testSetup action in above option 2 which form submission but in the href it says the appl/test/testSetup.action resource not found. Can someone let us know why it behaves differently. Thanks Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 limitations with DOJO
If just for presenting data, so far as I tried, almost all dojo widgets can be used directly in the VIEW (eg. JSP pages) ... so it doesnt matter if S2 support or not ... On 6/21/07, Musachy Barroso [EMAIL PROTECTED] wrote: There is a trade off, I guess, but using javascript directly, ala dojo will be easier. musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: What is the best way(best practice) to have the widgets that doesn't supported by the Struts2, Should I write a custom tag or call natively? --- Musachy Barroso [EMAIL PROTECTED] wrote: Struts doesn't add anything on top of dojo except for a few custom widgets (bind, and binddiv), an others that extend the dojo ones to add functionality (autocompleter, datepicker, timepicker, tree, treenode) musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: When it comes to custom widgets, what is the support from the S2 framework, what is the best way to access those via S2 Thanks --- Musachy Barroso [EMAIL PROTECTED] wrote: I'm not really sure about limitations, if you have specific questions, I could help. Just one word of advise, stay away from the datetimepicker tag until 2.1. regards musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: Hi, Can someone let us know the limitations of using DOJO library with S2 provided AJAX features. What exactly these limitations are? Any references or articles would be advantageous. Thanks, Lalitha Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd -- Small win by playing smart Big win by playing honest
Re: Struts2 limitations with DOJO
Yes I agree but dont you think if we can provide a custom tag on top of the widget, it can be reused with minimal coding and also the better way to do it. e.g customized business widget which can be reused. Let me know your thougts as well. Thanks --- Li [EMAIL PROTECTED] wrote: If just for presenting data, so far as I tried, almost all dojo widgets can be used directly in the VIEW (eg. JSP pages) ... so it doesnt matter if S2 support or not ... On 6/21/07, Musachy Barroso [EMAIL PROTECTED] wrote: There is a trade off, I guess, but using javascript directly, ala dojo will be easier. musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: What is the best way(best practice) to have the widgets that doesn't supported by the Struts2, Should I write a custom tag or call natively? --- Musachy Barroso [EMAIL PROTECTED] wrote: Struts doesn't add anything on top of dojo except for a few custom widgets (bind, and binddiv), an others that extend the dojo ones to add functionality (autocompleter, datepicker, timepicker, tree, treenode) musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: When it comes to custom widgets, what is the support from the S2 framework, what is the best way to access those via S2 Thanks --- Musachy Barroso [EMAIL PROTECTED] wrote: I'm not really sure about limitations, if you have specific questions, I could help. Just one word of advise, stay away from the datetimepicker tag until 2.1. regards musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: Hi, Can someone let us know the limitations of using DOJO library with S2 provided AJAX features. What exactly these limitations are? Any references or articles would be advantageous. Thanks, Lalitha Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd -- Small win by playing smart Big win by playing honest The fish are biting. Get more visitors on your site using Yahoo! Search Marketing. http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 limitations with DOJO
Hi Tom, It would be ok to create custom tag and reuse them at many pages. So I guess you may have to deal with data in your tag handler, I am not sure how dojo can be combined with your tag handler effectively and make them S2 awareable. For me, widgets are just used for presenting data. I have a flexible layout which I dont really reuse same widgets too much. By doing this, it is easy to maintain your code also ... Best regards Li On 6/21/07, tom tom [EMAIL PROTECTED] wrote: Yes I agree but dont you think if we can provide a custom tag on top of the widget, it can be reused with minimal coding and also the better way to do it. e.g customized business widget which can be reused. Let me know your thougts as well. Thanks --- Li [EMAIL PROTECTED] wrote: If just for presenting data, so far as I tried, almost all dojo widgets can be used directly in the VIEW (eg. JSP pages) ... so it doesnt matter if S2 support or not ... On 6/21/07, Musachy Barroso [EMAIL PROTECTED] wrote: There is a trade off, I guess, but using javascript directly, ala dojo will be easier. musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: What is the best way(best practice) to have the widgets that doesn't supported by the Struts2, Should I write a custom tag or call natively? --- Musachy Barroso [EMAIL PROTECTED] wrote: Struts doesn't add anything on top of dojo except for a few custom widgets (bind, and binddiv), an others that extend the dojo ones to add functionality (autocompleter, datepicker, timepicker, tree, treenode) musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: When it comes to custom widgets, what is the support from the S2 framework, what is the best way to access those via S2 Thanks --- Musachy Barroso [EMAIL PROTECTED] wrote: I'm not really sure about limitations, if you have specific questions, I could help. Just one word of advise, stay away from the datetimepicker tag until 2.1. regards musachy On 6/20/07, tom tom [EMAIL PROTECTED] wrote: Hi, Can someone let us know the limitations of using DOJO library with S2 provided AJAX features. What exactly these limitations are? Any references or articles would be advantageous. Thanks, Lalitha Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd -- Small win by playing smart Big win by playing honest The fish are biting. Get more visitors on your site using Yahoo! Search Marketing. http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Small win by playing smart Big win by playing honest
Re: Ajax form submission doesn't work after the DIV is updated
Hi musachy, Thanks for your reply. It doesn’t work even I set the executeScripts to true. One thing I didn’t mention is I set the “href” attribute of the DIV to an action that will return the form page. So after the page load, the div will request and show the form page asynchronously. In this way, the form submission works in AJAX. But the same page doesn’t work after I click the button, trigger the JavaScript and return the same form page. The page is shown first without the content in the div(request asynchronously). Then it becomes a blank page and provides a “dojo is not defined” JavaScript error, if I set the executeScripts of div to true and add the struts:head theme=ajax/ to the form page. Although I remove the struts:head theme=ajax/, set the executeScripts to true and the page shown correctly, the form still doesn’t work in ajax and refresh after submission. I use the firebug for debugging and find one strange thing. The form in the div doesn’t contain the following the first time (The content of the whole form page is returned asynchronously). script type=text/javascript dojo.require(dojo.widget.Tooltip); dojo.require(dojo.fx.html); /script But the form returned by the JavaScript contains it. Is this what make the form doesn’t work in AJAX? Why is this block of code provided? Musachy Barroso wrote: Scripts in the html returned will be executed (script.../script) http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html#AjaxandJavaScriptRecipes-ExecuteJavaScriptinthereturnedcontent musachy On 6/20/07, FanCo [EMAIL PROTECTED] wrote: I didn't set the executeScripts attribute for the DIV. So the default value should be false. What is the function of this attribute if it is true? newton.dave wrote: Does your s:div.../ have executeScripts=true? d. --- FanCo [EMAIL PROTECTED] wrote: I am developing a web page which contains two layouts (left right). On the left side, there are some buttons. And the right side, it is a DIV which use s:div/ to create. It will invoke the JavaScript to send a request to one specific S2 action and updates the div with the return page when click the button. The updated page on the right side is always a form containing some fields. I want to send the form with AJAX without refresh the whole page. The JavaScript is using the dojo.io.bind() to send an asynchronous request to S2 action to obtain the web page. Then use the callback to update the DIV. It works fine with the JavaScript to update the DIV. My problem is the AJAX of the form in the updated page doesn’t work. When I click the submit button, it works like the normal form and refresh the whole page. The code of the form is something like the following: struts:head theme=ajax/ …… struts:form method=post id=testForm action=update theme=ajax TABLE tr tdstruts:textfield name=descBean.name//td /tr tr tdstruts:textfield name=descBean.address//td /tr tr td struts:submit value=Save align=left targets=updateDiv/ /td /tr /table /struts:form And the JavaScript is the following: function Connector(updateTargetArray){ // the ids of the target div this.targetsArray = updateTargetArray; } Connector.prototype.send = function(location){ dojo.io.bind({ url: location, handle: dojo.lang.hitch(this, this.bindHandler), mimetype: text/html }); } Connector.prototype.bindHandler = function(type, data, e) { if(type == load) { this.setContent(data); } } Connector.prototype.setContent = function(text){ if(this.targetsArray) { if (this.targetsArray instanceof Array){ for( var i=0; ithis.targetsArray.length; i++){ var node = dojo.byId(this.targetsArray [i]); node.innerHTML = text; } } else { var node = dojo.byId(this.targetsArray); node.innerHTML = text; } } The onClick event of the button will invoke the Connector.send(location) to send the request. The form code works fine in an individual page. I am not quite sure which part is wrong. Does anyone can help me? Thank you so much!~~~ -- View this message in context: http://www.nabble.com/Ajax-form-submission-doesn%27t-work-after-the-DIV-is-updated-tf3952031.html#a11212235 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: Ajax form submission doesn't work after the DIV is updated
Musachy, is this the https://issues.apache.org/struts/browse/WW-1766 issue. I recall you made a partial fix in 2.0.8/2.0.9 but in 2.0.6 I used a work-around. FanCo wrote: Hi musachy, Thanks for your reply. It doesn’t work even I set the executeScripts to true. One thing I didn’t mention is I set the “href” attribute of the DIV to an action that will return the form page. So after the page load, the div will request and show the form page asynchronously. In this way, the form submission works in AJAX. But the same page doesn’t work after I click the button, trigger the JavaScript and return the same form page. The page is shown first without the content in the div(request asynchronously). Then it becomes a blank page and provides a “dojo is not defined” JavaScript error, if I set the executeScripts of div to true and add the struts:head theme=ajax/ to the form page. Although I remove the struts:head theme=ajax/, set the executeScripts to true and the page shown correctly, the form still doesn’t work in ajax and refresh after submission. I use the firebug for debugging and find one strange thing. The form in the div doesn’t contain the following the first time (The content of the whole form page is returned asynchronously). script type=text/javascript dojo.require(dojo.widget.Tooltip); dojo.require(dojo.fx.html); /script But the form returned by the JavaScript contains it. Is this what make the form doesn’t work in AJAX? Why is this block of code provided? Musachy Barroso wrote: Scripts in the html returned will be executed (script.../script) http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html#AjaxandJavaScriptRecipes-ExecuteJavaScriptinthereturnedcontent musachy On 6/20/07, FanCo [EMAIL PROTECTED] wrote: I didn't set the executeScripts attribute for the DIV. So the default value should be false. What is the function of this attribute if it is true? newton.dave wrote: Does your s:div.../ have executeScripts=true? d. --- FanCo [EMAIL PROTECTED] wrote: I am developing a web page which contains two layouts (left right). On the left side, there are some buttons. And the right side, it is a DIV which use s:div/ to create. It will invoke the JavaScript to send a request to one specific S2 action and updates the div with the return page when click the button. The updated page on the right side is always a form containing some fields. I want to send the form with AJAX without refresh the whole page. The JavaScript is using the dojo.io.bind() to send an asynchronous request to S2 action to obtain the web page. Then use the callback to update the DIV. It works fine with the JavaScript to update the DIV. My problem is the AJAX of the form in the updated page doesn’t work. When I click the submit button, it works like the normal form and refresh the whole page. The code of the form is something like the following: struts:head theme=ajax/ …… struts:form method=post id=testForm action=update theme=ajax TABLE tr tdstruts:textfield name=descBean.name//td /tr tr tdstruts:textfield name=descBean.address//td /tr tr td struts:submit value=Save align=left targets=updateDiv/ /td /tr /table /struts:form And the JavaScript is the following: function Connector(updateTargetArray){ // the ids of the target div this.targetsArray = updateTargetArray; } Connector.prototype.send = function(location){ dojo.io.bind({ url: location, handle: dojo.lang.hitch(this, this.bindHandler), mimetype: text/html }); } Connector.prototype.bindHandler = function(type, data, e) { if(type == load) { this.setContent(data); } } Connector.prototype.setContent = function(text){ if(this.targetsArray) { if (this.targetsArray instanceof Array){ for( var i=0; ithis.targetsArray.length; i++){ var node = dojo.byId(this.targetsArray [i]); node.innerHTML = text; } } else { var node = dojo.byId(this.targetsArray); node.innerHTML = text; } } The onClick event of the button will invoke the Connector.send(location) to send the request. The form code works fine in an individual page. I am not quite sure which part is wrong. Does anyone can help me? Thank you so much!~~~ -- View this message in context: http://www.nabble.com/Ajax-form-submission-doesn%27t-work-after-the-DIV-is-updated-tf3952031.html#a11212235 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: Ajax form submission doesn't work after the DIV is updated
One more thing. The Connector JavaScript is included in the parent page(jsp that contains the div), not at the form page. So my form page doesn't contain any javascript(maybe there are some in the future) . So I don't think the value of executeScripts will affect the result. Moreover I found out that the block of code, script type=text/javascript dojo.require(dojo.widget.Tooltip); dojo.require(dojo.fx.html); /script , is also provided after the form submit in AJAX. FanCo wrote: Hi musachy, Thanks for your reply. It doesn’t work even I set the executeScripts to true. One thing I didn’t mention is I set the “href” attribute of the DIV to an action that will return the form page. So after the page load, the div will request and show the form page asynchronously. In this way, the form submission works in AJAX. But the same page doesn’t work after I click the button, trigger the JavaScript and return the same form page. The page is shown first without the content in the div(request asynchronously). Then it becomes a blank page and provides a “dojo is not defined” JavaScript error, if I set the executeScripts of div to true and add the struts:head theme=ajax/ to the form page. Although I remove the struts:head theme=ajax/, set the executeScripts to true and the page shown correctly, the form still doesn’t work in ajax and refresh after submission. I use the firebug for debugging and find one strange thing. The form in the div doesn’t contain the following the first time (The content of the whole form page is returned asynchronously). script type=text/javascript dojo.require(dojo.widget.Tooltip); dojo.require(dojo.fx.html); /script But the form returned by the JavaScript contains it. Is this what make the form doesn’t work in AJAX? Why is this block of code provided? Musachy Barroso wrote: Scripts in the html returned will be executed (script.../script) http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html#AjaxandJavaScriptRecipes-ExecuteJavaScriptinthereturnedcontent musachy On 6/20/07, FanCo [EMAIL PROTECTED] wrote: I didn't set the executeScripts attribute for the DIV. So the default value should be false. What is the function of this attribute if it is true? newton.dave wrote: Does your s:div.../ have executeScripts=true? d. --- FanCo [EMAIL PROTECTED] wrote: I am developing a web page which contains two layouts (left right). On the left side, there are some buttons. And the right side, it is a DIV which use s:div/ to create. It will invoke the JavaScript to send a request to one specific S2 action and updates the div with the return page when click the button. The updated page on the right side is always a form containing some fields. I want to send the form with AJAX without refresh the whole page. The JavaScript is using the dojo.io.bind() to send an asynchronous request to S2 action to obtain the web page. Then use the callback to update the DIV. It works fine with the JavaScript to update the DIV. My problem is the AJAX of the form in the updated page doesn’t work. When I click the submit button, it works like the normal form and refresh the whole page. The code of the form is something like the following: struts:head theme=ajax/ …… struts:form method=post id=testForm action=update theme=ajax TABLE tr tdstruts:textfield name=descBean.name//td /tr tr tdstruts:textfield name=descBean.address//td /tr tr td struts:submit value=Save align=left targets=updateDiv/ /td /tr /table /struts:form And the JavaScript is the following: function Connector(updateTargetArray){ // the ids of the target div this.targetsArray = updateTargetArray; } Connector.prototype.send = function(location){ dojo.io.bind({ url: location, handle: dojo.lang.hitch(this, this.bindHandler), mimetype: text/html }); } Connector.prototype.bindHandler = function(type, data, e) { if(type == load) { this.setContent(data); } } Connector.prototype.setContent = function(text){ if(this.targetsArray) { if (this.targetsArray instanceof Array){ for( var i=0; ithis.targetsArray.length; i++){ var node = dojo.byId(this.targetsArray [i]); node.innerHTML = text; } } else { var node = dojo.byId(this.targetsArray); node.innerHTML = text; } } The onClick event of the button will invoke the Connector.send(location) to send the request. The form code works fine in an individual page. I am not
Re: Ajax form submission doesn't work after the DIV is updated
yes, it does sound like the same scenario. musachy On 6/20/07, Jeromy Evans [EMAIL PROTECTED] wrote: Musachy, is this the https://issues.apache.org/struts/browse/WW-1766issue. I recall you made a partial fix in 2.0.8/2.0.9 but in 2.0.6 I used a work-around. FanCo wrote: Hi musachy, Thanks for your reply. It doesn't work even I set the executeScripts to true. One thing I didn't mention is I set the href attribute of the DIV to an action that will return the form page. So after the page load, the div will request and show the form page asynchronously. In this way, the form submission works in AJAX. But the same page doesn't work after I click the button, trigger the JavaScript and return the same form page. The page is shown first without the content in the div(request asynchronously). Then it becomes a blank page and provides a dojo is not defined JavaScript error, if I set the executeScripts of div to true and add the struts:head theme=ajax/ to the form page. Although I remove the struts:head theme=ajax/, set the executeScripts to true and the page shown correctly, the form still doesn't work in ajax and refresh after submission. I use the firebug for debugging and find one strange thing. The form in the div doesn't contain the following the first time (The content of the whole form page is returned asynchronously). script type=text/javascript dojo.require(dojo.widget.Tooltip); dojo.require(dojo.fx.html); /script But the form returned by the JavaScript contains it. Is this what make the form doesn't work in AJAX? Why is this block of code provided? Musachy Barroso wrote: Scripts in the html returned will be executed (script.../script) http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html#AjaxandJavaScriptRecipes-ExecuteJavaScriptinthereturnedcontent musachy On 6/20/07, FanCo [EMAIL PROTECTED] wrote: I didn't set the executeScripts attribute for the DIV. So the default value should be false. What is the function of this attribute if it is true? newton.dave wrote: Does your s:div.../ have executeScripts=true? d. --- FanCo [EMAIL PROTECTED] wrote: I am developing a web page which contains two layouts (left right). On the left side, there are some buttons. And the right side, it is a DIV which use s:div/ to create. It will invoke the JavaScript to send a request to one specific S2 action and updates the div with the return page when click the button. The updated page on the right side is always a form containing some fields. I want to send the form with AJAX without refresh the whole page. The JavaScript is using the dojo.io.bind() to send an asynchronous request to S2 action to obtain the web page. Then use the callback to update the DIV. It works fine with the JavaScript to update the DIV. My problem is the AJAX of the form in the updated page doesn’t work. When I click the submit button, it works like the normal form and refresh the whole page. The code of the form is something like the following: struts:head theme=ajax/ …… struts:form method=post id=testForm action=update theme=ajax TABLE tr tdstruts:textfield name=descBean.name//td /tr tr tdstruts:textfield name=descBean.address//td /tr tr td struts:submit value=Save align=left targets=updateDiv/ /td /tr /table /struts:form And the JavaScript is the following: function Connector(updateTargetArray){ // the ids of the target div this.targetsArray = updateTargetArray; } Connector.prototype.send = function(location){ dojo.io.bind({ url: location, handle: dojo.lang.hitch(this, this.bindHandler), mimetype: text/html }); } Connector.prototype.bindHandler = function(type, data, e) { if(type == load) { this.setContent(data); } } Connector.prototype.setContent = function(text){ if(this.targetsArray) { if (this.targetsArray instanceof Array){ for( var i=0; ithis.targetsArray.length; i++){ var node = dojo.byId(this.targetsArray [i]); node.innerHTML = text; } } else { var node = dojo.byId(this.targetsArray); node.innerHTML = text; } } The onClick event of the button will invoke the Connector.send(location) to send the request. The form code works fine in an individual page. I am not quite sure which part is wrong. Does anyone can help me? Thank you so much!~~~ -- View this message in context: http://www.nabble.com/Ajax-form-submission-doesn%27t-work-after-the-DIV-is-updated-tf3952031.html#a11212235 Sent from the Struts - User mailing list archive at Nabble.com.
Re: Struts 2 + Spring 2 + DAO + Hibernate
I found this article very useful: Developing J2EE Applications Using Hibernate Annotations and Spring MVC http://www.developer.com/java/ent/article.php/10933_3577101_1 On 6/19/07, hezjing [EMAIL PROTECTED] wrote: Hi! What is the difference between a Model object and DAO? In Struts 2 + Spring 2 + JPA + AJAX tutorial, we have an annotated quickstart.model.Person class. Do we still require Person class say, if we create a PersonDao? I'm trying to figure out how to implement Struts 2 + Spring 2 + DAO + Hibernate. -- Hez -- Hez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to invoke actions in different configuration packages
Hi! When we have the Struts configuration below: package name=person extends=struts-default action name=list method=execute class=personAction resultpages/persons.jsp/result /action /package We can invoke the action by /list.action. Why do we want to create a package like the above? But can we have multiple packages like the following? package name=person extends=struts-default action name=list method=execute class=personAction resultpages/persons.jsp/result /action /package package name=product extends=struts-default action name=list method=execute class=productAction resultpages/products.jsp/result /action /package How do we invoke the list action for person and product? -- Hez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
答复: How to invoke actions in dif ferent configuration packages
You should add a name space for person and product package, as following: package name=person extends=struts-default namespace=/person action name=list method=execute class=personAction resultpages/persons.jsp/result /action /package package name=product extends=struts-default namespace=/product action name=list method=execute class=productAction resultpages/products.jsp/result /action /package And invoke action using /person/list.action, /product/list.action. 陈仕兵 GIMS, IT Application Development Great Eastern Life Assurance (China) Co. Ltd. Tel: 86-023-6805-3128 Fax: 86-023-68053154 Mbl: 86-023-66101533 -邮件原件- 发件人: hezjing [mailto:[EMAIL PROTECTED] 发送时间: 2007年6月21日 12:57 收件人: struts-users 主题: How to invoke actions in different configuration packages Hi! When we have the Struts configuration below: package name=person extends=struts-default action name=list method=execute class=personAction resultpages/persons.jsp/result /action /package We can invoke the action by /list.action. Why do we want to create a package like the above? But can we have multiple packages like the following? package name=person extends=struts-default action name=list method=execute class=personAction resultpages/persons.jsp/result /action /package package name=product extends=struts-default action name=list method=execute class=productAction resultpages/products.jsp/result /action /package How do we invoke the list action for person and product? -- Hez - 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]