RE: New York City Struts Group
I'd be in for it. Thanks, Michelle Harris -Original Message- From: Daniel Jaffa [mailto:[EMAIL PROTECTED] Sent: Tue 3/25/2003 15:21 To: Struts Users Mailing List Cc: Subject: New York City Struts Group How many people would be intrested in the formation of a New York City Struts User group. If Atlanta GA, New Jersey can have one so should we. Daniel Jaffa - 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]
RedirectingActionForward
Hello, We are using Struts RedirectingActionForward with Struts 1.1. The base context path is being prepended to the URL. So instead of going to http://dev.server.com/devpage; as we want, it goes to http://localhost:8080/mypage/http://dev.server.com/devpage. The following is outputted prior to the call: URL = http://dev.server.com/devpage DEBUG 2003-01-30 15:56:46,490 [Thread-10] - processForwardConfig(ForwardConfig[name=null,path=http://dev.server.com/devpage s,redirect=true,contextRelative=false]) We *thought* it worked with Struts 1.0. Did anything change? Or what could we be doing wrong. Your help would be greatly appreciated. Many thanks, Michelle Harris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RedirectingActionForward
Thanks. Is this fix already in cvs or a nightly build? If not, we can fix and submit a patch to you. Thanks, Michelle David Graham wrote: This is a known bug that will be fixed before 1.1 final. David From: Michelle Harris [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RedirectingActionForward Date: Mon, 03 Feb 2003 13:09:46 -0500 Hello, We are using Struts RedirectingActionForward with Struts 1.1. The base context path is being prepended to the URL. So instead of going to http://dev.server.com/devpage; as we want, it goes to http://localhost:8080/mypage/http://dev.server.com/devpage. The following is outputted prior to the call: URL = http://dev.server.com/devpage DEBUG 2003-01-30 15:56:46,490 [Thread-10] - processForwardConfig(ForwardConfig[name=null,path=http://dev.server.com/devpage s,redirect=true,contextRelative=false]) We *thought* it worked with Struts 1.0. Did anything change? Or what could we be doing wrong. Your help would be greatly appreciated. Many thanks, Michelle Harris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - 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]
Accessing global forward from Jsp
Hello, We are trying to access a global-forward from a jsp. Does anyone know what we could be doing wrong? Or what we should be looking for? Thanks, Michelle Harris jsp file: html:link forward=SomeGlobalForward paramProperty=SomeGlobalForward paramId=SomeGlobalForward / struts-config.xml global-forwards forward name=SomeGlobalForward path=/CarRequest.do/ /global-forwards Error: [ServletException in:/jsp/car/CodeCityLocatorBody.jsp] Cannot create rewrite URL: java.net.MalformedURLException: Cannot retrive ActionForward named SomeGlobalForward' javax.servlet.ServletException: Cannot create rewrite URL: java.net.MalformedURLException: Cannot retrive ActionForward named SomeGlobalForward at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:494) at org.apache.jsp.SomeFooLocatorBody_jsp._jspService(SomeFooLocatorBody_jsp.java:292) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:118) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:161) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:703) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:818) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:467) at org.apache.jsp.Layout_jsp._jspx_meth_tiles_insert_4(Layout_jsp.java:282) at org.apache.jsp.Layout_jsp._jspx_meth_pagecontainer_pagecontentcontainer_0(Layout_jsp.java:259) at org.apache.jsp.Layout_jsp._jspx_meth_pagecontainer_toplevelcontainer_0(Layout_jsp.java:180) at org.apache.jsp.Layout_jsp._jspService(Layout_jsp.java:85) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:118) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:161) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:703) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:818) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:467) at org.apache.jsp.SomeFooLocator_jsp._jspx_meth_tiles_insert_0(SomeFooLocator_jsp.java:106) at org.apache.jsp.SomeFooLocator_jsp._jspService(SomeFooLocator_jsp.java:55) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1033) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:436) at org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:401) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:505) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853
2nd field doesn't validate, first one does
Hi all, I've been trying to get data validation working. Many thanks for earlier responses. I did get a sample login app up and running. However, the oddest thing happens. The first field, username, validates correctly. However, the second one, password, doesn't validate at all. I'm including my validation.xml file -- hoping I have an error. Any advice would be much appreciated. Many thanks, Michelle form-validation global constant name=phone value=^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$ / constant name=zip value=^\d{5}\d*$ / /global formset constant name=zip value=^\d{5}(-\d{4})?$ / formname=loginForm fieldproperty=username depends=required,mask,minlength arg0 key=loginForm.username.displayname/ arg1 name=minlength key=${var:minlength} resource=false/ var var-namemask/var-name var-value^\w+$/var-value /var var var-nameminlength/var-name var-value5/var-value /var /field fieldproperty=password depends=required,mask,maxlength msg name=mask key=loginForm.password.maskmsg/ arg0 key=loginForm.password.displayname/ arg1 name=maxlength key=${var:maxlength} resource=false/ var var-namemask/var-name var-value^[a-zA-Z]*$/var-value /var var var-namemaxlength/var-name var-value8/var-value /var /field /form /formset /form-validation -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts validating with beta2 not working for server-side validation
I too haven't been able to get server-side validation to work. Although I have been using a different release. When I use validator-1.0 from dwinterfeldt's site, using server side validation results in nothing being validated as described in Bens Kwable message. Thanks, Michelle Harris -Original Message- From: Kwabla, Bens [mailto:[EMAIL PROTECTED]] Sent: Mon 12/16/2002 07:13 To: 'Struts Users Mailing List' Cc: Subject: Struts validating with beta2 not working for server-side validation Hi All! When I switch from client-side to server-side validation, the validation is not effected. Now I called super.validate(..) in the validate(..) method of my formbean (derived from ValidatorForm) and logged out errors.size() which turned out to be 0, apparently indicating that my errors Object is empty. I further checked the ValidatorForm.validate(..) method of the latest nightly build and saw this code... public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ServletContext application = getServlet().getServletContext(); ActionErrors errors = new ActionErrors(); Validator validator = Resources.initValidator(mapping.getAttribute(), this, application, request, errors, page); try { validatorResults = validator.validate(); } catch (ValidatorException e) { log.error(e.getMessage(), e); } return errors; } What I don't understand is the errors Object is returned, but I don't see when it is filled with the validation results. Is it likely there is a bug in here? -Ursprüngliche Nachricht- Von: David Graham [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 13. Dezember 2002 18:43 An: [EMAIL PROTECTED] Betreff: Re: Struts validating with beta2 not working You need to tell us exactly what not working means. Did you replace all the jars in WEB_INF/lib with the new ones for beta 2? David From: Kwabla, Bens [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Struts validating with beta2 not working Date: Fri, 13 Dec 2002 14:40:30 +0100 Hi All! I had the client-side validation working under struts version before the beta 2. Now my application has been migrated to the beta 2 of struts. Since then, my client-side validation is no longer working. I understand the validating logic has been adopted into commons. Can some tell me what is happening? Bens Kwabla -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 13. Dezember 2002 14:35 An: [EMAIL PROTECTED]; [EMAIL PROTECTED] Betreff: RE: Re: OptionsCollection Hi, There are many ways of doing this.So first is as the collection is being displayed on screen,make it an attribute of form and popolate it in action on form.So in jsp u will access like a form attribute. But the problem with this approach is If u get an error and forward back the user to same jsp, u loose the collection data as u are directly going to the screen.So the solution could be have a generic action which will be called in case of errors and the action will populate form with list before forwarding it to same jsp. Else U can have lazy in itialising forms.i.e forms getList emthod itself will call service to get data if list is null.And then in this case ,u can just use an epty action class which does nothing but forwarsd to success which is the origicnal jsp.But this action will be mapped with the Original actions form so that the form will use its auto population mechanism to get the list..But i dont like this approach ..just not a good design i think.But very conveninent. Hope this helps, Regards, Shirish -Original Message
Re: Struts validating with beta2 not working for server-side validation
I correct myself. The validation didn't appear to get called because the flag wasn't set and there were xml errors in validation.xml. My bad. Though we are still getting strange exceptionsso it's not working for us (yet). Best, Michelle Michelle Harris wrote: I too haven't been able to get server-side validation to work. Although I have been using a different release. When I use validator-1.0 from dwinterfeldt's site, using server side validation results in nothing being validated as described in Bens Kwable message. Thanks, Michelle Harris -Original Message- From: Kwabla, Bens [mailto:[EMAIL PROTECTED]] Sent: Mon 12/16/2002 07:13 To: 'Struts Users Mailing List' Cc: Subject: Struts validating with beta2 not working for server-side validation Hi All! When I switch from client-side to server-side validation, the validation is not effected. Now I called super.validate(..) in the validate(..) method of my formbean (derived from ValidatorForm) and logged out errors.size() which turned out to be 0, apparently indicating that my errors Object is empty. I further checked the ValidatorForm.validate(..) method of the latest nightly build and saw this code... public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ServletContext application = getServlet().getServletContext(); ActionErrors errors = new ActionErrors(); Validator validator = Resources.initValidator(mapping.getAttribute(), this, application, request, errors, page); try { validatorResults = validator.validate(); } catch (ValidatorException e) { log.error(e.getMessage(), e); } return errors; } What I don't understand is the errors Object is returned, but I don't see when it is filled with the validation results. Is it likely there is a bug in here? -Ursprüngliche Nachricht- Von: David Graham [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 13. Dezember 2002 18:43 An: [EMAIL PROTECTED] Betreff: Re: Struts validating with beta2 not working You need to tell us exactly what not working means. Did you replace all the jars in WEB_INF/lib with the new ones for beta 2? David From: Kwabla, Bens [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Struts validating with beta2 not working Date: Fri, 13 Dec 2002 14:40:30 +0100 Hi All! I had the client-side validation working under struts version before the beta 2. Now my application has been migrated to the beta 2 of struts. Since then, my client-side validation is no longer working. I understand the validating logic has been adopted into commons. Can some tell me what is happening? Bens Kwabla -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 13. Dezember 2002 14:35 An: [EMAIL PROTECTED]; [EMAIL PROTECTED] Betreff: RE: Re: OptionsCollection Hi, There are many ways of doing this.So first is as the collection is being displayed on screen,make it an attribute of form and popolate it in action on form.So in jsp u will access like a form attribute. But the problem with this approach is If u get an error and forward back the user to same jsp, u loose the collection data as u are directly going to the screen.So the solution could be have a generic action which will be called in case of errors and the action will populate form with list before forwarding it to same jsp. Else U can have lazy in itialising forms.i.e forms getList emthod itself will call service to get data if list is null.And then in this case ,u can just use an epty action class which does nothing but forwarsd to success which is the origicnal jsp.But this action will be mapped with the Original actions form so that the form will use its auto population mechanism to get the list..But i dont like this approach ..just not a good design i think.But very conveninent. Hope this helps, Regards, Shirish -Original Message- From: marklowe [mailto:[EMAIL PROTECTED]] Sent: Friday, December 13, 2002 12:12 PM To: struts-user Cc: marklowe Subject: Re: OptionsCollection Okay... But a drop down menu is screen data. And a list of companies is something that will be used more than once. So I have a normal class in my model layer ListCompanies In my UserAction (ListCompanies).getCompanies(); But this Action's primary job is to return a list of users (which it does). As the list is screen data i should be defining this in my form bean? This is something thats being confusing me for weeks. If i've a bunch of collections how can i make them available to iterate tags and select menus, without
Error using Validator (newbie)
Hello, I'm very new to using the Struts' Validator (have been using Husted's Struts In Action as a guide). I am trying most to use Validator in Struts 1.0.2 as that is required by my company. However, I have tried my webapp in Struts 1.1 in an attempt to get it to work as well. When I hit the submit button on a simple login form, I get a NullPointerException in version 1.0.2 and a regular Exception in 1.1. Both exceptions have the following line in common: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) However, the Struts 1.1 gives more information and says that the root cause is because java.lang.NoSuchFieldError: org.apache.commons.validator.Validator: field SERVLET_CONTEXT_KEY not found. Of course, my form doesn't contain a field called SERVLET_CONTEXT_KEY. I am running Tomcat 4.1.12 with java 1.3. I am attaching the stack traces for Struts 1.0 and for Struts 1.1. Any help you could give on this would be greatly appreciated. Many thanks, Michelle Harris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Error using Validator (newbie)
My bad. I forgot the attachments. Here they are. Thanks again, Michelle Michelle Harris wrote: Hello, I'm very new to using the Struts' Validator (have been using Husted's Struts In Action as a guide). I am trying most to use Validator in Struts 1.0.2 as that is required by my company. However, I have tried my webapp in Struts 1.1 in an attempt to get it to work as well. When I hit the submit button on a simple login form, I get a NullPointerException in version 1.0.2 and a regular Exception in 1.1. Both exceptions have the following line in common: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) However, the Struts 1.1 gives more information and says that the root cause is because java.lang.NoSuchFieldError: org.apache.commons.validator.Validator: field SERVLET_CONTEXT_KEY not found. Of course, my form doesn't contain a field called SERVLET_CONTEXT_KEY. I am running Tomcat 4.1.12 with java 1.3. I am attaching the stack traces for Struts 1.0 and for Struts 1.1. Any help you could give on this would be greatly appreciated. Many thanks, Michelle Harris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Stack trace for 1.0.2. java.lang.NullPointerException at org.apache.commons.validator.Validator.(Unknown Source) at org.apache.struts.validator.action.ValidatorForm.initValidator(Unknown Source) at org.apache.struts.validator.action.ValidatorForm.validate(Unknown Source) at org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:2039) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1498) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:505) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:512) 2002-12-11 17:01:34 StandardWrapperValve[strutstest]: Servlet.service() for servlet strutstest threw exception javax.servlet.ServletException: Servlet execution threw an exception
Which Validator for Struts 1.0?
Hello, Which is the best src to download to use Validator with Struts 1.0? Also, does anyone happen to know when Struts 1.1 will be final? Thanks so much, Michelle -- Michelle Harris | Developer www.site59.com 45 W. 21st St., 4th Floor New York, NY 10010 212.991.1203 Site59, a Travelocity Company -- www.site59.com Providing dynamic technology solutions to the world's leading travel websites es -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Validator question
Hello, I am new to using Struts' Validator framework and am trying to write a sample application based on the example distributed with Validator download from D. Winterfeldt's site. In the file jsRegistration.jsp, there are the following lines: html:form action=registration onsubmit=return validateRegistrationForm(this); html:hidden property=action/ Can anyone tell me why there is the call to validateRegistrationForm onsubmit and what the hidden property for action is for? Thank you very much, Michelle -- Michelle Harris | Developer www.site59.com 45 W. 21st St., 4th Floor New York, NY 10010 212.991.1203 Site59, a Travelocity Company -- www.site59.com Providing dynamic technology solutions to the world's leading travel websites es -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]