tag:blogger.com,1999:blog-18313336.post5309113941697281712..comments2024-03-28T08:40:36.084-04:00Comments on Abhi On Java: Struts 2: Validationabhihttp://www.blogger.com/profile/05788965755655733389noreply@blogger.comBlogger27125tag:blogger.com,1999:blog-18313336.post-16943029862717563102020-10-15T23:12:09.454-04:002020-10-15T23:12:09.454-04:00I value the blog post.Really looking forward to re...I value the blog post.Really looking forward to read more. Really Cool.<br /><a href="https://www.kitsonlinetrainings.com/course/python-online-training" rel="nofollow">Python Django online online training</a><br /><a href="https://www.kitsonlinetrainings.com/course/r-programming-online-training" rel="nofollow">R Programming</a>KITS Technologieshttps://www.blogger.com/profile/01255736173821596606noreply@blogger.comtag:blogger.com,1999:blog-18313336.post-55632422192872901222009-05-06T08:54:00.000-04:002009-05-06T08:54:00.000-04:00Hi Abhi I am new to struts2.1.6 when I use client ...Hi Abhi I am new to struts2.1.6 when I use client side validation by making validate="true" in form tag It works fine but if any error message was present previously It is shown as it is and other error messages are repating. So what is the solution? Any help is appriciated well in advance....Mihir Mistryhttps://www.blogger.com/profile/16157692764531493812noreply@blogger.comtag:blogger.com,1999:blog-18313336.post-57501557888311086962009-03-06T01:23:00.000-05:002009-03-06T01:23:00.000-05:00HiI am Deepak I am using Struts2 and xml validatio...Hi<BR/>I am Deepak <BR/>I am using Struts2 and xml validation <BR/>in action i had given 2 methods fetch and insert<BR/>insert method works fine with validation when action submitted<BR/>but for fetch when i m going to call action validations are performed and and return to page with out excuting the fetch method<BR/><BR/>how should i diable validation for fetch method<BR/><BR/>my mail id<BR/>deepak.mule@lntinfotech.comdeepak mulehttps://www.blogger.com/profile/00854538572130010756noreply@blogger.comtag:blogger.com,1999:blog-18313336.post-4205140993299630642008-09-04T06:51:00.000-04:002008-09-04T06:51:00.000-04:00my email id is nav1st at gmail.commy email id is nav1st at gmail.comTOUCH FEELhttps://www.blogger.com/profile/06426656502053074109noreply@blogger.comtag:blogger.com,1999:blog-18313336.post-42367840206865627432008-09-04T06:49:00.000-04:002008-09-04T06:49:00.000-04:00hi abhi,i am new to Struts2 so please help me to e...hi abhi,<BR/>i am new to Struts2 so please help me to execute a HelloWorld program.<BR/><BR/>when i delete the filter and filter-mapping tags from the web.xml file then the project get deployed successfully....and otherwise i am not able to deploy it....whats the problem......<BR/>....can u mail me on my email idAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-18313336.post-51484244171880150852008-08-20T05:58:00.000-04:002008-08-20T05:58:00.000-04:00can u give me solution for ajax submit. i am strug...can u give me solution for ajax submit. i am struggling with this code below.<BR/><BR/>login.jsp <BR/>-------- <BR/>div id="id1"<BR/>s:form id="myform" action="login" <BR/>s:textfield name="username"/ <BR/>s:submit type="submit" theme="ajax" targets="id1"/<BR/>/div <BR/>/code<BR/>In struts.xml, result type="success"login.jsp/result<BR/><BR/>(I left out the > & < tag symbol, please regret for this.)<BR/><BR/>i am getting field error validation message.<BR/><BR/>Please help me.MY THOUGHTShttps://www.blogger.com/profile/17842844369241186958noreply@blogger.comtag:blogger.com,1999:blog-18313336.post-25539541413622908862008-07-11T07:33:00.000-04:002008-07-11T07:33:00.000-04:00well.. i saw the example but i could not figure ou...well.. i saw the example but i could not figure out where u have used DWR functionality.. cause I believe just mapping does not means that u r using DWR. Though I am not very much familiar with DWR but i can still understand that there is only mapping not implementationAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-18313336.post-25748159517513050012008-06-03T08:08:00.000-04:002008-06-03T08:08:00.000-04:00Hi all,I found out that you need to extend ActionS...Hi all,<BR/>I found out that you need to extend ActionSupport class in order to support validation. Also after some wrong input while showing the messages css is not applied can anyone tell how to do that<BR/>Also enable javascriptAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-18313336.post-39173137935230116552008-04-16T01:21:00.000-04:002008-04-16T01:21:00.000-04:00Hi evry1!M working on struts2 validation using XML...Hi evry1!<BR/>M working on struts2 validation using XML. M using a custom tag (instead of datetimepicker) for date selection ,since i was facing problems in making the textfield of the datetimepicker readonly.<BR/>My problem is dat the first validation is displayed below the field. wat shud i do to get it above the field? need ur help in this rgrd.<BR/>Thanx in advance<BR/>JoslinUnknownhttps://www.blogger.com/profile/15932339220775800495noreply@blogger.comtag:blogger.com,1999:blog-18313336.post-17031037168113863652008-04-16T01:19:00.000-04:002008-04-16T01:19:00.000-04:00This comment has been removed by the author.Unknownhttps://www.blogger.com/profile/15932339220775800495noreply@blogger.comtag:blogger.com,1999:blog-18313336.post-47039698018274859742008-04-16T01:18:00.000-04:002008-04-16T01:18:00.000-04:00Hi evryM working on struts2 validation using XML. ...Hi evry<BR/>M working on struts2 validation using XML. M using a custom tag instead of datetimepicker for date selection since i was facing problems in making the textfield of the datetimepicker readonly.<BR/>My problem is dat the first validation is displayed below the field. wat shud i do to get it above the field? need ur help in this rgrd.<BR/>Thanx in advance<BR/>JoslinUnknownhttps://www.blogger.com/profile/15932339220775800495noreply@blogger.comtag:blogger.com,1999:blog-18313336.post-9655718981356232162008-02-19T06:51:00.000-05:002008-02-19T06:51:00.000-05:00Hi everybody,great post Abhi!Do you know how to ch...Hi everybody,<BR/>great post Abhi!<BR/>Do you know how to check if two dates submitted are greater and less than today?? in other words that today is between "dateStart" and "dateEnd".<BR/><BR/>I need something like that:<BR/><BR/> field name="todayDate"<BR/> field-validator type="date" param name="min" ${dateStart} /param<BR/> param name="max" ${dateEnd} /param<BR/> message key ="error.field.invalid_format" /<BR/> /field-validator<BR/> /field<BR/><BR/><BR/>where dateStart and dateEnd are two others field name declared as date.<BR/><BR/>Note: If I do that I get a java.lang.NoSuchMethodException: setMin(java.lang.String) and the same about max<BR/><BR/>Thanks a lot for your helpFedericoGentiluccihttps://www.blogger.com/profile/11730502747788241817noreply@blogger.comtag:blogger.com,1999:blog-18313336.post-17488113705686664912007-12-19T01:53:00.000-05:002007-12-19T01:53:00.000-05:00hai i am using client-side validation in struts 2....hai i am using client-side validation in struts 2.but when i submit the error message display each time.<BR/>and if i enter data to validating field then the error will not go and the action didnot work.<BR/><BR/>can u help meKannanhttps://www.blogger.com/profile/08022800483767937805noreply@blogger.comtag:blogger.com,1999:blog-18313336.post-26160859448369001052007-12-18T00:33:00.000-05:002007-12-18T00:33:00.000-05:00i did the configurations exactly as mentioned. But...i did the configurations exactly as mentioned. But hte page is not getting validated by ajax. My page has custom client side js and when i clink on any check box (conneted with custom -js) i get an alert with 'null' string in it and in the backend i see exceptions: <BR/>1113743 [http-8080-Processor23] WARN uk.ltd.getahead.dwr.impl.ExecuteQuery - Method execution failed:<BR/>java.lang.NullPointerException<BR/> at org.apache.struts2.validators.DWRValidator.doPost(DWRValidator.java:85)<BR/> at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source)<BR/> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<BR/> at java.lang.reflect.Method.invoke(Method.java:585)<BR/> at uk.ltd.getahead.dwr.impl.ExecuteQuery.execute(ExecuteQuery.java:233)<BR/> at uk.ltd.getahead.dwr.impl.DefaultExecProcessor.handle(DefaultExecProcessor.java:48)<BR/> at uk.ltd.getahead.dwr.impl.DefaultProcessor.handle(DefaultProcessor.java:83)<BR/> at uk.ltd.getahead.dwr.AbstractDWRServlet.doPost(AbstractDWRServlet.java:162)<BR/> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)<BR/> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)<BR/> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)<BR/> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<BR/> at admin.util.UTF8Filter.doFilter(UTF8Filter.java:27)<BR/> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<BR/> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<BR/> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)<BR/> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)<BR/> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)<BR/> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)<BR/> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)<BR/> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)<BR/> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)<BR/> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)<BR/> at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)<BR/> at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)<BR/> at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)<BR/> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)<BR/> at java.lang.Thread.run(Thread.java:595)<BR/><BR/><BR/>any idea what went wrong?ravihttps://www.blogger.com/profile/03458316929180261229noreply@blogger.comtag:blogger.com,1999:blog-18313336.post-67148785327732909462007-11-30T00:34:00.000-05:002007-11-30T00:34:00.000-05:00Hi Abhi.. What if you have two text fields on the ...Hi Abhi.. What if you have two text fields on the page from which you can enter a value in either one. When i use the requiredstring type validation on the page, and provide a value to one, the validation kicks in for the other one. can you guide me with this. Do i need to use a different validation type ?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18313336.post-31966508070725113372007-11-22T02:20:00.000-05:002007-11-22T02:20:00.000-05:00Try the following link...http://struts.apache.org/...Try the following link...<BR/>http://struts.apache.org/2.x/docs/bootstrap.html<BR/><BR/>San.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18313336.post-90714728069321560922007-09-18T23:50:00.000-04:002007-09-18T23:50:00.000-04:00hi,i'm trying to do validation using Struts2-valid...hi,<BR/>i'm trying to do validation using Struts2-validation interceptor and had some confusing about certain things...<BR/>1) may i know which directory should i put <B>ActionClassName-validation.xml</B>?<BR/>2) how to configure <B> ActionClassName-validation.xml</B> with other related files so that my validation can work properly?<BR/>plz reply my ques ASAP. i really need ur help.<BR/>thanks in advance ;)<BR/>-azu-Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18313336.post-12245467810126290212007-09-17T04:09:00.000-04:002007-09-17T04:09:00.000-04:00hi abhi,can i know how do i create search criteria...hi abhi,<BR/><BR/>can i know how do i create search criteria using ajax and struts..<BR/>can i get the sample codding <BR/><BR/>thanxAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-18313336.post-52607249668733373922007-09-14T07:49:00.000-04:002007-09-14T07:49:00.000-04:00hi, Abhi,any way you are doing a very great servic...hi, Abhi,<BR/>any way you are doing a very great service.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18313336.post-49815704613277114182007-09-10T15:34:00.000-04:002007-09-10T15:34:00.000-04:00Some one fix this error: Anonymous said... I fo...Some one fix this error:<BR/><BR/><I><B><BR/> Anonymous said...<BR/><BR/> I followed the steps you had mentioned. I get a message in Firefox as 'ReferenceError: validateForm_[formId] is not defined'<BR/><BR/> Here formId is the id of the form I submit.<BR/><BR/> In IE, Its nots working and I don even get any message on the browser screen.<BR/><BR/> I am using Tomact 5.5 and Java 1.6<BR/> 1:05 AM<BR/><BR/></I></B>Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18313336.post-74707311725816934232007-08-22T11:34:00.000-04:002007-08-22T11:34:00.000-04:00Hello all,I have search for a similar solution as ...Hello all,<BR/><BR/>I have search for a similar solution as in struts 1.X ({0} is required and {0} filled in xml validation file), but I haven't found its equivalence.<BR/><BR/>Suppose we have, as you mentioned:<BR/><BR/>requiredstring = ${getText(fieldName)} is required.<BR/>fieldFormat = ${getText(fieldName)} is not formatted properly.<BR/><BR/>and this validator:<BR/><validators><BR/><field name="userName"><BR/> <field-validator type="requiredstring"><BR/> <message key="requiredstring" /><BR/> </field-validator><BR/></field><BR/><BR/>userName would be an input field:<BR/><input type="text" name="userName" ..... /><BR/><BR/>An error after the for is submitted will be displayed as:<BR/>userName is required.<BR/><BR/>What about if the desirable output is another entry in bundle? Such as:<BR/>User name is required.<BR/><BR/>Where "User name" is not the field name in the <input type="text" name="userName"...> tag.<BR/><BR/>Even worse, if the application uses internationalization, we would have in a second resource bundle, in spanish for instance:<BR/> ${getText(fieldName)} es requerido.<BR/><BR/>and still the output will be:<BR/>userName es requerido.<BR/><BR/>Can this be done in struts/webwork?<BR/><BR/>Regards,<BR/>OOAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-18313336.post-16236705752461012982007-07-28T20:14:00.000-04:002007-07-28T20:14:00.000-04:00Maybe this will help someone else.I had this (vali...Maybe this will help someone else.<BR/><BR/>I had this (validation) setup from when I was using WebWork 2.2.5 and I am now upgrading to Struts 2.0.9 from WebWork. After making all my other changes and testing my site, I received the following error:<BR/><BR/>org.xml.sax.SAXParseException: Document is invalid: no grammar found.<BR/><BR/>I searched the net but didn't find a direct solution, just a few links about other people having similar issues and that the DTD must be missing. I opened the xwork-2.0.4.jar that comes with Struts 2.0.9 and found the file xwork-validator-config-1.0.dtd. Inserting the string documented in that file fixed my problem.Justinhttps://www.blogger.com/profile/13862878603530065493noreply@blogger.comtag:blogger.com,1999:blog-18313336.post-30926161410981267372007-07-10T09:09:00.000-04:002007-07-10T09:09:00.000-04:00Hi,I am using struts 2.I have written my customise...Hi,<BR/>I am using struts 2.<BR/>I have written my customised java class to do the form validation within<BR/>the action class.<BR/>I want to render the validation error messages from a property file and not<BR/>hard coding it into the code.<BR/><BR/>What i understand is the struts ActionSupport class has<BR/>addActionError(String msg) which takes a error messages,<BR/>Can anyone help me how can I set the error key in the validation class?<BR/><BR/>Manoj.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18313336.post-36963658668698691682007-06-26T03:27:00.000-04:002007-06-26T03:27:00.000-04:00Hi,I'm trying to compare the value of the textfiel...Hi,<BR/><BR/>I'm trying to compare the value of the textfield witha String using field expression.But it isnt working.Any clue?<BR/><BR/>thanks<BR/>ANAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-18313336.post-6782665675083391842007-06-11T01:05:00.000-04:002007-06-11T01:05:00.000-04:00I followed the steps you had mentioned. I get a me...I followed the steps you had mentioned. I get a message in Firefox as 'ReferenceError: validateForm_[formId] is not defined' <BR/><BR/>Here formId is the id of the form I submit.<BR/><BR/>In IE, Its nots working and I don even get any message on the browser screen. <BR/><BR/>I am using Tomact 5.5 and Java 1.6Anonymousnoreply@blogger.com