Re: How to get s:select id and name under struts2 action?
Assuming your ids are of type long, you could do it with a list of Long like so in your action: private ListLong test = new ArrayListLong(); plus the getters and setters (getTest(), setTest()). test is the name you gave in the select (s:select name=test ... /). Struts2 will polulate the list with the selected ids. Em 23-03-2010 02:43, red phoenix escreveu: I have a jsp,it contains a s:select,like follows: s:select name=test list=#request.testList listKey=id listValue=tname size=6 cssClass=tbcell/ When this jsp submit,it will submit to a struts2 action,I want to know how to get all id and name of s:select and how to get selected id and name of s:select ? How to do it? An example is better. Thanks! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to get s:select id and name under struts2 action?
Forgot to mention, this is the case with a multiple select, if the select is simple and only one option can be selected, then a bean property for an int or long will sufice. Em 23-03-2010 09:33, Alex Rodriguez Lopez escreveu: Assuming your ids are of type long, you could do it with a list of Long like so in your action: private ListLong test = new ArrayListLong(); plus the getters and setters (getTest(), setTest()). test is the name you gave in the select (s:select name=test ... /). Struts2 will polulate the list with the selected ids. Em 23-03-2010 02:43, red phoenix escreveu: I have a jsp,it contains a s:select,like follows: s:select name=test list=#request.testList listKey=id listValue=tname size=6 cssClass=tbcell/ When this jsp submit,it will submit to a struts2 action,I want to know how to get all id and name of s:select and how to get selected id and name of s:select ? How to do it? An example is better. Thanks! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts Action not getting initialised.
I have mentioned the action configuration in web.xml but struts Action is not getting initialized. I have placed the jar file in the classpath also which is in lib folder. Where is the problem. Regards, VR Venugopal Rao -Original Message- From: Alex Rodriguez Lopez [mailto:alo...@flordeutopia.pt] Sent: 23 March 2010 15:07 To: Struts Users Mailing List Subject: Re: How to get s:select id and name under struts2 action? Forgot to mention, this is the case with a multiple select, if the select is simple and only one option can be selected, then a bean property for an int or long will sufice. Em 23-03-2010 09:33, Alex Rodriguez Lopez escreveu: Assuming your ids are of type long, you could do it with a list of Long like so in your action: private ListLong test = new ArrayListLong(); plus the getters and setters (getTest(), setTest()). test is the name you gave in the select (s:select name=test ... /). Struts2 will polulate the list with the selected ids. Em 23-03-2010 02:43, red phoenix escreveu: I have a jsp,it contains a s:select,like follows: s:select name=test list=#request.testList listKey=id listValue=tname size=6 cssClass=tbcell/ When this jsp submit,it will submit to a struts2 action,I want to know how to get all id and name of s:select and how to get selected id and name of s:select ? How to do it? An example is better. Thanks! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ DISCLAIMER The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or directly to netsupp...@cmcltd.com or telephone and immediately and permanently delete the message and any attachments. Thank you. __ This email has been scrubbed for your protection by SecureMX. For more information visit http://securemx.in __ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Integrate JasperReports into a Struts2 web application
With the recent release of JasperReport Plug-in, Now, you can directly add any fields, calculations(stored/un-stored), aggregations, global variables, related fields and many more, to your Jasper Report, as you are doing in Servoy itself. You don't have write huge SQL Query for the same. Just pass your foundset to the report and access the fields, related fields from the JasperReport basing on the passed foundset. In this TIP, we will know how we can add a Sub-Report to the Jasper Report and pass a Servoy Foundset to the SubReport. To add a Sub-Report to your JasperReport at design time with IReport (IReport is the popular Jasper Report Designer tool), you can drag the Sub-Report element from the Element pallet of IReport, to the http://www.mindfiresolutions.com/Adding-a-SubReport-to-the-JasperReport-by-JasperReport-Plugin-724.php JasperReport . -- View this message in context: http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p27999481.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter
Hi, I am fairly new to Struts. I'm trying to get an application which uses Struts to work on Glassfish v3. I have made it work on JBoss and Tomcat. If I put struts2-core-2.1.8.jar in the classpath, loading the application triggers the error message: WARNING: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception java.lang.ClassCastException: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter at com.sun.enterprise.web.WebContainer.createFilterInstance(WebContainer.java:715) at com.sun.enterprise.web.WebModule.createFilterInstance(WebModule.java:1948) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:248) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309) at java.lang.Thread.run(Thread.java:619) When I remove the jar, I can load the application until I hit the error: java.lang.ClassNotFoundException: org.apache.struts2.interceptor.ServletRequestAware at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229) at java.lang.ClassLoader.loadClass(ClassLoader.java:303) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) ... 115 more Which indicates that Struts isn't in the classpath. Does anyone have any idea what is wrong? Thanks.
Re: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter
2010/3/23 Hallgrímur Th. Björnsson hallgrimur.bjorns...@skyrr.is: I am fairly new to Struts. I'm trying to get an application which uses Struts to work on Glassfish v3. I have made it work on JBoss and Tomcat. Try to use one of these org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter or (when you are using Sutemesh) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter Regards -- Łukasz http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter
Hi, Thanks for the reply. Where is this typically changed? In an XML file or in the code? Kveðja / Regards, Hallgrímur -Original Message- From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com] Sent: 23. mars 2010 11:49 To: Struts Users Mailing List Subject: Re: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter 2010/3/23 Hallgrímur Th. Björnsson hallgrimur.bjorns...@skyrr.is: I am fairly new to Struts. I'm trying to get an application which uses Struts to work on Glassfish v3. I have made it work on JBoss and Tomcat. Try to use one of these org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter or (when you are using Sutemesh) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter Regards -- Łukasz http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter
Hi, I found where to change the filter settings. I get the exact same errors with the different filters: java.lang.ClassCastException: org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter cannot be cast to javax.servlet.Filter For all 3 filters you suggested. Kveðja / Regards, Hallgrímur -Original Message- From: Hallgrímur Th. Björnsson [mailto:hallgrimur.bjorns...@skyrr.is] Sent: 23. mars 2010 11:54 To: Struts Users Mailing List; lukasz.len...@gmail.com Subject: RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter Hi, Thanks for the reply. Where is this typically changed? In an XML file or in the code? Kveðja / Regards, Hallgrímur -Original Message- From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com] Sent: 23. mars 2010 11:49 To: Struts Users Mailing List Subject: Re: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter 2010/3/23 Hallgrímur Th. Björnsson hallgrimur.bjorns...@skyrr.is: I am fairly new to Struts. I'm trying to get an application which uses Struts to work on Glassfish v3. I have made it work on JBoss and Tomcat. Try to use one of these org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter or (when you are using Sutemesh) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter Regards -- Łukasz http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
[Struts 2.1.8] s:url : how to open in a new window ?
Hi, I am using Struts 2.1.8. In a JSP, I have a link which calls an action. I want to open that link in a new window. The following code works : s:url id=genererRapportPDF action=affichePDF windowState= / s:a href=%{genererRapportPDF} onclick=javascript:window.open('%{genererRapportPDF}');Generation/s:a The problem is that it also calls the action / opens the link in the current window. How to avoid that ? Thanks.
html:errors question
Hi, I tried to display error messages in my JSP, I put on the JSP the tag : html:errors header=errors.header footer=errors.footer prefix=errors.prefix suffix=errors.suffix / In the MessageRessources.properties, I created the following entries : errors.header=div class=errors errors.footer=/div errors.prefix=div errors.suffix=/div error.technique=Problème technique {0} error.utilisateurdoublon=L'utilisateur existe déjà The errors header and footer is not customized. And I do not understant why. In my struts-config.xml, I declared the MessageRessources.properties file : message-resources parameter=fr.documentfacturationdcp.MessageResources/ In the Action class, I do the following process : package fr.postgresqldocumentfacturationdcp.webapp; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger; import org.apache.struts.action.Action; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; import fr.postgresqldocumentfacturationdcp.domaine.Administrateur; import fr.postgresqldocumentfacturationdcp.domaine.Utilisateur; import fr.postgresqldocumentfacturationdcp.metier.GestionAdministrateur; import fr.postgresqldocumentfacturationdcp.vue.AdministrateurForm; import fr.ouestfrance.evno.metier.exception.FunctionalException; public class AjouterAdministrateurAction extends Action { public AjouterAdministrateurAction() { super(); } public ActionForward execute(ActionMapping pMapping, ActionForm pForm, HttpServletRequest pRequest, HttpServletResponse pResponse) throws Exception { ActionErrors vErrors = new ActionErrors(); ActionForward vActionForward; try { AdministrateurForm vForm = (AdministrateurForm) pForm; if (...) { ActionMessage vMessage = new ActionMessage(error.utilisateurdoublon); vErrors.add(logique, vMessage); saveErrors(pRequest, vErrors); vActionForward = pMapping.findForward(erreur); } ... vActionForward = pMapping.findForward(validation); } catch (FunctionalException vFex) { ActionMessage vMessageErreur = new ActionMessage(error.technique, vFex.getMessage()); vErrors.add(technique, vMessageErreur); saveErrors(pRequest, vErrors); vActionForward = pMapping.findForward(erreur); } return vActionForward; } } The HTML code generated when an error is raised is the following : tabletrtdL'utilisateur existe déjà/td/trtrtdProblème technique L'utilisateur 123450 existe déjà/td/tr/table Have you got any idea why the errors.header, errors.footer, errors.prefix, errors.suffix keys of the MessageRessources are not used ? What should I do ? The other keys of the MessageRessources are displayed without any problem. Any help would be appreciated. Regards. Xavier - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Cancel-Redirect Action not working on Portlet
I fixed this issue by changing my Cancel (submit) button to use the action attribute for a cancel action, see change below. Sharing just in case someone else runs into this issue. Previously --- s:submit value=Cancel name=redirectAction:cancelAlbum/ Fixed -- s:submit value=Cancel action=cancelAlbum/ Todd Kofford tkoff...@ku.edu University of Kansas - IT -Original Message- From: Kofford, C Todd [mailto:tkoff...@ku.edu] Sent: Monday, March 15, 2010 10:20 AM To: user@struts.apache.org Subject: Cancel-Redirect Action not working on Portlet I am using Struts 2.1.8.1 with the portlet plug-in, and my webapp, a simple album database, is deployed on a tomcat 6 container. When running this webapp stand-alone the cancel button action correctly fires and calls the cancelAlbum action, but when running the same webapp as a portlet in uPortal 3.1.2, the cancel button fires the action defined for the form, saveAlbum, not the redirected one that I defined in the submit tag for the cancel button. I have the following form defined in a JSP, for adding/editing an album: s:form action=saveAlbum method=post s:textfield name=album.artist label=%{getText('label.artist')} size=40/ s:textfield name=album.title label=%{getText('label.title')} size=40/ s:textfield name=album.releaseYear label=%{getText('label.releaseYear')} size=20/ s:select name=album.genre.genreId list=genres listKey=genreId listValue=name/ s:hidden name=album.albumId/ s:submit value=%{getText('button.label.submit')}/ s:submit value=%{getText('button.label.cancel')} name=redirectAction:cancelAlbum/ /s:form I have the following actions defined in my struts.xml file, and my action class, AlbumAction, implements the methods (list(), save(), delete(), input(), cancel()): package name=portlet-default extends=struts-portlet-default namespace=/portlet action name=index class=edu.ku.it.si.struts2portlet.action.AlbumAction method=list result name=success/jsp/albums.jsp/result /action action name=*Album class=edu.ku.it.si.struts2portlet.action.AlbumAction method={1} result name=success/jsp/albums.jsp/result result name=input/jsp/albumForm.jsp/result result name=cancel/jsp/albums.jsp/result result name=error/jsp/error.jsp/result /action /package Anyone have any ideas why s:submit value=%{getText('button.label.cancel')} name=redirectAction:cancelAlbum/ is not working for a portlet? Thanks in advance, Todd Kofford tkoff...@ku.edu University of Kansas - IT - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: [Struts 2.1.8] s:url : how to open in a new window ?
Hello, This is a JS thing. Try: onclick=javascript:window.open('%{genererRapportPDF}'); return false; Gustavo -Mensagem original- De: Celinio Fernandes [mailto:cel...@yahoo.com] Enviada: terça-feira, 23 de Março de 2010 13:03 Para: Struts Users Mailing List Assunto: [Struts 2.1.8] s:url : how to open in a new window ? Hi, I am using Struts 2.1.8. In a JSP, I have a link which calls an action. I want to open that link in a new window. The following code works : s:url id=genererRapportPDF action=affichePDF windowState= / s:a href=%{genererRapportPDF} onclick=javascript:window.open('%{genererRapportPDF}');Generation/s:a The problem is that it also calls the action / opens the link in the current window. How to avoid that ? Thanks. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [Struts 2.1.8] s:url : how to open in a new window ?
Hi! How about using target=_blank instead of onclick? Robert Gustavo Felisberto schrieb: Hello, This is a JS thing. Try: onclick=javascript:window.open('%{genererRapportPDF}'); return false; Gustavo -Mensagem original- De: Celinio Fernandes [mailto:cel...@yahoo.com] Enviada: terça-feira, 23 de Março de 2010 13:03 Para: Struts Users Mailing List Assunto: [Struts 2.1.8] s:url : how to open in a new window ? Hi, I am using Struts 2.1.8. In a JSP, I have a link which calls an action. I want to open that link in a new window. The following code works : s:url id=genererRapportPDF action=affichePDF windowState= / s:a href=%{genererRapportPDF} onclick=javascript:window.open('%{genererRapportPDF}');Generation/s:a The problem is that it also calls the action / opens the link in the current window. How to avoid that ? Thanks. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [Struts 2.1.8] s:url : how to open in a new window ?
What if I'm using the app, and I want to open the link in a new tab instead? Or how about, I want to open it in the same tab and just use the back button once I'm done looking at the PDF? -Brian On Tue, Mar 23, 2010 at 8:02 AM, Celinio Fernandes cel...@yahoo.com wrote: Hi, I am using Struts 2.1.8. In a JSP, I have a link which calls an action. I want to open that link in a new window. The following code works : s:url id=genererRapportPDF action=affichePDF windowState= / s:a href=%{genererRapportPDF} onclick=javascript:window.open('%{genererRapportPDF}');Generation/s:a The problem is that it also calls the action / opens the link in the current window. How to avoid that ? Thanks. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [Struts 2.1.8] s:url : how to open in a new window ?
Target blank isn't necessarily available (e.g. writing the site in xhtml 1.1) -Brian On Tue, Mar 23, 2010 at 10:06 AM, Robert Graf-Waczenski r...@lsoft.com wrote: Hi! How about using target=_blank instead of onclick? Robert Gustavo Felisberto schrieb: Hello, This is a JS thing. Try: onclick=javascript:window.open('%{genererRapportPDF}'); return false; Gustavo -Mensagem original- De: Celinio Fernandes [mailto:cel...@yahoo.com] Enviada: terça-feira, 23 de Março de 2010 13:03 Para: Struts Users Mailing List Assunto: [Struts 2.1.8] s:url : how to open in a new window ? Hi, I am using Struts 2.1.8. In a JSP, I have a link which calls an action. I want to open that link in a new window. The following code works : s:url id=genererRapportPDF action=affichePDF windowState= / s:a href=%{genererRapportPDF} onclick=javascript:window.open('%{genererRapportPDF}');Generation/s:a The problem is that it also calls the action / opens the link in the current window. How to avoid that ? Thanks. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [Struts 2.1.8] s:url : how to open in a new window ?
Hello, You can avoid opening of the link in the current window removing the href attribute from s:a tag. Florin Cazacu. Celinio Fernandes wrote: Hi, I am using Struts 2.1.8. In a JSP, I have a link which calls an action. I want to open that link in a new window. The following code works : s:url id=genererRapportPDF action=affichePDF windowState= / s:a href=%{genererRapportPDF} onclick=javascript:window.open('%{genererRapportPDF}');Generation/s:a The problem is that it also calls the action / opens the link in the current window. How to avoid that ? Thanks. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Weird behavior in getText()
I'm seeing some weird behavior in ActionSupport.getText() that is causing me some problems in Struts 2.0.14. From the docs (and my previous experience), getText() retrieves entries from the resource bundle's associated with the application. But for some reason, in my current instance it's trying to evaluate the resource bundle key as an OGNL expression. Am I doing something wrong? In my application.properties file I have: chart.netFrameSales.title=Net Frame Sales In my ChartNetFrameSalesAction I have: public JFreeChart getChart () { String title = getText(chart.netFrameSales.title); which is causing infinite recursion because OGNL is seeing the chart. and going to the value stack, calling getChart() and round and round we go. The Relevant part of the stack trace shows: [2010-03-23 11:10:47,307] WARN {abcOu3jlPU3Rf_9tFPSzs} OgnlValueStack.logLookupFailure: Caught an exception while evaluating expression 'chart' against value stack Caught an Ognl exception while getting property chart - Class: ognl.OgnlRuntime File: OgnlRuntime.java Method: getMethodValue Line: 1416 - ognl/OgnlRuntime.java:1416:-1 at com.opensymphony.xwork2.util.CompoundRootAccessor.getProperty(CompoundRootAccessor.java:106) at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2210) at ognl.ASTProperty.getValueBody(ASTProperty.java:114) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) at ognl.SimpleNode.getValue(SimpleNode.java:258) at ognl.Ognl.getValue(Ognl.java:494) at ognl.Ognl.getValue(Ognl.java:458) at com.opensymphony.xwork2.util.OgnlUtil.getValue(OgnlUtil.java:190) at com.opensymphony.xwork2.util.OgnlValueStack.findValue(OgnlValueStack.java:228) at com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedTextUtil.java:431) at com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedTextUtil.java:293) at com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSupport.java:173) at com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSupport.java:88) at com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:71) at com.vsp.global.controller.ChartNetFrameSalesAction.getChart(ChartNetFrameSalesAction.java:84) Is this a misconfiguration on my part, or bad documentation around the ActionSupport.getText() method? (*Chris*)
Re: Weird behavior in getText()
Chris Pratt wrote: for some reason, in my current instance it's trying to evaluate the resource bundle key as an OGNL expression. A couple weeks ago I finally took the time to look at lots of the warning output in my log files and was able to use that to fix a few buggy ognl expressions (yay for no-longer-silent failure!). Many of the warnings I was unable to address (and didn't have time then to dig deeply enough to understand) were strings I expected to be used as resource bundle keys, but were instead being evaluated as OGNL. So I don't have any insight or answers, but can confirm that this is indeed happening. -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org