missing application web.xml
Hi, I'm sure I've done something silly I have a very simple war file that includes struts and I can deploy it only once. If I make a change to a JSP and repack the war and copy it to the webapps directory I get a missing application web.xml error as below: 1/11/2005 10:26:50 org.apache.catalina.startup.Catalina start INFO: Server startup in 9424 ms 1/11/2005 10:26:59 org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive daves-workspace.war 1/11/2005 10:27:30 org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/daves-workspace] 1/11/2005 10:27:31 org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive daves-workspace.war 1/11/2005 10:27:31 org.apache.catalina.startup.ContextConfig applicationWebConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/daves- workspace] If I remove the struts servlet declaration from the web.xml file, I can make changes and redeploy over and over with no trouble. I am using tomcat 5.5.12 and struts 1.2.7 and java 1.5 Any help appreciated. Cheers Mark The information contained in this communication is for the use of the individual or entity to whom it is addressed, and may contain information which is the subject of legal privilege and/or copyright. If you have received this communication in error, please notify the sender by return E-Mail and delete the transmission, together with any attachments, from your system. Thank you. -
RE: missing application web.xml
The same problem occurs when I deploy the struts-examples.war, make a change to a JSP page, repack the war and redeploy. -Original Message- From: Mark Rehbein [mailto:[EMAIL PROTECTED] Sent: Tuesday, 1 November 2005 10:56 AM To: user@struts.apache.org Subject: missing application web.xml Hi, I'm sure I've done something silly I have a very simple war file that includes struts and I can deploy it only once. If I make a change to a JSP and repack the war and copy it to the webapps directory I get a missing application web.xml error as below: 1/11/2005 10:26:50 org.apache.catalina.startup.Catalina start INFO: Server startup in 9424 ms 1/11/2005 10:26:59 org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive daves-workspace.war 1/11/2005 10:27:30 org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/daves-workspace] 1/11/2005 10:27:31 org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive daves-workspace.war 1/11/2005 10:27:31 org.apache.catalina.startup.ContextConfig applicationWebConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/daves- workspace] If I remove the struts servlet declaration from the web.xml file, I can make changes and redeploy over and over with no trouble. I am using tomcat 5.5.12 and struts 1.2.7 and java 1.5 Any help appreciated. Cheers Mark The information contained in this communication is for the use of the individual or entity to whom it is addressed, and may contain information which is the subject of legal privilege and/or copyright. If you have received this communication in error, please notify the sender by return E-Mail and delete the transmission, together with any attachments, from your system. Thank you. - The information contained in this communication is for the use of the individual or entity to whom it is addressed, and may contain information which is the subject of legal privilege and/or copyright. If you have received this communication in error, please notify the sender by return E-Mail and delete the transmission, together with any attachments, from your system. Thank you. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help: DynaActionForm with indexed property - not updating
Hi, I've been trying to get the values in my dynaaction form to update. I have a populator Action that creates my TestRow[] object and adds it to the form. The dynaaction also has a simple String property which I also populate. I then forward to my HTML form that has the row fields indexed. The form is displayed with all the indexed text boxes and select boxes populated as expected. I edit the values, including the non indexed field and submit the form to the form processor action. The form is retrieved and the non indexed field has the updated value, BUT, the indexed fields still contain the original values! I've triple checked everything, and looked around for answers but I can't work out whats wrong. I've even done indexed forms successfully before on a different project, so its very frustrating. Even downloaded the lastest Struts 1.2.7/JSTL 1.1.2 libs and retried. Any help greatly appreciatedThanks Mark Here's my code and config segments: DynaActionForm definition from my struts-config.xml: form-bean name=testForm type=org.apache.struts.action.DynaActionForm form-property name=simple type=java.lang.String/ form-property name=rows type=aims.app.support.library.pub.TestRow[]/ /form-bean and the action mappings action path=/do/testInit type=aims.app.support.library.pub.action.TestInit input=/do/gotoError.do name=testForm scope=session forward name=next path=/do/gotoTestPage.do/ /action action path=/do/testProcess type=aims.app.support.library.pub.action.TestProcess input=/do/gotoError.do name=testForm scope=session forward name=next path=/do/gotoThankyou.do/ /action My test page, which is included into my Tiles to form valid HTML and mapped to /do/gotoTestPage.do : %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=jstl/c prefix=c % html:form action=/do/testProcess html:text property=simple / c:forEach var=row items=${testForm.map.rows} !-- was using logic:iterator but tried this too -- Author: c:out value=${row.field1}/ html:text name=row property=field1 indexed=true / br Pick from known affiliations br html:select name=row property=field2 size=4 indexed=true html:option value=1/ html:option value=2/ html:option value=3/ html:option value=4/ html:option value=5/ /html:select /c:forEach p html:submit value=Continue styleClass=addButton/ /p /html:form Populator action public class TestInit extends Action { private static final String NEXT=next; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DynaActionForm testForm = (DynaActionForm) form; TestRow row1=new TestRow(); row1.setField1(Mark); row1.setField2(2); TestRow row2=new TestRow(); row2.setField1(Fred); row2.setField2(5); TestRow[] rows=new TestRow[2]; rows[0]=row1; rows[1]=row2; testForm.set(rows, rows); testForm.set(simple, hello); return mapping.findForward(NEXT); } } Form processor action public class TestProcess extends Action { private static final String NEXT=next; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DynaActionForm testForm = (DynaActionForm) form; String simple=(String)testForm.get(simple); System.out.println(Simple: + simple); TestRow[] rows=(TestRow[])testForm.get(rows); for (int i=0;irows.length;i++) { System.out.println(Name: + rows[i].getField1()); System.out.println(No: + rows[i].getField2()); } return mapping.findForward(NEXT); } } TestRow bean public class TestRow { private String field1; private int field2; public String getField1() { return field1; } public void setField1(String field1) { this.field1 = field1; } public int getField2() { return field2; } public void setField2(int field2) { this.field2 = field2; } } The information contained in this communication is for the use of the individual or entity to whom it is addressed, and may contain information which is the subject of
RE: DynaActionForm with indexed property - not updating
You are a champion Niall, thanks! I can't believe I overlooked the naming conventions. Thanks again. Mark -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Tuesday, 5 July 2005 1:42 PM To: Struts Users Mailing List Subject: Re: DynaActionForm with indexed property - not updating You have named your indexed property in the DynaActionForm rows - but on your jsp you are using a var of row Either change the property defined in the DynaActionForm to row or change your jsp to refer to rows... c:forEach var=rows items=${testForm.map.rows} !-- was using logic:iterator but tried this too -- Author: c:out value=${rows.field1}/ html:text name=rows property=field1 indexed=true / br Pick from known affiliations br html:select name=rows property=field2 size=4 indexed=true html:option value=1/ html:option value=2/ html:option value=3/ html:option value=4/ html:option value=5/ /html:select /c:forEach Niall - Original Message - From: Mark Rehbein [EMAIL PROTECTED] Sent: Tuesday, July 05, 2005 4:18 AM Hi, I've been trying to get the values in my dynaaction form to update. I have a populator Action that creates my TestRow[] object and adds it to the form. The dynaaction also has a simple String property which I also populate. I then forward to my HTML form that has the row fields indexed. The form is displayed with all the indexed text boxes and select boxes populated as expected. I edit the values, including the non indexed field and submit the form to the form processor action. The form is retrieved and the non indexed field has the updated value, BUT, the indexed fields still contain the original values! I've triple checked everything, and looked around for answers but I can't work out whats wrong. I've even done indexed forms successfully before on a different project, so its very frustrating. Even downloaded the lastest Struts 1.2.7/JSTL 1.1.2 libs and retried. Any help greatly appreciatedThanks Mark Here's my code and config segments: DynaActionForm definition from my struts-config.xml: form-bean name=testForm type=org.apache.struts.action.DynaActionForm form-property name=simple type=java.lang.String/ form-property name=rows type=aims.app.support.library.pub.TestRow[]/ /form-bean and the action mappings action path=/do/testInit type=aims.app.support.library.pub.action.TestInit input=/do/gotoError.do name=testForm scope=session forward name=next path=/do/gotoTestPage.do/ /action action path=/do/testProcess type=aims.app.support.library.pub.action.TestProcess input=/do/gotoError.do name=testForm scope=session forward name=next path=/do/gotoThankyou.do/ /action My test page, which is included into my Tiles to form valid HTML and mapped to /do/gotoTestPage.do : %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=jstl/c prefix=c % html:form action=/do/testProcess html:text property=simple / c:forEach var=row items=${testForm.map.rows} !-- was using logic:iterator but tried this too -- Author: c:out value=${row.field1}/ html:text name=row property=field1 indexed=true / br Pick from known affiliations br html:select name=row property=field2 size=4 indexed=true html:option value=1/ html:option value=2/ html:option value=3/ html:option value=4/ html:option value=5/ /html:select /c:forEach p html:submit value=Continue styleClass=addButton/ /p /html:form Populator action public class TestInit extends Action { private static final String NEXT=next; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DynaActionForm testForm = (DynaActionForm) form; TestRow row1=new TestRow(); row1.setField1(Mark); row1.setField2(2); TestRow row2=new TestRow(); row2.setField1(Fred); row2.setField2(5); TestRow[] rows=new TestRow[2]; rows[0]=row1; rows[1]=row2; testForm.set(rows, rows); testForm.set(simple, hello); return mapping.findForward(NEXT); } } Form processor action public class TestProcess extends Action { private static final String NEXT=next; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception