retrieve action name
how can i retrieve the action name from request -- View this message in context: http://www.nabble.com/retrieve-action-name-tp19326279p19326279.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: retrieve action name
In what you want to get the action name? If from an interceptor, public String intercept(ActionInvocation actionInvocation) throws Exception { /* Requested action name */ String requestedAction = actionInvocation.getInvocationContext().getName(); // other code } Regards, ManiKanta attiaoui wrote: how can i retrieve the action name from request ** DISCLAIMER ** Information contained and transmitted by this E-MAIL is proprietary to Sify Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail notify us immediately at [EMAIL PROTECTED]
Re: retrieve action name
If from action class or some other class, can use the below one. ActionContext.getContext().getName() Regards, ManiKanta ManiKanta G wrote: In what you want to get the action name? If from an interceptor, public String intercept(ActionInvocation actionInvocation) throws Exception { /* Requested action name */ String requestedAction = actionInvocation.getInvocationContext().getName(); // other code } Regards, ManiKanta attiaoui wrote: how can i retrieve the action name from request ** DISCLAIMER ** Information contained and transmitted by this E-MAIL is proprietary to Sify Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail notify us immediately at [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Exception invoking method destroy on redeploy
Hello! I´m having troble whenever I redeploy my Struts 2 application on our Jboss server 4.2.1. I have to stop the server, reploy the application and then restart the server. I always get this same stacktrace. Anyone had the same problem? What can I do to work around this problem? See stacktrace below. 10:58:01,078 ERROR [BaseModelMBean] Exception invoking method destroy java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:257) at org.apache.struts2.dispatcher.FilterDispatcher.destroy(FilterDispatcher.java:221) at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:332) at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3755) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4515) at org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1134) at org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4615) 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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297) at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:175) at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104) at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375) at org.jboss.web.WebModule.startModule(WebModule.java:83) at org.jboss.web.WebModule.startService(WebModule.java:61) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:417) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy45.start(Unknown Source) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466) at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97) at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238) at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93) at
Struts2 + Dojo 0.4 + unbeforeunload problem
Hi!! If I have the following code in a jspx loaded via s:div, when I go to another page (also loaded via s:div) the onbeforeunload event is not triggered. It is only triggered when the page is not loaded using ajax. What can I do to make it works both when the page is downloaded at all from server and when only a part is using ajax (using s:div tag)? jsp:root xmlns=http://www.w3.org/1999/xhtml; xmlns:jsp=http://java.sun.com/JSP/Page; xmlns:fmt=http://java.sun.com/jsp/jstl/fmt; xmlns:c=http://java.sun.com/jsp/jstl/core; xmlns:s=/struts-tags xmlns:scheduler=/scheduler-html.tld version=2.0 script type=text/javascript onbeforeunload = function() { if (formIsDirty(document.forms[1])) { return confirm('Unsaved changes. Do you want to continue?'); } } /script s:form id=editDataSource name=editDataSource theme=ajax action=UpdateTagDataSource method=POST ... /s:form /jsp:root Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] s:select and Integer lists
Hi I have a form It requires the user select year and month of birth I have a little class Month that has getters and setters for monthNo and monthName This works perfectly when the months list is exposed to the ValueStack in the action ( ListMonth months ...) s:select label=Month of birth name=mob list=months listKey=monthNo listValue=monthName required=true/ I also have a List of Integers, it's a configurable list loaded on the fly so it's not fixed it's exposed to the ValueStack in the action (ListInteger years ...) and I know it's populated and I want to do this s:select label=Year of birth name=yob list=years listKey=intValue listValue=intValue required=true/ but of course it doesn't work, I've tried all sorts of things without luck (there is no 'getValue' or 'getIntValue' on Integer) I'm thinking I may have to wrap the Integer to get this to work ... is there a way to do this ??? many TIAs Lyallex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] s:select and Integer lists
s:select label=Year of birth name=yob list=years listKey=intValue listValue=intValue required=true/ Try intValue() or %{intValue()} or don't specify listKey and listValue Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] s:select and Integer lists
2008/9/5 Lukasz Lenart [EMAIL PROTECTED]: s:select label=Year of birth name=yob list=years listKey=intValue listValue=intValue required=true/ ... or don't specify listKey and listValue Dave and Lukasz Thanks, it works, no idea how just yet, it must be those 'intelligent defaults' I keep reading about ... Lyallex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Stream Windows Executable From Linux Machine
Quick question for anyone who's tried this before. I've got a windows executable created using NSIS from a wrapped jar file. I've got the following Stream Result for use in downloading it. When it's on a windows machine it works fine, but when I transfer everything to Linux the file is corrupt once downloaded. result name= Trial_90 type=stream param name=contentTypeapplication/octet-stream/param param name=contentLength43665667/param param name=inputNameinputStream/param param name=contentDispositionattachment; filename= setup.exe/param param name=bufferSize2048/param /result I can FTP directly to the Linux machine and download the same file and it works fine so I know there is nothing wrong with the file it must be somehow getting corrupted during the streaming process. Has anyone had this problem and if so how did you fix it? Geffrey Caruso Senior Software Engineer MobilVox, Inc http://www.mobilvox.com ( (724) 349-3339 x320
Re: Stream Windows Executable From Linux Machine
filename= setup.exe is there an space there? (try removing it) what you mean by corrupt? 2008/9/5, Geffrey Caruso [EMAIL PROTECTED]: Quick question for anyone who's tried this before. I've got a windows executable created using NSIS from a wrapped jar file. I've got the following Stream Result for use in downloading it. When it's on a windows machine it works fine, but when I transfer everything to Linux the file is corrupt once downloaded. result name= Trial_90 type=stream param name=contentTypeapplication/octet-stream/param param name=contentLength43665667/param param name=inputNameinputStream/param param name=contentDispositionattachment; filename= setup.exe/param param name=bufferSize2048/param /result I can FTP directly to the Linux machine and download the same file and it works fine so I know there is nothing wrong with the file it must be somehow getting corrupted during the streaming process. Has anyone had this problem and if so how did you fix it? Geffrey Caruso Senior Software Engineer MobilVox, Inc http://www.mobilvox.com ( (724) 349-3339 x320 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Stream Windows Executable From Linux Machine
I actually figured it out, I had to remove the contentLength parameter from the results XML. After I did that it started working fine on Linux. -Original Message- From: Gabriel Belingueres [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2008 10:15 AM To: Struts Users Mailing List Subject: Re: Stream Windows Executable From Linux Machine filename= setup.exe is there an space there? (try removing it) what you mean by corrupt? 2008/9/5, Geffrey Caruso [EMAIL PROTECTED]: Quick question for anyone who's tried this before. I've got a windows executable created using NSIS from a wrapped jar file. I've got the following Stream Result for use in downloading it. When it's on a windows machine it works fine, but when I transfer everything to Linux the file is corrupt once downloaded. result name= Trial_90 type=stream param name=contentTypeapplication/octet-stream/param param name=contentLength43665667/param param name=inputNameinputStream/param param name=contentDispositionattachment; filename= setup.exe/param param name=bufferSize2048/param /result I can FTP directly to the Linux machine and download the same file and it works fine so I know there is nothing wrong with the file it must be somehow getting corrupted during the streaming process. Has anyone had this problem and if so how did you fix it? Geffrey Caruso Senior Software Engineer MobilVox, Inc http://www.mobilvox.com ( (724) 349-3339 x320 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts 1.0.2, Maps and complex, dynamic forms
Struts gurus Help. But allow me to head off any discussion about Struts versions, etc. It is suffice to say the following: http://struts.apache.org/1.0.2/ is bookmarked by every developer on the team and the application is one that is highly active and used by millions of users. Upgrading the JAR and action classes cannot be done at this time. Laugh if you must, but please help. :) We have a form that has a dynamic number of rows based on the selection of items on a previous page. The selection updates a boolean field in a Map keyed by transaction numbers: key = VO The key is a string that looks like 9876782. The VO object is pretty standard for a VO... fields, accessors, mutators, etc. The second page of the form looks like this, abridged: Date Cost Date of Cost Type of Cost ++ +--+ 9/3/08|| | | 0 Personal 0 Business ++ +--+ ++ +--+ 9/4/08|| | | 0 Personal 0 Business ++ +--+ The number of rows are dynamic. So how do I get the Map updated on submit? I'm currently using the logic:iterate tag to some effectiveness but not on the updating of the Map'd VOs on submit. Here's some code: logic:present name=transBean logic:iterate indexId=ctr id=transItem name=transBean property=transactions bean:define id=item name=transItem property=value type=com.mysite.transactions.TransVO/ % boolean checked = item.getIsSelectedTransaction(); % % bandcount++; if(item.getIsSelectedTransaction()) { % tr class=%= (bandcount%2==1 ? bandcolor : bandcolor2)%/p td class=transaction align=left valign=topbean:write name=transItem property=value.transDate//td td class=transaction align=left valign=topbean:write name=transItem property=value.postDate//td td class=transaction align=left valign=topbean:write name=transItem property=value.description//td td class=transaction align=left valign=topbean:write name=transItem property=value.purchasAmount//td td class=transaction align=left valign=top valign=bottombean:write name=transItem property=value.amount / /td td class=transaction align=left valign=topbean:write name=transItem property=value.travelDate //td td class=transaction align=left valign=top NOWRAP input type=radio name='%=transactions[ + ctr + ].value.transtype%' value=B %=(checked)?checked:% / strongBusiness/strong br / input type=radio name='%=transactions[ + ctr + ].value.transtype%' value=P %=(checked)?checked:% / strongPersonal/strong /td /tr % } % /logic:iterate /logic:present I've looked very closely at the following documentation: http://struts.apache.org/1.x/struts-taglib/indexedprops.html And I feel I'm very close, but just not quite there. There's a trick here, and it cannot be the indexed attribute. Remember, v1.0.2 did not have this support. It was not native until v1.1 (or so it seems) and updating/patching the jar is not an option at this time. Many Thanks! I look forward to any help on solving this puzzle. Regards, Tim Barclays www.barclaycardus.com This e-mail and any files transmitted with it may contain confidential and/or proprietary information. It is intended solely for the use of the individual or entity who is the intended recipient. Unauthorized use of this information is prohibited. If you have received this in error, please contact the sender by replying to this message and delete this material from any system it may be on.
Re: Stream Windows Executable From Linux Machine
Interesting. Never used myself the contentLength parameter before. You may want trying to provide a hint of the attached file size by writing it this way: param name=contentDispositionattachment; filename=setup.exe; size=43665667/param 2008/9/5, Geffrey Caruso [EMAIL PROTECTED]: I actually figured it out, I had to remove the contentLength parameter from the results XML. After I did that it started working fine on Linux. -Original Message- From: Gabriel Belingueres [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2008 10:15 AM To: Struts Users Mailing List Subject: Re: Stream Windows Executable From Linux Machine filename= setup.exe is there an space there? (try removing it) what you mean by corrupt? 2008/9/5, Geffrey Caruso [EMAIL PROTECTED]: Quick question for anyone who's tried this before. I've got a windows executable created using NSIS from a wrapped jar file. I've got the following Stream Result for use in downloading it. When it's on a windows machine it works fine, but when I transfer everything to Linux the file is corrupt once downloaded. result name= Trial_90 type=stream param name=contentTypeapplication/octet-stream/param param name=contentLength43665667/param param name=inputNameinputStream/param param name=contentDispositionattachment; filename= setup.exe/param param name=bufferSize2048/param /result I can FTP directly to the Linux machine and download the same file and it works fine so I know there is nothing wrong with the file it must be somehow getting corrupted during the streaming process. Has anyone had this problem and if so how did you fix it? Geffrey Caruso Senior Software Engineer MobilVox, Inc http://www.mobilvox.com ( (724) 349-3339 x320 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Submit button with no form
Hi, How can I render a button in a jsp page to call an action directly with no form? I just want to call an action from a button in a jsp page, no links. I will use Dispatch_Action so how should I name it in the strus-config file? I understand Dispatch Action theory ;) Any ideas would be appreciated. Thanks in advance,
REST plug-in Tiles
Does the plug-in support tiles definition names in its search? -- View this message in context: http://www.nabble.com/REST-plug-in---Tiles-tp19339428p19339428.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] s:select and Integer lists
If getting one of these tags to work requires either leaving an attribute off or intValue() or %{intValue()} Should it be referred to as intelligent? I seriously think these crazy S2 tags are causing new Struts 2 users more pain than they are worth. Lyallex wrote: 2008/9/5 Lukasz Lenart [EMAIL PROTECTED]: s:select label=Year of birth name=yob list=years listKey=intValue listValue=intValue required=true/ ... or don't specify listKey and listValue Dave and Lukasz Thanks, it works, no idea how just yet, it must be those 'intelligent defaults' I keep reading about ... Lyallex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2--%3Cs%3Aselect%3E-and-Integer-lists-tp19329661p19339564.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] s:select and Integer lists
--- On Fri, 9/5/08, stanlick wrote: If getting one of these tags to work requires either leaving an attribute off It's a list of non-composite objects. Why should the select tag require a non-required attribute that can't provide any useful information? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REST plug-in Tiles
stanlick wrote: Does the plug-in support tiles definition names in its search? No. It was discussed briefly once in srtuts-dev that the codebehind plugin tiles plugin together could support tiles naming conventions. eg. if OrderController.show() is invoked then search for a tile called (prefix.order-show). I think that would be generally useful whether used with REST or not. However the main reason I use tiles results is because they're easy to override (eg. by theme and or locale). When I started to look deeper into the this I saw the codebehind or convention plugin could easily do the same when selecting results...so I've start to ween myself off tiles results and try to head towards zero configuration by following the convention. I've found I still need a lot of @Result annotations though so its not there yet. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Display tag : how to format the page number, Please help
Hello to all I am using the display tag to show the employee data , it showing the page banner in the following style. 25 items found, displaying 1 to 10 [first] [previous] 1 2 3 [next][last] I want give it a look of google page banner or any aother type as we see in the many sites. For the I modified the displaytag.properties file and include the following . paging.banner.full=div class=pagelinks align=righta href={1}img src= images/first.gif/aa href={2}img src= images/prev.gif/a{0}a href={3}img src= images/next.gif/aa href={4}img src= images/last.gif/a/div paging.banner.first=div class=pagelinks align=righta href={1}img src=images/first.gif/aa href={2}img src=images/previous.gif/a {0} a href={3}img src=static/images/next.gif/aa href={4}img src=images/last.gif/a/div paging.banner.last=div class=pagelinks align=righta href={1}img src=images/first.gif/aa href={2}img src=images/previous.gif/a {0} a href={3}img src=images/next.gif/aa href={4}img src=images/last.gif/a/div export.banner=div class=pagelinks align=right{0}/div please help me thanks in advance