Another change in the wiki-docs:
This is mainly to Musachy Barroso or anyone interested: Hi. Where in the wiki is the introduction that used to be in the Ajax Tagsin the 2.0.9 docs? I've added a comment on the http://cwiki.apache.org/confluence/display/WW/Ajax+Tags But I see that the 'common attributes' section is not there anymore. Is it somewhere else or deleted? -- - Marcos H. You must be the change you wish to see in the world ~ Gandhi
Re: Strange scenario
I can add another bit of info. This action employs the execAndWait interceptor. On 10/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I have a S2 application deployed to an ISP and once in a while I receive > this exception and the server has to be restarted to recover. I have tested > the stuffing out of the application and cannot get it to fail on the > desktop. It appears to be rooted in OGNL. > > > Scott > > > DEBUG TP-Processor3 com.strutsschool.tiles.controllers.ListMembers - list > placed in request scope > WARN TP-Processor5 com.opensymphony.xwork2.util.OgnlValueStack - Caught an > exception while evaluating expression 'hitCount' against value stack > Caught an Ognl exception while getting property hitCount - Class: > ognl.OgnlRuntime > File: OgnlRuntime.java > Method: getMethodValue > Line: 935 - ognl/OgnlRuntime.java:935:-1 > at com.opensymphony.xwork2.util.CompoundRootAccessor.getProperty ( > CompoundRootAccessor.java:106) > at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1643) > at ognl.ASTProperty.getValueBody(ASTProperty.java:92) > at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) > at ognl.SimpleNode.getValue(SimpleNode.java:210) > at ognl.Ognl.getValue(Ognl.java:333) > at com.opensymphony.xwork2.util.OgnlUtil.getValue(OgnlUtil.java:194) > at com.opensymphony.xwork2.util.OgnlValueStack.findValue ( > OgnlValueStack.java:238) > at org.apache.struts2.components.Property.start(Property.java:136) > at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag( > ComponentTagSupport.java:54) > at > org.apache.jsp.tiles.samples.samplesBody_jsp._jspx_meth_s_property_0 ( > org.apache.jsp.tiles.samples.samplesBody_jsp:97) > at org.apache.jsp.tiles.samples.samplesBody_jsp._jspService( > org.apache.jsp.tiles.samples.samplesBody_jsp:69) > at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:97) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > at org.apache.jasper.servlet.JspServletWrapper.service( > JspServletWrapper.java:332) > at org.apache.jasper.servlet.JspServlet.serviceJspFile ( > JspServlet.java:314) > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter ( > ApplicationFilterChain.java:252) > at org.apache.catalina.core.ApplicationFilterChain.doFilter( > ApplicationFilterChain.java:173) > at org.apache.catalina.core.ApplicationDispatcher.invoke( > ApplicationDispatcher.java :672) > at org.apache.catalina.core.ApplicationDispatcher.doInclude( > ApplicationDispatcher.java:574) > at org.apache.catalina.core.ApplicationDispatcher.include( > ApplicationDispatcher.java:499) > at org.apache.jasper.runtime.JspRuntimeLibrary.include ( > JspRuntimeLibrary.java:966) > at org.apache.jasper.runtime.PageContextImpl.doInclude( > PageContextImpl.java:643) > at org.apache.jasper.runtime.PageContextImpl.include( > PageContextImpl.java:637) > at sun.reflect.GeneratedMethodAccessor85.invoke (Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke( > DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.apache.tiles.jsp.context.JspUtil.doInclude (JspUtil.java:87) > at org.apache.tiles.jsp.context.JspTilesRequestContext.include( > JspTilesRequestContext.java:88) > at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch( > JspTilesRequestContext.java:82) > at org.apache.tiles.impl.BasicTilesContainer.render( > BasicTilesContainer.java:457) > at org.apache.tiles.jsp.taglib.InsertAttributeTag.render( > InsertAttributeTag.java:140) > at org.apache.tiles.jsp.taglib.InsertAttributeTag.render ( > InsertAttributeTag.java:117) > at org.apache.tiles.jsp.taglib.RenderTagSupport.execute( > RenderTagSupport.java:171) > at org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag( > RoleSecurityTagSupport.java:75) > at org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag( > ContainerTagSupport.java:80) > at org.apache.jsp.layouts.base_jsp._jspx_meth_tiles_insertAttribute_6( > org.apache.jsp.layouts.base_jsp:258) > at org.apache.jsp.layouts.base_jsp._jspService( > org.apache.jsp.layouts.base_jsp:72) > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) > at javax.servlet.http.HttpServlet.service(HttpServlet.java :802) > at org.apache.jasper.servlet.JspServletWrapper.service( > JspServletWrapper.java:332) > at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java > :314) > at org.apache.jasper.servlet.JspServlet.service (JspServlet.java:264) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( > ApplicationFilterChain.java:252) > at org.apache.catalina.c
Strange scenario
I have a S2 application deployed to an ISP and once in a while I receive this exception and the server has to be restarted to recover. I have tested the stuffing out of the application and cannot get it to fail on the desktop. It appears to be rooted in OGNL. Scott DEBUG TP-Processor3 com.strutsschool.tiles.controllers.ListMembers - list placed in request scope WARN TP-Processor5 com.opensymphony.xwork2.util.OgnlValueStack - Caught an exception while evaluating expression 'hitCount' against value stack Caught an Ognl exception while getting property hitCount - Class: ognl.OgnlRuntime File: OgnlRuntime.java Method: getMethodValue Line: 935 - ognl/OgnlRuntime.java:935:-1 at com.opensymphony.xwork2.util.CompoundRootAccessor.getProperty( CompoundRootAccessor.java:106) at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1643) at ognl.ASTProperty.getValueBody(ASTProperty.java:92) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) at ognl.SimpleNode.getValue(SimpleNode.java:210) at ognl.Ognl.getValue(Ognl.java:333) at com.opensymphony.xwork2.util.OgnlUtil.getValue(OgnlUtil.java:194) at com.opensymphony.xwork2.util.OgnlValueStack.findValue( OgnlValueStack.java:238) at org.apache.struts2.components.Property.start(Property.java:136) at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag( ComponentTagSupport.java:54) at org.apache.jsp.tiles.samples.samplesBody_jsp._jspx_meth_s_property_0( org.apache.jsp.tiles.samples.samplesBody_jsp:97) at org.apache.jsp.tiles.samples.samplesBody_jsp._jspService( org.apache.jsp.tiles.samples.samplesBody_jsp:69) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:332) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java :314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke( ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.doInclude( ApplicationDispatcher.java:574) at org.apache.catalina.core.ApplicationDispatcher.include( ApplicationDispatcher.java:499) at org.apache.jasper.runtime.JspRuntimeLibrary.include( JspRuntimeLibrary.java:966) at org.apache.jasper.runtime.PageContextImpl.doInclude( PageContextImpl.java:643) at org.apache.jasper.runtime.PageContextImpl.include( PageContextImpl.java:637) at sun.reflect.GeneratedMethodAccessor85.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tiles.jsp.context.JspUtil.doInclude(JspUtil.java:87) at org.apache.tiles.jsp.context.JspTilesRequestContext.include( JspTilesRequestContext.java:88) at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch( JspTilesRequestContext.java:82) at org.apache.tiles.impl.BasicTilesContainer.render( BasicTilesContainer.java:457) at org.apache.tiles.jsp.taglib.InsertAttributeTag.render( InsertAttributeTag.java:140) at org.apache.tiles.jsp.taglib.InsertAttributeTag.render( InsertAttributeTag.java:117) at org.apache.tiles.jsp.taglib.RenderTagSupport.execute( RenderTagSupport.java:171) at org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag( RoleSecurityTagSupport.java:75) at org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag( ContainerTagSupport.java:80) at org.apache.jsp.layouts.base_jsp._jspx_meth_tiles_insertAttribute_6( org.apache.jsp.layouts.base_jsp:258) at org.apache.jsp.layouts.base_jsp._jspService( org.apache.jsp.layouts.base_jsp:72) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:332) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java :314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke( ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.processRequest( ApplicationDispatcher.java:463) at org.apache.catalina.core.ApplicationDispatcher.doForward( ApplicationD
Re: [s2] select tag not setting parameter
What does the generated HTML look like? Perhaps the county objects don't have a value for 'id'? L. Kevin Wade wrote: According to my sniffer, what's sent on the wire looks like this: lastName=smith&firstName=john&county= which makes sense since the logging output of struts 2 says this: com.opensymphony.xwork2.interceptor.ParametersInterceptor - Setting params county => [ ] firstName => [ john ] lastName => [ smith ] So... county is null/empty. But why? Obviously the select tag and the form know that I want it to set the "county" field in my resulting action class. It's handing the "lastName" and "firstName" fields just fine (via the textfield tags). Am I doing something wrong in the select tag? The jsp form that displays my list of counties via the select tag *looks* right (in that the list of counties -- all strings -- looks good). But, no matter which entry (county) I select from the list, no county is being passed on submit. Any ideas at all what I'm doing wrong? This is my first attempt at using the select tag. Here's my usage again: Again, the form's select tag seems to be grabbing the entries from my list (a java.util.List called "counties") ok and building a correct looking drop-down html select element. But I can't get the tag to set "county" to... well, anything at all, on submit. BTW, I'm using 2.0.9. Kevin On Oct 12, 2007, at 4:55 PM, Dave Newton wrote: What's being sent on the wire? (Like, is there a "search.county" param being sent, etc.) d. --- Kevin Wade <[EMAIL PROTECTED]> wrote: Bump. Any one have any ideas at all? I'm sure I'm just doing something incorrect w/ the select tag but just can't see it. Kevin On Oct 8, 2007, at 4:59 PM, Kevin Wade wrote: I'm having difficulty with a struts 2 form (jsp) that includes the use of a select tag. In short, I can't seem to get the select tag to set the parameter when submitted. Here's the scenario. My form (for searching by last name, first name, and "county" fields) looks like this: name="lastName" /> name="firstName"/> In the calling action, there is a List called "counties" with a getCounties() method. So, the input form looks right. There is a nice drop-down box w/ a long list of counties. So far, so good. But, when I submit the form (e.g. first name = "john", last name = "smith", county chosen from select drop-down list = "orange") I get nothing in the "county" field of the "search" action. "lastName" looks fine. "firstName" is fine. But, regardless of which item I select in the list of counties, the county parameter doesn't get set. I definitely have setters for firstName, lastName, and county in the search action: public void setCounty(String county) { this.county = county; } In fact, here's a debug message from struts2 showing what the ParametersInterceptor is actually setting: DEBUG com.opensymphony.xwork2.interceptor.ParametersInterceptor - Setting params county => [ ] firstName => [ john ] lastName => [ smith ] I can't figure out what I'm doing wrong that causes county to be empty. Is it something I'm doing incorrectly with the List? kwade - 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]
problem displaying images
Hello! I have 3 images to display and to do that in my jsp page I have the following code I am using struts 1.2.9. I have GetBarChartAction class and GetPieChartAction class implemented and properly configured. In the execute methods, I am using JfreeChart to create the images dynamically. I have notice sometimes, not always, the Action class's execute method doesn't get invoked and as a result the image doesn't get displayed. Any idea why the Action classes don't get executed sometimes? If I delete the browser cash, it started to work again. How do I solve this problem? Thanks, NR - Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
Re: [s2] select tag not setting parameter
Just as a debug thought: what happens when you fill the list parameter with a couple of counties/value pairs by hand? On the other hand, does the generated HTML have a full list of values aside of the counties name list you are looking in the drop-down box? On 10/12/07, Kevin Wade <[EMAIL PROTECTED]> wrote: > > According to my sniffer, what's sent on the wire looks like this: > lastName=smith&firstName=john&county= > > which makes sense since the logging output of struts 2 says this: > com.opensymphony.xwork2.interceptor.ParametersInterceptor - Setting > params county => [ ] firstName => [ john ] lastName => [ smith ] > > So... county is null/empty. But why? Obviously the select tag and the > form know that I want it to set the "county" field in my resulting > action class. It's handing the "lastName" and "firstName" fields > just fine (via the textfield tags). Am I doing something wrong in > the select tag? The jsp form that displays my list of counties via > the select tag *looks* right (in that the list of counties -- all > strings -- looks good). But, no matter which entry (county) I select > from the list, no county is being passed on submit. > > Any ideas at all what I'm doing wrong? This is my first attempt at > using the select tag. Here's my usage again: > > > > > > name="county" > list="counties" > listKey="id" > listValue="name" > size="1" > /> > > > > > Again, the form's select tag seems to be grabbing the entries from my > list (a java.util.List called "counties") ok and building a correct > looking drop-down html select element. But I can't get the tag to > set "county" to... well, anything at all, on submit. > > BTW, I'm using 2.0.9. > > Kevin > > > > On Oct 12, 2007, at 4:55 PM, Dave Newton wrote: > > > What's being sent on the wire? (Like, is there a > > "search.county" param being sent, etc.) > > > > d. > > > > --- Kevin Wade <[EMAIL PROTECTED]> wrote: > > > >> Bump. Any one have any ideas at all? I'm sure I'm > >> just doing > >> something incorrect w/ the select tag but just can't > >> see it. > >> > >> Kevin > >> > >> On Oct 8, 2007, at 4:59 PM, Kevin Wade wrote: > >> > >>> I'm having difficulty with a struts 2 form (jsp) > >> that includes the > >>> use of a select tag. In short, I can't seem to > >> get the select tag > >>> to set the parameter when submitted. > >>> > >>> Here's the scenario. My form (for searching by > >> last name, first > >>> name, and "county" fields) looks like this: > >>> > >>> > >>> >> name="lastName" /> > >>> >> name="firstName"/> > >>> >>> name="county" > >>> list="counties" > >>> listKey="id" > >>> listValue="name" > >>> size="1" > >>> /> > >>> > >>> > >>> > >>> In the calling action, there is a List called > >> "counties" with a > >>> getCounties() method. So, the input form looks > >> right. There is a > >>> nice drop-down box w/ a long list of counties. So > >> far, so good. > >>> > >>> But, when I submit the form (e.g. first name = > >> "john", last name = > >>> "smith", county chosen from select drop-down list > >> = "orange") I get > >>> nothing in the "county" field of the "search" > >> action. "lastName" > >>> looks fine. "firstName" is fine. But, regardless > >> of which item I > >>> select in the list of counties, the county > >> parameter doesn't get > >>> set. I definitely have setters for firstName, > >> lastName, and > >>> county in the search action: > >>> > >>> public void setCounty(String county) { > >>> this.county = county; > >>> } > >>> > >>> In fact, here's a debug message from struts2 > >> showing what the > >>> ParametersInterceptor is actually setting: > >>> > >>> DEBUG > >> > > com.opensymphony.xwork2.interceptor.ParametersInterceptor > >> - > >>> Setting params county => [ ] firstName => [ john > >> ] lastName => > >>> [ smith ] > >>> > >>> I can't figure out what I'm doing wrong that > >> causes county to be > >>> empty. Is it something I'm doing incorrectly with > >> the List? > >>> > >>> kwade > >> > >> > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- - Marcos H. You must be the change you wish to see in the world ~ Gandhi
notifyTopics, with parameters?
Hi everyone. I think that the whole 'notifyTopics' idea is great, but is there a way to pass a parameter with the topics? Because in javascript, when I use dojo.event.topic.publish('/topicName', param1, param2,...); I can pass to the subscribed function anything I need, but I don't see a way to do that inside an Ajax tag, to be triggered when the action succeeds like the 'notifyTopics' list. Any ideas? Thanx in advance :-)
Looping problem
I seem to to experiencing a new phenomenon! At times my sever console begins emitting this series of log statements in a never ending loop! I have to kill the pid and restart to recover. Has anyone seen this one? SEVERE: Exception invoking periodic operation: 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:3728) at org.apache.catalina.core.StandardContext.stop(StandardContext.java :4490) at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java :1097) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1203) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java :293) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent( LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.backgroundProcess( ContainerBase.java:1337) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren (ContainerBase.java:1601) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren (ContainerBase.java:1610) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run( ContainerBase.java:1590) at java.lang.Thread.run(Unknown Source) -- Scott [EMAIL PROTECTED]
Re: [s2] select tag not setting parameter
According to my sniffer, what's sent on the wire looks like this: lastName=smith&firstName=john&county= which makes sense since the logging output of struts 2 says this: com.opensymphony.xwork2.interceptor.ParametersInterceptor - Setting params county => [ ] firstName => [ john ] lastName => [ smith ] So... county is null/empty. But why? Obviously the select tag and the form know that I want it to set the "county" field in my resulting action class. It's handing the "lastName" and "firstName" fields just fine (via the textfield tags). Am I doing something wrong in the select tag? The jsp form that displays my list of counties via the select tag *looks* right (in that the list of counties -- all strings -- looks good). But, no matter which entry (county) I select from the list, no county is being passed on submit. Any ideas at all what I'm doing wrong? This is my first attempt at using the select tag. Here's my usage again: Again, the form's select tag seems to be grabbing the entries from my list (a java.util.List called "counties") ok and building a correct looking drop-down html select element. But I can't get the tag to set "county" to... well, anything at all, on submit. BTW, I'm using 2.0.9. Kevin On Oct 12, 2007, at 4:55 PM, Dave Newton wrote: What's being sent on the wire? (Like, is there a "search.county" param being sent, etc.) d. --- Kevin Wade <[EMAIL PROTECTED]> wrote: Bump. Any one have any ideas at all? I'm sure I'm just doing something incorrect w/ the select tag but just can't see it. Kevin On Oct 8, 2007, at 4:59 PM, Kevin Wade wrote: I'm having difficulty with a struts 2 form (jsp) that includes the use of a select tag. In short, I can't seem to get the select tag to set the parameter when submitted. Here's the scenario. My form (for searching by last name, first name, and "county" fields) looks like this: name="lastName" /> name="firstName"/> In the calling action, there is a List called "counties" with a getCounties() method. So, the input form looks right. There is a nice drop-down box w/ a long list of counties. So far, so good. But, when I submit the form (e.g. first name = "john", last name = "smith", county chosen from select drop-down list = "orange") I get nothing in the "county" field of the "search" action. "lastName" looks fine. "firstName" is fine. But, regardless of which item I select in the list of counties, the county parameter doesn't get set. I definitely have setters for firstName, lastName, and county in the search action: public void setCounty(String county) { this.county = county; } In fact, here's a debug message from struts2 showing what the ParametersInterceptor is actually setting: DEBUG com.opensymphony.xwork2.interceptor.ParametersInterceptor - Setting params county => [ ] firstName => [ john ] lastName => [ smith ] I can't figure out what I'm doing wrong that causes county to be empty. Is it something I'm doing incorrectly with the List? kwade - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2] select tag not setting parameter
What's being sent on the wire? (Like, is there a "search.county" param being sent, etc.) d. --- Kevin Wade <[EMAIL PROTECTED]> wrote: > Bump. Any one have any ideas at all? I'm sure I'm > just doing > something incorrect w/ the select tag but just can't > see it. > > Kevin > > On Oct 8, 2007, at 4:59 PM, Kevin Wade wrote: > > > I'm having difficulty with a struts 2 form (jsp) > that includes the > > use of a select tag. In short, I can't seem to > get the select tag > > to set the parameter when submitted. > > > > Here's the scenario. My form (for searching by > last name, first > > name, and "county" fields) looks like this: > > > > > > name="lastName" /> > > name="firstName"/> > > > name="county" > > list="counties" > > listKey="id" > > listValue="name" > > size="1" > > /> > > > > > > > > In the calling action, there is a List called > "counties" with a > > getCounties() method. So, the input form looks > right. There is a > > nice drop-down box w/ a long list of counties. So > far, so good. > > > > But, when I submit the form (e.g. first name = > "john", last name = > > "smith", county chosen from select drop-down list > = "orange") I get > > nothing in the "county" field of the "search" > action. "lastName" > > looks fine. "firstName" is fine. But, regardless > of which item I > > select in the list of counties, the county > parameter doesn't get > > set. I definitely have setters for firstName, > lastName, and > > county in the search action: > > > > public void setCounty(String county) { > > this.county = county; > > } > > > > In fact, here's a debug message from struts2 > showing what the > > ParametersInterceptor is actually setting: > > > > DEBUG > com.opensymphony.xwork2.interceptor.ParametersInterceptor > - > > Setting params county => [ ] firstName => [ john > ] lastName => > > [ smith ] > > > > I can't figure out what I'm doing wrong that > causes county to be > > empty. Is it something I'm doing incorrectly with > the List? > > > > kwade > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2] select tag not setting parameter
Bump. Any one have any ideas at all? I'm sure I'm just doing something incorrect w/ the select tag but just can't see it. Kevin On Oct 8, 2007, at 4:59 PM, Kevin Wade wrote: I'm having difficulty with a struts 2 form (jsp) that includes the use of a select tag. In short, I can't seem to get the select tag to set the parameter when submitted. Here's the scenario. My form (for searching by last name, first name, and "county" fields) looks like this: In the calling action, there is a List called "counties" with a getCounties() method. So, the input form looks right. There is a nice drop-down box w/ a long list of counties. So far, so good. But, when I submit the form (e.g. first name = "john", last name = "smith", county chosen from select drop-down list = "orange") I get nothing in the "county" field of the "search" action. "lastName" looks fine. "firstName" is fine. But, regardless of which item I select in the list of counties, the county parameter doesn't get set. I definitely have setters for firstName, lastName, and county in the search action: public void setCounty(String county) { this.county = county; } In fact, here's a debug message from struts2 showing what the ParametersInterceptor is actually setting: DEBUG com.opensymphony.xwork2.interceptor.ParametersInterceptor - Setting params county => [ ] firstName => [ john ] lastName => [ smith ] I can't figure out what I'm doing wrong that causes county to be empty. Is it something I'm doing incorrectly with the List? kwade
Re: [S2] Configure Message Store Interceptor via Annotations
Hi Gunnar I wanted it to work without needing to tell it when to do its stuff. I based my changes on the requirement for displaying success messages after a redirect. The messages / errors only need to survive until the next request. So anything in the request I put into the session (in the after method) and in the before method, anything in the session, I remove and put into the request. Just like you say, works like a charm. Adam Gunnar Hillert on 12/10/07 05:15, wrote: Hi Adam, Thanks for your comments. Yes, I looked at the sources for the MessageStoreInterceptor and indeed it looks quite simple. I played around with it tonight and I made the inteceptor annotations-aware. I have added 2 method-level annotations: @StoreMessages and @RetrieveMessages This works like a charm :-) This will work for me as a start. I still need to clean it up a bitand can then send you what I have. What changes did you you? Regards, Gunnar Adam Hardy-3 wrote: Gunnar, the message store interceptor is quite lean. I have copied it and written my own version to give me the functionality I needed. Now with your comments, it seems like a prime target for further development by S2 to beef it up a bit to provide more options. Maybe we could put in a patch with both our changes, if you implemented what you need? Regards Adam Gunnar Hillert on 11/10/07 04:56, wrote: Hi, Is there a way to configure the message store interceptor via annotations? I started experimenting with the smarturls plugin for Struts 2 (http://code.google.com/p/smarturls-s2/) in order to get rid of my XML configuration but noticed that I need the message store interceptor to have success message to survive redirects. Well, it looks like the the message store interceptor does not have annotations support (bummer). But maybe is there another way to solve this issue? Thanks a lot! Gunnar Hillert - 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: Global exception handling
--- [EMAIL PROTECTED] wrote: > Once this servlet is loaded, it effects struts global > exception handling. Defined global exceptions are not > caught by struts. If I would disable load of the > servlet, global exceptions are handled normally. Does > anyone know what could cause this behavior? If you create a "do-nothing" servlet and load it on startup does the same behaviour occur? d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Global exception handling
Hi, I see some strange behavior in handling global exceptions in RAD 7.0. I load my InitSrvlet through WEB.xml (-1) to perform an app initialization from property files. Once this servlet is loaded, it effects struts global exception handling. Defined global exceptions are not caught by struts. If I would disable load of the servlet, global exceptions are handled normally. Does anyone know what could cause this behavior? Thanks, Dmitry. Please do not transmit orders or instructions regarding a UBS account by e-mail. The information provided in this e-mail or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your e-mail. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. UBS Financial Services Incorporated of Puerto Rico
RE: property from S2 in S1
I think you're looking for bean:write. -Jake -Original Message- From: Pavel Sapozhnikov [mailto:[EMAIL PROTECTED] Sent: Friday, October 12, 2007 1:25 PM To: Struts Users Mailing List Subject: s:property from S2 in S1 Hi I have a question. So in S2 you have s:property which just takes from a form and simply displays it on the page. How do you do exactly that in S1. Thanks. -- Pavel Sapozhnikov xFact, Inc [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
s:property from S2 in S1
Hi I have a question. So in S2 you have s:property which just takes from a form and simply displays it on the page. How do you do exactly that in S1. Thanks. -- Pavel Sapozhnikov xFact, Inc [EMAIL PROTECTED]
Re: [Friday] RE: Download link
Maybe where *you* are. For me it's Thursday, Saturday, and Sunday. --- Musachy Barroso <[EMAIL PROTECTED]> wrote: > Oh is it Friday already? > > musachy > > On 10/12/07, Al Sutton <[EMAIL PROTECTED]> > wrote: > > Enough to give your minds a headache? > > > > -Original Message- > > From: Dave Newton [mailto:[EMAIL PROTECTED] > > Sent: 12 October 2007 15:27 > > To: Struts Users Mailing List > > Subject: Re: [Friday] RE: Download link > > > > > > --- Al Sutton <[EMAIL PROTECTED]> wrote: > > > Coo... Can we expect double replies if the parts > of > > > the hive get separated? > > > > Yes, with the caveat that each message will > contain > > every Nth letter where N is the number of minds > > disconnected. > > > > It's all quite complicated. > > > > d. > > > > > > > - > > 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] > > > > > > > -- > "Hey you! Would you help me to carry the stone?" > Pink Floyd > > - > 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: [Friday] RE: Download link
Oh is it Friday already? musachy On 10/12/07, Al Sutton <[EMAIL PROTECTED]> wrote: > Enough to give your minds a headache? > > -Original Message- > From: Dave Newton [mailto:[EMAIL PROTECTED] > Sent: 12 October 2007 15:27 > To: Struts Users Mailing List > Subject: Re: [Friday] RE: Download link > > > --- Al Sutton <[EMAIL PROTECTED]> wrote: > > Coo... Can we expect double replies if the parts of > > the hive get separated? > > Yes, with the caveat that each message will contain > every Nth letter where N is the number of minds > disconnected. > > It's all quite complicated. > > d. > > > - > 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] > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validation errors in Action
Just stumbled on that as you replied. Thanks again. (But not for the pun ;) ) -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 12 October 2007 16:27 To: Struts Users Mailing List Subject: RE: Validation errors in Action --- Dean Pullen <[EMAIL PROTECTED]> wrote: > Is there any documentation anywhere, where I can see > how to correctly return errors in the validate > method? This is a WW article but should still be valid. Ha ha, valid, get it? http://today.java.net/pub/a/today/2006/01/19/webwork-validation.html d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Scanned by MailDefender - managed email security from intY - www.maildefender.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validation errors in Action
--- Dean Pullen <[EMAIL PROTECTED]> wrote: > Is there any documentation anywhere, where I can see > how to correctly return errors in the validate > method? This is a WW article but should still be valid. Ha ha, valid, get it? http://today.java.net/pub/a/today/2006/01/19/webwork-validation.html d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validation errors in Action
Is there any documentation anywhere, where I can see how to correctly return errors in the validate method? Cheers. -Original Message- From: Julien Leonard [mailto:[EMAIL PROTECTED] Sent: 12 October 2007 16:17 To: 'Struts Users Mailing List' Subject: RE: Validation errors in Action Hello, Why don't you use the validate() method ? Julien -Message d'origine- De : Dean Pullen [mailto:[EMAIL PROTECTED] Envoyé : vendredi 12 octobre 2007 17:13 À : Struts Users Mailing List Objet : Validation errors in Action Hi all, How do you get hold of the validation errors in an Action? Basically due to some complexity, we need to manually add an error within the prepare() method if something isn't correct. Thanks, Dean. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited. ** Ce message électronique et tous les fichiers joints ainsi que les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Scanned by MailDefender - managed email security from intY - www.maildefender.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validation errors in Action
Hello, Why don't you use the validate() method ? Julien -Message d'origine- De : Dean Pullen [mailto:[EMAIL PROTECTED] Envoyé : vendredi 12 octobre 2007 17:13 À : Struts Users Mailing List Objet : Validation errors in Action Hi all, How do you get hold of the validation errors in an Action? Basically due to some complexity, we need to manually add an error within the prepare() method if something isn't correct. Thanks, Dean. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited. ** Ce message électronique et tous les fichiers joints ainsi que les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validation errors in Action
Hi all, How do you get hold of the validation errors in an Action? Basically due to some complexity, we need to manually add an error within the prepare() method if something isn't correct. Thanks, Dean. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Friday] RE: Download link
Enough to give your minds a headache? -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 12 October 2007 15:27 To: Struts Users Mailing List Subject: Re: [Friday] RE: Download link --- Al Sutton <[EMAIL PROTECTED]> wrote: > Coo... Can we expect double replies if the parts of > the hive get separated? Yes, with the caveat that each message will contain every Nth letter where N is the number of minds disconnected. It's all quite complicated. d. - 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: [Friday] RE: Download link
--- Al Sutton <[EMAIL PROTECTED]> wrote: > Coo... Can we expect double replies if the parts of > the hive get separated? Yes, with the caveat that each message will contain every Nth letter where N is the number of minds disconnected. It's all quite complicated. d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Friday] RE: Download link
I figured this might turn into a sticky thread! The hive is buz'n now. On 10/12/07, Al Sutton <[EMAIL PROTECTED]> wrote: > > Coo... Can we expect double replies if the parts of the hive get > separated? > > --- [EMAIL PROTECTED] wrote: > > > P.S. Does d. ever sleep? Is he a coffee drinker? > > I am actually a hive-mind distributed across several continents. > > d. > > [1] > http://struts.apache.org/2.x/docs/stream-result.html > > > - > 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] > > -- Scott [EMAIL PROTECTED]
Re: Download link
Thanks Wes! I sure thought the result type stream looked like overkill for this deal! No offense to my boy d.! Just wanted to see if S2 had a "neutralizer" result to handle headers and such for any browser quirks that might be lurking. I finished the breadCrumb plugin at about 3:30 this morning and want to make it available. As soon as I get it uploaded to be downloaded and communicated to the mailing list, I'm going to bed!!! Scott On 10/12/07, Wes Wannemacher <[EMAIL PROTECTED]> wrote: > > If the file is sitting in a web-accessible directory, just use value="/path/to/file" />. To me it doesn't seem much different than > the references to imgs and other static resources. > > Do you have any business/processing logic that goes along with the > link to the file(s)? I mean, is there any reason you shouldn't treat > like any other static resource? > > -W > > On 10/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Looks promising honeycomb. However, is there a simpler way than to > write an > > action class with an inputstream for a file that is already sitting in a > web > > server folder? > > > > On 10/12/07, Dave Newton <[EMAIL PROTECTED]> wrote: > > > > > > --- [EMAIL PROTECTED] wrote: > > > > I looked for a special result type but came up > > > > empty handed! > > > > > > Is StreamResult [1] not what you're looking for? > > > > > > > P.S. Does d. ever sleep? Is he a coffee drinker? > > > > > > I am actually a hive-mind distributed across several > > > continents. > > > > > > d. > > > > > > [1] > > > http://struts.apache.org/2.x/docs/stream-result.html > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > Scott > > [EMAIL PROTECTED] > > > > > -- > Wesley Wannemacher > President, Head Engineer/Consultant > WanTii, Inc. > http://www.wantii.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Scott [EMAIL PROTECTED]
[Friday] RE: Download link
Coo... Can we expect double replies if the parts of the hive get separated? --- [EMAIL PROTECTED] wrote: > P.S. Does d. ever sleep? Is he a coffee drinker? I am actually a hive-mind distributed across several continents. d. [1] http://struts.apache.org/2.x/docs/stream-result.html - 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: Download link
If the file is sitting in a web-accessible directory, just use . To me it doesn't seem much different than the references to imgs and other static resources. Do you have any business/processing logic that goes along with the link to the file(s)? I mean, is there any reason you shouldn't treat like any other static resource? -W On 10/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Looks promising honeycomb. However, is there a simpler way than to write an > action class with an inputstream for a file that is already sitting in a web > server folder? > > On 10/12/07, Dave Newton <[EMAIL PROTECTED]> wrote: > > > > --- [EMAIL PROTECTED] wrote: > > > I looked for a special result type but came up > > > empty handed! > > > > Is StreamResult [1] not what you're looking for? > > > > > P.S. Does d. ever sleep? Is he a coffee drinker? > > > > I am actually a hive-mind distributed across several > > continents. > > > > d. > > > > [1] > > http://struts.apache.org/2.x/docs/stream-result.html > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Scott > [EMAIL PROTECTED] > -- Wesley Wannemacher President, Head Engineer/Consultant WanTii, Inc. http://www.wantii.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Download link
Looks promising honeycomb. However, is there a simpler way than to write an action class with an inputstream for a file that is already sitting in a web server folder? On 10/12/07, Dave Newton <[EMAIL PROTECTED]> wrote: > > --- [EMAIL PROTECTED] wrote: > > I looked for a special result type but came up > > empty handed! > > Is StreamResult [1] not what you're looking for? > > > P.S. Does d. ever sleep? Is he a coffee drinker? > > I am actually a hive-mind distributed across several > continents. > > d. > > [1] > http://struts.apache.org/2.x/docs/stream-result.html > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Scott [EMAIL PROTECTED]
SV: Trouble with using struts tags in freemarker files
When I try without the reference to struts-tags I get this error-message: [ WARN] 15:12:36 Can't generate HTML subscription mail; nested exception is freemarker.core.InvalidReferenceException: Expression s is undefined on line 1, column 12 in mail-html.ftl. [] at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.doLog(Ex ceptionMappingInterceptor.java:230) org.springframework.mail.MailPreparationException: Can't generate HTML subscription mail; nested exception is freemarker.core.InvalidReferenceException: Expression s is undefined on line 121, column 88 in mail-html.ftl. Caused by: Expression s is undefined on line 1, column 12 in mail-html.ftl. The problematic instruction: -- ==> user-directive s.url [on line 1, column 10 in mail-html.ftl] Java backtrace for programmers: -- freemarker.core.InvalidReferenceException: Expression s is undefined on line 1, column 12 in mail-html.ftl at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java: 134) My code: ">Frontpage Thank you so much in advance for you assistance! ALM -Opprinnelig melding- Fra: Dave Newton [mailto:[EMAIL PROTECTED] Sendt: 11. oktober 2007 15:41 Til: Struts Users Mailing List Emne: Re: Trouble with using struts tags in freemarker files --- [EMAIL PROTECTED] wrote: > My problem is that I don't know what's the correct > way to reference the struts taglib. > > My code: > > <#assign s=JspTaglibs["/META-INF/struts-tags.tld"]> I'm not sure if you need to define a reference to the struts-tags to use them; have you tried it without it? (Although I'm not sure why that wouldn't work.) d. - 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: Struts 2 Plugin
Ok, yeah, that makes sense that it would only apply for that package. I'm leaning towards Dave's answer and that is to create your own stack and encourage users to use it. Don On 10/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Alright, the plug-n-play ain't working! The plug-in functionality works > fine if I coerce it into my application's struts.xml, but after many > attempts at overriding the existing defaultStack, it appears *not* > possible. According to the docs, > > Since a plugin can contain the struts-plugin.xml file, it has the ability > to: > >- Define new packages with results, interceptors, and/or actions >- Override framework constants >- Introduce new extension point implementation classes > > Anyone know of a framework constant that can set a package/interceptor-ref > name as default. It appears the default-interceptor-ref tag does not extend > beyond the package that contains it. Funny thing is, the framework knows > when you are trying to use a name that already exists in *another* package! > > Scott > > > > > On 10/10/07, Don Brown <[EMAIL PROTECTED]> wrote: > > > > Let us know how overriding the default stack turns out. In other > > plugins, I've been creating new stacks, then assuming a user would > > just use that stack. Also, I'd make that stack the default stack in > > the plugin package, something like myplugin-default, so that if a user > > extended it, my stack would be the one they'd get. I generally > > assume that for any sizable, production application, you should > > construct your own stack with exactly the interceptors you need, but I > > could be wrong. > > > > Anyways, I've been thinking of ways to plug interceptors from plugins > > into the default stack so the user doesn't have to lift a finger, so > > if you have any ideas, send them along. > > > > Don > > > > On 10/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Rock on my brother! And however did you guess that it might be a > > breadcrumb > > > plugin? :) Karin has been patiently waiting to see code, so I finished > > it > > > this morning at 3:00 AM around watering my lawn (with a flashlight) and > > > making coffee! By noon today I was too tired to workout the > > > stuts-plugin.xml details. So are you suggesting my defaultStack > > > implementation *will* override the one in struts-core.xxx.jar? I saw > > the > > > order they are applied but wondered if there was a qualifier > > beyond > > > the simple name. The implementation of this plugin does not require > > > interfaces to use. It is parameter driven and easily configured at the > > > interceptor declaration itself. I am really liking this framework. > > > > > > Scott > > > > > > On 10/10/07, Wes Wannemacher <[EMAIL PROTECTED]> wrote: > > > > > > > > Scott, > > > > > > > > I would say that you are okay overriding the defaultStack since it is > > > > a plugin. For a user to actively install your plugin, then they are > > > > seeking the functionality you are providing. I don't know much about > > > > the plugin you are writing, but if it works similar to other > > > > interceptors, meaning that the user has to implement an interface to > > > > get the functionality (like, if you were building a breadcrumb plugin > > > > and actions have to implement com.gmail.stanlick.Crumbable, or have to > > > > annotated by @com.gmail.stanlick.Crumb), then it should have no > > > > side-effects. The advantage of overriding the defaultStack is that > > > > most users will have less steps to be up and running, but the caveat > > > > is that users who don't use defaultStack will have to include your > > > > interceptor manually. Of course, you'll have all of this documented > > > > and users in the second scenario will most likely know where to look > > > > to get your plugin up and running. > > > > > > > > -W > > > > > > > > On 10/10/07, stanlick <[EMAIL PROTECTED]> wrote: > > > > > > > > > > I am writing a plugin that consists of a new interceptor. I would > > like > > > > its > > > > > struts-plugin.xml to append to the defaultStack so the interceptor > > works > > > > out > > > > > of the box for packages leveraging the default interceptor > > stack. What > > > > is > > > > > the ethical thing to do as it relates to a plugin modifying the > > default > > > > > interceptor stack? Overriding the stack does not pass the tummy > > test, > > > > but > > > > > in the spirit of plugin drop-n-go, I also feel odd about including a > > > > list of > > > > > modifications you need to make to get the plugin to play! > > > > > > > > > > Scott > > > > > -- > > > > > View this message in context: > > > > http://www.nabble.com/Struts-2-Plugin-tf4603263.html#a13143714 > > > > > Sent from the Struts - User mailing list archive at Nabble.com. > > > > > > > > > > > > > > > > > - > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail:
Re: Repopulate form in execute() method - Struts 1
Thank you d. :-) newton.dave wrote: > > If the forward isn't a redirect you shouldn't need to > repopulate the form. This use-case, btw, is what > "mapping.getInputForward()" is for (along with the > "input" attribute of the action configuration > element). > > d. > > --- debussy007 <[EMAIL PROTECTED]> wrote: > >> >> Hello, >> >> When the user submits my form, >> I retrieve it as a DynaActionForm, do some checks in >> execute() method, >> and if the form submitted is not valid, >> I want to forward to the form again and repopulate >> the form with the >> inserted values. >> >> How can I achieve this ? >> [...] >> if( ! valid ) { >> >>// Instruction to repopulate the form, put the >> form in request ??? >> >>errors.add( ActionErrors.GLOBAL_ERROR, >> new ActionError("errorkey", "Invalid >> data")); >>saveErrors(request, errors); >>return mapping.findForward("error"); // forward >> to the form >> } >> [...] >> >> Thank you for any kind help ! >> -- >> View this message in context: >> > http://www.nabble.com/Repopulate-form-in-execute%28%29-method---Struts-1-tf4611970.html#a13170657 >> 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] > > > -- View this message in context: http://www.nabble.com/Repopulate-form-in-execute%28%29-method---Struts-1-tf4611970.html#a13174204 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can i get Exception message and StackTrace ?
Hi, You can use to get that information. Rich On 10/11/07, jignesh(india) <[EMAIL PROTECTED]> wrote: > > Hello, > Thanks in advanced.! > Do anyone help me,how can i get exception message,StackTrace into my > user defined class ? > My code is looks like this:- > > > /AMK.fi_view/Exception.jsp > > > > result="Exception"/> > > > > xxxsome action > > > I am able to see user defined Exception page while it occurs,but i also want > that exception messages and stackTrace. > > Best Regards, > Jignesh > > -- > View this message in context: > http://www.nabble.com/How-can-i-get-Exception-message-and-StackTrace---tf4605357.html#a13150176 > 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: Exception Handling and Logging
Hi Paul, I know its been a while but I am now trying to log my exceptions. Previously I was redirecting to a JSP and outputting the error. A requirement has come up where the client does not want the user seeing any stack traces etc. So I want to log the exception in the action and then redirect to a generic error page. I have the exception results and the exception mapping set up. I was wondering what is the best way to log this. Right now I have my Exception result directing to an action which calls my log class. The problem is a can not seem to get the exceptionStack passed into this action so I can not log all of the information. Any ideas? Thanks Rich On 8/2/07, Paul Benedict <[EMAIL PROTECTED]> wrote: > My applications do not catch any errors. I let them bubble out of the > Action and into an ExceptionHandler object for logging. You can log > whatever you want -- including the user -- in the handler. > > Paul > > Richard Sayre wrote: > > After reading the Mail Reader walk through, it would seem the best > > practice for handling exceptions is throwing them back to your Action > > and having a result mapped to handle each specific exception. > > > > Is this the best way to do this? > > > > If I use this method how can I log the stack of each exception that > > was thrown? I know there is a logging interceptor but I have not > > found any docs on how to use it. I would like to make an error log of > > everything that happens in the application. Is it possible to log > > other information with the Exception such as the current user? > > > > Thank you, > > > > Rich > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Client side validation for radio button
In this case it is the xhtml theme. (Isn't specified in the mailto:[EMAIL PROTECTED] Sent: Wednesday, October 11, 2000 5:52 PM To: Struts Users Mailing List Subject: Re: Client side validation for radio button in your jsp head tag.. what value have you assigned to theme? M- - Original Message - From: "Mitch Claborn" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" Sent: Thursday, October 11, 2007 5:38 PM Subject: Client side validation for radio button Using the xhtml theme, client-side validation for radio button is not working. I've tried both "required" and "requiredstring" but I suspect that none will work. The javascript code (from form-close-validation.ftl) does this: function validateForm_Question() { form = document.getElementById("Question"); if (form.elements['q1']) { field = form.elements['q1']; var error = "Please answer q1"; if (field.value == "") { addError(field, error); errors = true; } } Which doesn't get the actual value of the selected radio. I can code a workaround in form-close-validation.ftl but it seems like this would have been solved already? Mitch Claborn [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with ForwardAction after update from Struts 1.2.9 to 1.3.8
Hello, I updated from Struts 1.2.9 to Struts 1.3.8. Now I have the following problem in my ForwardActions. Here is an example of what I want to do: I have the following code in my admin module: In Struts 1.2.9 this code worked fine and if I called the URL http://localhost:8080/myapp/admin/index.do I got the correct index.jsp. But now in Struts 1.3.8 Struts is going to search for the page /admin/WEB-INF/pages/admin/index.jsp because I am in the admin module. Is here any solution to get Struts 1.3.8 running for my issue? Regards, Sam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Download link
--- [EMAIL PROTECTED] wrote: > I looked for a special result type but came up > empty handed! Is StreamResult [1] not what you're looking for? > P.S. Does d. ever sleep? Is he a coffee drinker? I am actually a hive-mind distributed across several continents. d. [1] http://struts.apache.org/2.x/docs/stream-result.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Download link
What is the preferred technique for adding a file download link to an S2 web page? I looked for a special result type but came up empty handed! I could defer back to the bogus MIME type approach, but would rather do this according to the framework. I searched the Webwork in Action book but got no hits there either. P.S. Does d. ever sleep? Is he a coffee drinker? -- Scott [EMAIL PROTECTED]
Re: static access to request / response / page context objects?
Looks like you need a dose of ServletActionContext: http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/ServletActionContext.html Zarar On 10/11/07, Adam Hardy <[EMAIL PROTECTED]> wrote: > I'm writing a few static methods to use as taglib functions in my JSPs, in > particular right now I'm writing a method to return an internationalised > string > from the resource bundles for use such as this: > > title="${adam:message('trading.catalog.goSomewhere')}"> >Somewhere > > > For this example I need access to the locale in use. > > I suspect that my options are to tap into the S2 framework somewhere or to set > up a filter to store this stuff in my own ThreadLocal (which wouldn't tie me > into any version of struts). > > Any thoughts on how to achieve this? > > Regards > Adam > > - > 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: Repopulate form in execute() method - Struts 1
If the forward isn't a redirect you shouldn't need to repopulate the form. This use-case, btw, is what "mapping.getInputForward()" is for (along with the "input" attribute of the action configuration element). d. --- debussy007 <[EMAIL PROTECTED]> wrote: > > Hello, > > When the user submits my form, > I retrieve it as a DynaActionForm, do some checks in > execute() method, > and if the form submitted is not valid, > I want to forward to the form again and repopulate > the form with the > inserted values. > > How can I achieve this ? > [...] > if( ! valid ) { > >// Instruction to repopulate the form, put the > form in request ??? > >errors.add( ActionErrors.GLOBAL_ERROR, > new ActionError("errorkey", "Invalid > data")); >saveErrors(request, errors); >return mapping.findForward("error"); // forward > to the form > } > [...] > > Thank you for any kind help ! > -- > View this message in context: > http://www.nabble.com/Repopulate-form-in-execute%28%29-method---Struts-1-tf4611970.html#a13170657 > 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: How to set object to value stack from jsp?
If you just need to access a value from the session on a JSP page you can use OGNL's session access[1]. At least with S1 the common practice was to disallow direct access to JSP pages and instead route everything through actions. d. [1] http://struts.apache.org/2.x/docs/ognl.html --- Igor Vlasov <[EMAIL PROTECTED]> wrote: > > I have an object in session nad want to use it in > jsp struts tag as a top > object. > > I do not want to create action for geting it from > session and putting it to > action property. > > How can i put a value from session to the top of > value stack ? > -- > View this message in context: > http://www.nabble.com/How-to-set-object-to-value-stack-from-jsp--tf4611537.html#a13169432 > 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]
Repopulate form in execute() method - Struts 1
Hello, When the user submits my form, I retrieve it as a DynaActionForm, do some checks in execute() method, and if the form submitted is not valid, I want to forward to the form again and repopulate the form with the inserted values. How can I achieve this ? [...] if( ! valid ) { // Instruction to repopulate the form, put the form in request ??? errors.add( ActionErrors.GLOBAL_ERROR, new ActionError("errorkey", "Invalid data")); saveErrors(request, errors); return mapping.findForward("error"); // forward to the form } [...] Thank you for any kind help ! -- View this message in context: http://www.nabble.com/Repopulate-form-in-execute%28%29-method---Struts-1-tf4611970.html#a13170657 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]