Re: Config help
After 2 days of trying to figure it out, it decided to start working. - Original Message - From: [EMAIL PROTECTED] Date: Sunday, December 7, 2003 1:05 am Subject: Config help I am using MappingDispatchAction and am attempting to pre-populate a DynaValidatorForm in a setup action. Without validation, the form does show it prepopulated, but upon enterring data, it gets into my submit action. With Validation it does validate in my submit action and returns errors which I print out. The data again reaches my submit and past my validate, but fails to show back in the redisplayed form in error. I have looked through the forums and docs and know it has been covered. I am seeking an extra eye because I can't seem to figure out what is going wrong. If you don't mind can you take a quick look. I have tried many variations and think it is something simple I am doing wrong. Thank you for any help. Below are my details. John Tools: Post Struts 1.1, Velocity FormTool (updated to work with post struts 1.1). Inside my setup action: // @Test place a piece of data into the form and see if it comes out other side. DynaValidatorForm form = (DynaValidatorForm)baseForm; form.set(CtlConstants.FORM_TITLE, Test Title Data); request.setAttribute(mapping.getName(), form); return mapping.findForward(editpage); Inside my submit action: DynaValidatorForm form = (DynaValidatorForm)baseForm; ActionMessages errors = new ActionMessages(); errors = form.validate(mapping, request); // form values show up here, but not in returned form. if (! errors.isEmpty()) { this.saveErrors(request, errors); request.setAttribute(mapping.getName(), form); return new ActionForward(mapping.getInput()); } Inside my struts-config.xml: action path=/exec/post/wizard/page1/setup type=com.jb.controller.services.jobpost.wizard.Step1Action parameter=setupPage name=/exec/post/wizard/page1/submit/form validate=false scope=request forwardname=editpage redirect=false path=/WEB- INF/templates/exec/post/wizard/wizardstep1.vm/ forwardname=failure redirect=false path=/action/pub/systemError / action path=/exec/post/wizard/page1/submit type=com.jb.controller.services.post.wizard.Step1Action parameter=submitPage name=/exec/jobpost/wizard/page1/submit/form input=/WEB- INF/templates/exec/post/wizard/wizardstep1.vm validate=falsescope=request forwardname=thispage redirect=false path=/WEB- INF/templates/exec/post/wizard/wizardstep1.vm/ forwardname=nextpage redirect=false path=/action/exec/post/wizard/page2/setup/ forwardname=failure redirect=false path=/action/pub/systemError / --- -- 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]
Config help
I am using MappingDispatchAction and am attempting to pre-populate a DynaValidatorForm in a setup action. Without validation, the form does show it prepopulated, but upon enterring data, it gets into my submit action. With Validation it does validate in my submit action and returns errors which I print out. The data again reaches my submit and past my validate, but fails to show back in the redisplayed form in error. I have looked through the forums and docs and know it has been covered. I am seeking an extra eye because I can't seem to figure out what is going wrong. If you don't mind can you take a quick look. I have tried many variations and think it is something simple I am doing wrong. Thank you for any help. Below are my details. John Tools: Post Struts 1.1, Velocity FormTool (updated to work with post struts 1.1). Inside my setup action: // @Test place a piece of data into the form and see if it comes out other side. DynaValidatorForm form = (DynaValidatorForm)baseForm; form.set(CtlConstants.FORM_TITLE, Test Title Data); request.setAttribute(mapping.getName(), form); return mapping.findForward(editpage); Inside my submit action: DynaValidatorForm form = (DynaValidatorForm)baseForm; ActionMessages errors = new ActionMessages(); errors = form.validate(mapping, request); // form values show up here, but not in returned form. if (! errors.isEmpty()) { this.saveErrors(request, errors); request.setAttribute(mapping.getName(), form); return new ActionForward(mapping.getInput()); } Inside my struts-config.xml: action path=/exec/post/wizard/page1/setup type=com.jb.controller.services.jobpost.wizard.Step1Action parameter=setupPage name=/exec/post/wizard/page1/submit/form validate=false scope=request forwardname=editpage redirect=false path=/WEB-INF/templates/exec/post/wizard/wizardstep1.vm/ forwardname=failure redirect=false path=/action/pub/systemError / /action action path=/exec/post/wizard/page1/submit type=com.jb.controller.services.post.wizard.Step1Action parameter=submitPage name=/exec/jobpost/wizard/page1/submit/form input=/WEB-INF/templates/exec/post/wizard/wizardstep1.vm validate=false scope=request forwardname=thispage redirect=false path=/WEB-INF/templates/exec/post/wizard/wizardstep1.vm/ forwardname=nextpage redirect=false path=/action/exec/post/wizard/page2/setup/ forwardname=failure redirect=false path=/action/pub/systemError / /action - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Config help
In the first line: Without validation, the form does show it prepopulated was really meant to say: Without validation, the form does NOT show it prepopulated - Original Message - From: [EMAIL PROTECTED] Date: Sunday, December 7, 2003 1:05 am Subject: Config help I am using MappingDispatchAction and am attempting to pre-populate a DynaValidatorForm in a setup action. Without validation, the form does show it prepopulated, but upon enterring data, it gets into my submit action. With Validation it does validate in my submit action and returns errors which I print out. The data again reaches my submit and past my validate, but fails to show back in the redisplayed form in error. I have looked through the forums and docs and know it has been covered. I am seeking an extra eye because I can't seem to figure out what is going wrong. If you don't mind can you take a quick look. I have tried many variations and think it is something simple I am doing wrong. Thank you for any help. Below are my details. John Tools: Post Struts 1.1, Velocity FormTool (updated to work with post struts 1.1). Inside my setup action: // @Test place a piece of data into the form and see if it comes out other side. DynaValidatorForm form = (DynaValidatorForm)baseForm; form.set(CtlConstants.FORM_TITLE, Test Title Data); request.setAttribute(mapping.getName(), form); return mapping.findForward(editpage); Inside my submit action: DynaValidatorForm form = (DynaValidatorForm)baseForm; ActionMessages errors = new ActionMessages(); errors = form.validate(mapping, request); // form values show up here, but not in returned form. if (! errors.isEmpty()) { this.saveErrors(request, errors); request.setAttribute(mapping.getName(), form); return new ActionForward(mapping.getInput()); } Inside my struts-config.xml: action path=/exec/post/wizard/page1/setup type=com.jb.controller.services.jobpost.wizard.Step1Action parameter=setupPage name=/exec/post/wizard/page1/submit/form validate=false scope=request forwardname=editpage redirect=false path=/WEB- INF/templates/exec/post/wizard/wizardstep1.vm/ forwardname=failure redirect=false path=/action/pub/systemError / action path=/exec/post/wizard/page1/submit type=com.jb.controller.services.post.wizard.Step1Action parameter=submitPage name=/exec/jobpost/wizard/page1/submit/form input=/WEB- INF/templates/exec/post/wizard/wizardstep1.vm validate=falsescope=request forwardname=thispage redirect=false path=/WEB- INF/templates/exec/post/wizard/wizardstep1.vm/ forwardname=nextpage redirect=false path=/action/exec/post/wizard/page2/setup/ forwardname=failure redirect=false path=/action/pub/systemError / --- -- 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]
Resin Struts Config Help
I am anew Struts user running Apache and Resin 2.0.4 as my servlet container. I have successfully tested the Apache and Resin configurations. (I am also running WebLogic 6.1as my application server). If I drop the struts sample .war files into the resin/webapps directory they work fine. I am now trying to get Struts working in my own environment and am running into an error. My directory structure looks like this: Root Folder classes -- compiled classes lib -- struts.jar, xerces.jar, jdbc2_0-stdext.jar web -- jsp -- jsp files -- templates/taglib -- struts .tld files -- WEB-INF -- struts-config.xml, web.xml Attached is my struts-config.xml and web.xmlfiles. Finallyhere is the error I am seeing: [2001/12/14 09:45:47] org.apache.struts.action.ActionServlet: init[2001/12/14 09:45:47] org.apache.struts.action.ActionServlet: Initializing configuration from resource path /WEB-INF/struts-config.xml[2001/12/14 09:45:48] Parsing error processing resource path /WEB-INF/struts-config.xmlorg.xml.sax.SAXException: Stopping after fatal error: The markup in the document following the root element must be well-formed.at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1114)at weblogic.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:640)at weblogic.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentScanner.java:694)at weblogic.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher.dispatch(XMLDocumentScanner.java:1520)at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:967)at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)at weblogic.xml.jaxp.WebLogicParser.parse(WebLogicParser.java:67)at weblogic.xml.jaxp.RegistryParser.parse(RegistryParser.java:130)at javax.xml.parsers.SAXParser.parse(SAXParser.java:276)at javax.xml.parsers.SAXParser.parse(SAXParser.java:174)at org.apache.struts.digester.Digester.parse(Digester.java:755)at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1332)at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)at javax.servlet.GenericServlet.init(GenericServlet.java:82)at com.caucho.server.http.Application.createServlet(Application.java:2755)at com.caucho.server.http.Application.loadServlet(Application.java:2711)at com.caucho.server.http.Application.initServlets(Application.java:1763)at com.caucho.server.http.Application.init(Application.java:1698)at com.caucho.server.http.VirtualHost.init(VirtualHost.java:645)at com.caucho.server.http.ServletServer.initHosts(ServletServer.java:641)at com.caucho.server.http.ServletServer.initInternal(ServletServer.java:515)at com.caucho.server.http.ServletServer.init(ServletServer.java:366)at com.caucho.server.http.ResinServer.init(ResinServer.java:407)at com.caucho.server.http.ResinServer.main(ResinServer.java:959)at com.caucho.server.http.HttpServer.main(HttpServer.java:92)[2001/12/14 09:45:48] can't load servlet `oreilly'org.xml.sax.SAXException: Stopping after fatal error: The markup in the document following the root element must be well-formed.at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1114)at weblogic.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:640)at weblogic.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentScanner.java:694)at weblogic.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher.dispatch(XMLDocumentScanner.java:1520)at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:967)at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)at weblogic.xml.jaxp.WebLogicParser.parse(WebLogicParser.java:67)at weblogic.xml.jaxp.RegistryParser.parse(RegistryParser.java:130)at javax.xml.parsers.SAXParser.parse(SAXParser.java:276)at javax.xml.parsers.SAXParser.parse(SAXParser.java:174)at org.apache.struts.digester.Digester.parse(Digester.java:755)at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1332)at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)at javax.servlet.GenericServlet.init(GenericServlet.java:82)at com.caucho.server.http.Application.createServlet(Application.java:2755)at com.caucho.server.http.Application.loadServlet(Application.java:2711)at com.caucho.server.http.Application.initServlets(Application.java:1763)at com.caucho.server.http.Application.init(Application.java:1698)at com.caucho.server.http.VirtualHost.init(VirtualHost.java:645)at com.caucho.server.http.ServletServer.initHosts(ServletServer.java:641)at com.caucho.server.http.ServletServer.initInternal(ServletServer.java:515)at
AW: Resin Struts Config Help
hi, I realized that you have putted your struts-config tag in the xml file to the wrong place. it should nest all the other items. test your XML by opening it in the internet explorer. fehmi. -Ursprüngliche Nachricht- Von: Matt Koidin [mailto:[EMAIL PROTECTED]] Gesendet am: Friday, December 14, 2001 3:54 PM An: [EMAIL PROTECTED] Betreff: Resin Struts Config Help I am a new Struts user running Apache and Resin 2.0.4 as my servlet container. I have successfully tested the Apache and Resin configurations. (I am also running WebLogic 6.1 as my application server). If I drop the struts sample .war files into the resin/webapps directory they work fine. I am now trying to get Struts working in my own environment and am running into an error. My directory structure looks like this: Root Folder classes -- compiled classes lib -- struts.jar, xerces.jar, jdbc2_0-stdext.jar web -- jsp -- jsp files -- templates/taglib -- struts .tld files -- WEB-INF -- struts-config.xml, web.xml Attached is my struts-config.xml and web.xml files. Finally here is the error I am seeing: [2001/12/14 09:45:47] org.apache.struts.action.ActionServlet: init [2001/12/14 09:45:47] org.apache.struts.action.ActionServlet: Initializing configuration from resource path /WEB-INF/struts-config.xml [2001/12/14 09:45:48] Parsing error processing resource path /WEB-INF/struts-config.xml org.xml.sax.SAXException: Stopping after fatal error: The markup in the document following the root element must be well-formed. at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1114) at weblogic.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLD ocumentScanner.java:640) at weblogic.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentS canner.java:694) at weblogic.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher.d ispatch(XMLDocumentScanner.java:1520) at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentSca nner.java:381) at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:967) at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) at weblogic.xml.jaxp.WebLogicParser.parse(WebLogicParser.java:67) at weblogic.xml.jaxp.RegistryParser.parse(RegistryParser.java:130) at javax.xml.parsers.SAXParser.parse(SAXParser.java:276) at javax.xml.parsers.SAXParser.parse(SAXParser.java:174) at org.apache.struts.digester.Digester.parse(Digester.java:755) at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1332) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466) at javax.servlet.GenericServlet.init(GenericServlet.java:82) at com.caucho.server.http.Application.createServlet(Application.java:2755) at com.caucho.server.http.Application.loadServlet(Application.java:2711) at com.caucho.server.http.Application.initServlets(Application.java:1763) at com.caucho.server.http.Application.init(Application.java:1698) at com.caucho.server.http.VirtualHost.init(VirtualHost.java:645) at com.caucho.server.http.ServletServer.initHosts(ServletServer.java:641) at com.caucho.server.http.ServletServer.initInternal(ServletServer.java:515) at com.caucho.server.http.ServletServer.init(ServletServer.java:366) at com.caucho.server.http.ResinServer.init(ResinServer.java:407) at com.caucho.server.http.ResinServer.main(ResinServer.java:959) at com.caucho.server.http.HttpServer.main(HttpServer.java:92) [2001/12/14 09:45:48] can't load servlet `oreilly' org.xml.sax.SAXException: Stopping after fatal error: The markup in the document following the root element must be well-formed. at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1114) at weblogic.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLD ocumentScanner.java:640) at weblogic.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentS canner.java:694) at weblogic.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher.d ispatch(XMLDocumentScanner.java:1520) at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentSca nner.java:381) at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:967) at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) at weblogic.xml.jaxp.WebLogicParser.parse(WebLogicParser.java:67) at weblogic.xml.jaxp.RegistryParser.parse(RegistryParser.java:130) at javax.xml.parsers.SAXParser.parse(SAXParser.java:276) at javax.xml.parsers.SAXParser.parse(SAXParser.java:174) at org.apache.struts.digester.Digester.parse(Digester.java:755) at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1332) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466) at javax.servlet.GenericServlet.init(GenericServlet.java:82) at com.caucho.server.http.Application.createServlet(Application.java:2755
NEVERMIND: Resin Struts Config Help
Yep -- I just realized that mistake myself... Please ignore... Thanks for taking a look. - Original Message - From: Hudayioglu, Fehmi [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, December 14, 2001 10:25 AM Subject: AW: Resin Struts Config Help hi, I realized that you have putted your struts-config tag in the xml file to the wrong place. it should nest all the other items. test your XML by opening it in the internet explorer. fehmi. -Ursprüngliche Nachricht- Von: Matt Koidin [mailto:[EMAIL PROTECTED]] Gesendet am: Friday, December 14, 2001 3:54 PM An: [EMAIL PROTECTED] Betreff: Resin Struts Config Help I am a new Struts user running Apache and Resin 2.0.4 as my servlet container. I have successfully tested the Apache and Resin configurations. (I am also running WebLogic 6.1 as my application server). If I drop the struts sample .war files into the resin/webapps directory they work fine. I am now trying to get Struts working in my own environment and am running into an error. My directory structure looks like this: Root Folder classes -- compiled classes lib -- struts.jar, xerces.jar, jdbc2_0-stdext.jar web -- jsp -- jsp files -- templates/taglib -- struts .tld files -- WEB-INF -- struts-config.xml, web.xml Attached is my struts-config.xml and web.xml files. Finally here is the error I am seeing: [2001/12/14 09:45:47] org.apache.struts.action.ActionServlet: init [2001/12/14 09:45:47] org.apache.struts.action.ActionServlet: Initializing configuration from resource path /WEB-INF/struts-config.xml [2001/12/14 09:45:48] Parsing error processing resource path /WEB-INF/struts-config.xml org.xml.sax.SAXException: Stopping after fatal error: The markup in the document following the root element must be well-formed. at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1114) at weblogic.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLD ocumentScanner.java:640) at weblogic.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentS canner.java:694) at weblogic.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher.d ispatch(XMLDocumentScanner.java:1520) at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentSca nner.java:381) at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:967) at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) at weblogic.xml.jaxp.WebLogicParser.parse(WebLogicParser.java:67) at weblogic.xml.jaxp.RegistryParser.parse(RegistryParser.java:130) at javax.xml.parsers.SAXParser.parse(SAXParser.java:276) at javax.xml.parsers.SAXParser.parse(SAXParser.java:174) at org.apache.struts.digester.Digester.parse(Digester.java:755) at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1332) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466) at javax.servlet.GenericServlet.init(GenericServlet.java:82) at com.caucho.server.http.Application.createServlet(Application.java:2755) at com.caucho.server.http.Application.loadServlet(Application.java:2711) at com.caucho.server.http.Application.initServlets(Application.java:1763) at com.caucho.server.http.Application.init(Application.java:1698) at com.caucho.server.http.VirtualHost.init(VirtualHost.java:645) at com.caucho.server.http.ServletServer.initHosts(ServletServer.java:641) at com.caucho.server.http.ServletServer.initInternal(ServletServer.java:515) at com.caucho.server.http.ServletServer.init(ServletServer.java:366) at com.caucho.server.http.ResinServer.init(ResinServer.java:407) at com.caucho.server.http.ResinServer.main(ResinServer.java:959) at com.caucho.server.http.HttpServer.main(HttpServer.java:92) [2001/12/14 09:45:48] can't load servlet `oreilly' org.xml.sax.SAXException: Stopping after fatal error: The markup in the document following the root element must be well-formed. at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1114) at weblogic.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLD ocumentScanner.java:640) at weblogic.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentS canner.java:694) at weblogic.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher.d ispatch(XMLDocumentScanner.java:1520) at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentSca nner.java:381) at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:967) at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) at weblogic.xml.jaxp.WebLogicParser.parse(WebLogicParser.java:67) at weblogic.xml.jaxp.RegistryParser.parse(RegistryParser.java:130) at javax.xml.parsers.SAXParser.parse(SAXParser.java:276) at javax.xml.parsers.SAXParser.parse(SAXParser.java:174) at org.apache.struts.digester.Digester.parse(Digester.java:755