Sounds like a validation error if it’s trying to go to the “input” result. It might be worth taking a small step back and either get a debugging environment working or check out some of the existing documentation, especially if there are places we can improve.
d em: davelnew...@gmail.com mo: 908-380-8699 gh: davelnewton <https://github.com/davelnewton> so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton> On Fri, May 16, 2025 at 19:47 Priyanka Vaddadi <priyanka.vadd...@doj.ca.gov.invalid> wrote: > Hi > > Thanks for that. When I annotate over getter method it worked for me. > But I am getting one more error while downloading file > It was working fine in struts 2.3. now while migrating to struts 7, below > code in struts.xml is not working > > <action name="printSupplierLetterInWord" class="action. > CgSupplierPrintLetterInWordAction"> > <result type = "stream"> > <param > name="contentType">application/msword</param> > <param > name="inputName">inputStream</param> > <param > name="contentDisposition">filename="document.rtf"</param> > </result> > <result > name="error">/WEB-INF/jsp/error.jsp</result> > </action> > > Error : > > > > No result defined for action.CgSupplierPrintLetterInWordAction and result > input - action - > vfs:/C:/Users/VADDADP/jboss-eap-8.0.0.Beta/jboss-eap-8.0/standalone/deployments/ems.war/WEB-INF/classes/struts.xml:757:108 > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:392) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:296) > > deployment.ems.war//org.apache.struts2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263) > > deployment.ems.war//org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:49) > > deployment.ems.war//org.apache.struts2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.executeConditional(DefaultActionInvocation.java:311) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) > > deployment.ems.war//org.apache.struts2.interceptor.FetchMetadataInterceptor.intercept(FetchMetadataInterceptor.java:78) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.executeConditional(DefaultActionInvocation.java:311) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) > > deployment.ems.war//org.apache.struts2.interceptor.CoopInterceptor.intercept(CoopInterceptor.java:57) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.executeConditional(DefaultActionInvocation.java:311) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) > > deployment.ems.war//org.apache.struts2.interceptor.CoepInterceptor.intercept(CoepInterceptor.java:55) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.executeConditional(DefaultActionInvocation.java:311) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) > > deployment.ems.war//org.apache.struts2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:140) > > deployment.ems.war//org.apache.struts2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.executeConditional(DefaultActionInvocation.java:311) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) > > deployment.ems.war//org.apache.struts2.interceptor.parameter.ParametersInterceptor.doIntercept(ParametersInterceptor.java:212) > > deployment.ems.war//org.apache.struts2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.executeConditional(DefaultActionInvocation.java:311) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) > > deployment.ems.war//org.apache.struts2.interceptor.parameter.ParametersInterceptor.doIntercept(ParametersInterceptor.java:212) > > deployment.ems.war//org.apache.struts2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.executeConditional(DefaultActionInvocation.java:311) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) > > deployment.ems.war//org.apache.struts2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:202) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.executeConditional(DefaultActionInvocation.java:311) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) > > deployment.ems.war//org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:69) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.executeConditional(DefaultActionInvocation.java:311) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) > > deployment.ems.war//org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:133) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.executeConditional(DefaultActionInvocation.java:311) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) > > deployment.ems.war//org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:92) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.executeConditional(DefaultActionInvocation.java:311) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) > > deployment.ems.war//org.apache.struts2.interceptor.ActionFileUploadInterceptor.intercept(ActionFileUploadInterceptor.java:151) > > deployment.ems.war//org.apache.struts2.DefaultActionInvocation.executeCondition > > > From: Priyanka Vaddadi > Sent: Friday, May 16, 2025 1:48 PM > To: user@struts.apache.org > Subject: RE: Struts 7 issue while posting the data > > Hi > > Sorry . I attached incorrect log > Below is the log > ERROR [org.apache.struts2.interceptor.parameter.ParametersInterceptor] > (default task-1) Developer Notification (set struts.devMode to false to > disable this message): > Parameter injection for method [getSupplierMgmtSearchData] on Action > [gov.ca.doj.ems.action.CgSupplierMgmtSearchAction] rejected. Ensure it is > annotated with @StrutsParameter with an appropriate 'depth'. > 13:44:11,831 ERROR > [org.apache.struts2.interceptor.parameter.ParametersInterceptor] (default > task-1) Developer Notification (set struts.devMode to false to disable this > message): > Parameter injection for method [getSupplierMgmtSearchData] on Action > [gov.ca.doj.ems.action.CgSupplierMgmtSearchAction] rejected. Ensure it is > annotated with @StrutsParameter with an appropriate 'depth'. > 13:44:11,833 ERROR > [org.apache.struts2.interceptor.parameter.ParametersInterceptor] (default > task-1) Developer Notification (set struts.devMode to false to disable this > message): > Parameter injection for method [getSupplierMgmtSearchData] on Action > [gov.ca.doj.ems.action.CgSupplierMgmtSearchAction] rejected. Ensure it is > annotated with @StrutsParameter with an appropriate 'depth'. > > > Thanks and Regards > Priyanka > > From: Priyanka Vaddadi > Sent: Friday, May 16, 2025 11:51 AM > To: user@struts.apache.org<mailto:user@struts.apache.org> > Subject: RE: Struts 7 issue while posting the data > > Hi > > I tried using depth = 1 as below > public final class CgSupplierMgmtSearchAction extends EmsWebAction > implements ValidationAware { > private SupplierSearchData supplierMgmtSearchData; > > @StrutsParameter(depth = 1) > public void setSupplierMgmtSearchData(SupplierSearchData > supplierMgmtSearchData) { > this.supplierMgmtSearchData = supplierMgmtSearchData; > } > > public SupplierSearchData getSupplierMgmtSearchData() { > return supplierMgmtSearchData; > } > } > Below is the SupplierSearchData class . As there are only strings > available in this class and no nested objects, I am using depth = 1 > > public class SupplierSearchData implements Serializable { > > > private static final long serialVersionUID = 1L; > private String supplierId; > private String supplierName; > private String cityOfLicense; > private String countyOfLicense; > private String queueId; > private String calendarYear; > > private String receivedDateFrom; > private String receivedDateTo; > private String approvedDateFrom; > private String approvedDateTo; > > private String searchDays; > private String supplierFirstName; > private String supplierLastName; > private String supplierDbaName; > private String licenseNumber; > private String federalTaxId; > private String cityOfBusiness; > > } > > But still I am getting below error > 11:31:28,446 ERROR > [org.apache.struts2.interceptor.parameter.ParametersInterceptor] (default > task-1) Developer Notification (set struts.devMode to false to disable this > message): > Parameter injection for method [getFundraiserMgmtSearchData] on Action > [gov.ca.doj.ems.action.CgFundraiserMgmtSearchAction] rejected. Ensure it is > annotated with @StrutsParameter with an appropriate 'depth'. > 11:31:28,461 ERROR > [org.apache.struts2.interceptor.parameter.ParametersInterceptor] (default > task-1) Developer Notification (set struts.devMode to false to disable this > message): > Parameter injection for method [getFundraiserMgmtSearchData] on Action > [gov.ca.doj.ems.action.CgFundraiserMgmtSearchAction] rejected. Ensure it is > annotated with @StrutsParameter with an appropriate 'depth'. > > > > Thanks and Regards > Priyanka > > From: Priyanka Vaddadi > Sent: Thursday, May 15, 2025 12:50 PM > To: user@struts.apache.org<mailto:user@struts.apache.org> > Subject: Struts 7 issue while posting the data > > Hi > > We are migrating from struts 2.3 to struts 7.0.0 > > As part of this migration I am facing below issue > > There is a action class in my project in which we defined > SupplierSearchData variable as below > public final class CgSupplierMgmtSearchAction extends EmsWebAction > implements ValidationAware { > > private SupplierSearchData supplierMgmtSearchData; > > From UI On click of submit button we are calling some java script > function in which we have below logic > var postData = "supplierMgmtSearchData.supplierName="+supplierName+ > > "&supplierMgmtSearchData.cityOfLicense="+cityOfLicense+ > > "&supplierMgmtSearchData.countyOfLicense="+countyOfLicense+ > > "&supplierMgmtSearchData.calendarYear="+calendarYear+ > > > "&supplierMgmtSearchData.receivedDateFrom="+receivedDateFrom+ > > "&supplierMgmtSearchData.receivedDateTo="+receivedDateTo+ > > > "&supplierMgmtSearchData.approvedDateFrom="+approvedDateFrom+ > > "&supplierMgmtSearchData.approvedDateTo="+approvedDateTo+ > > "&supplierMgmtSearchData.queueId="+queueId+ > > > "&supplierMgmtSearchData.supplierFirstName="+supplierFirstName+ > > > "&supplierMgmtSearchData.supplierLastName="+supplierLastName+ > > "&supplierMgmtSearchData.supplierDbaName="+supplierDbaName+ > > "&supplierMgmtSearchData.licenseNumber="+licenseNumber+ > > "&supplierMgmtSearchData.cityOfBusiness="+cityOfBusiness+ > > "&supplierMgmtSearchData.federalTaxId="+federalTaxId+ > > "&supplierMgmtSearchData.supplierId="+supplierId; > > loadSupplierMgmtSearchResults("<s:url > value="supplierMgmtSearch.action" encode="true"/>",postData); > > The definition of function loadSupplierMgmtSearchResults is as below > > function loadSupplierMgmtSearchResults(url, postData){ > alert(1); > $('#rightSupplierMgmtContainer').html("<img > src='../web/images/int/busy.gif'>"); > $.ajax({ > type: "POST", > url: url, > data: postData, > cache: false, > async: false, > success: function(html){ > > $("#rightSupplierMgmtContainer").html(html); > }, > error: function(html, status, error) { > alert("In > loadSupplierMgmtSearchResults, Error:"+error); > } > }); > return false; > } > > > But looks like what ever the data I am posting to action class is not > getting mapped to SupplierSearchData in action class > > SuplierSearchData class is as below > > ublic class SupplierSearchData implements Serializable { > > > /** > * > */ > private static final long serialVersionUID = 1L; > private String supplierId; > private String supplierName; > private String cityOfLicense; > private String countyOfLicense; > private String queueId; > private String calendarYear; > > > > Please let me know what is the problem here. If it is parameters , I think > we need to annotate with @StrutsParameter . but here the form data should > be mapped to object in action class? Is there any annotation available to > achieve this > > Thanks > > Priyanka > > > > > > > CONFIDENTIALITY NOTICE: This communication with its contents may contain > confidential and/or legally privileged information. It is solely for the > use of the intended recipient(s). Unauthorized interception, review, use or > disclosure is prohibited and may violate applicable laws including the > Electronic Communications Privacy Act. If you are not the intended > recipient, please contact the sender and destroy all copies of the > communication. >