struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlm...@gmail.com
Subject Re: report.conversion.errors
Date Sat, 21 Sep 2013 17:55:03 GMT
I believe you can customize the error messages. Check the documentation.
Sent via BlackBerry from T-Mobile

-----Original Message-----
From: Yaragalla Muralidhar <yaragallamurali@gmail.com>
Date: Sat, 21 Sep 2013 23:20:56 
To: Struts Users Mailing List<user@struts.apache.org>; <jlmagc@gmail.com>
Subject: Re: report.conversion.errors

Hi nice but if the value i get is 'one' instead 1 then i will have
convenience to check whether it is a text or number so that i can send a
customized message instead a message from the framework which is not really
pretty much understandable to the end user. if i can validate with
validators i can send a pretty much customized and understandable messages.

*Thanks and Regards,*
Muralidhar Yaragalla.
*
*


On Sat, Sep 21, 2013 at 11:14 PM, <jlmagc@gmail.com> wrote:

> What is the purpose of validiting a field that cannot be converted to its
> corresponding java type? Let's say you have an int field that should be
> between 0 and 10. If instead of a number, you receive a String like 'one',
> there needs to ba a conversion error, it does not make sense to validate
> that it is between 0 and 10.
>
> JL
> Sent via BlackBerry from T-Mobile
>
> -----Original Message-----
> From: Yaragalla Muralidhar <yaragallamurali@gmail.com>
> Date: Sat, 21 Sep 2013 22:55:03
> To: Struts Users Mailing List<user@struts.apache.org>
> Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
> Subject: Re: report.conversion.errors
>
> This forces me to get all the input data as strings rather than appropriate
> datatype.  is there a a way to rectify this?
>
> *Thanks and Regards,*
> Muralidhar Yaragalla.
> *
> *
>
>
> On Sat, Sep 21, 2013 at 10:53 PM, Yaragalla Muralidhar <
> yaragallamurali@gmail.com> wrote:
>
> > Hi I have a similar kind of problem. The conversion of parameters to java
> > data types are happening before the validation happens. So in this when
> it
> > is not able to convert it displays an error messages saying that invalid
> > input in the field. Is there a way to change the priority. I mean if
> > conversion happens after validation it will be of so much help. is there
> a
> > way for this? please help.
> >
> > *Thanks and Regards,*
> > Muralidhar Yaragalla.
> > *
> > *
> >
> >
> > On Sat, Sep 21, 2013 at 9:18 PM, Lukasz Lenart <lukaszlenart@apache.org
> >wrote:
> >
> >> Where did you find that information?
> >>
> >>
> >> Regards
> >> --
> >> Ɓukasz
> >> + 48 606 323 122 http://www.lenart.org.pl/
> >>
> >> 2013/9/21 Alireza Fattahi <afattahi@yahoo.com>:
> >> > Hi,
> >> >
> >> > I want to stop xwork conversion from showing error during converting
> >> string to int.
> >> > I found report.conversion.errors parameter which must be set in
> >> xwork-conversion.properties
> >> > But it is not working, and during application starup up I get this
> >> error.
> >> > How should I use this parameter
> >> >
> >> > [ERROR] -
> >>  conversion.impl.DefaultConversionPropertiesProcessor:error():
> Conversion
> >> registration error
> >> > java.lang.ClassNotFoundException: false
> >> >  at
> >>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
> >> >  at
> >>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
> >> >  at
> >>
> com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
> >> >  at
> >>
> com.opensymphony.xwork2.ObjectFactory.getClassInstance(ObjectFactory.java:108)
> >> >  at
> >>
> com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:233)
> >> >  at
> >>
> com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:153)
> >> >  at
> >> com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:151)
> >> >  at
> >>
> com.opensymphony.xwork2.conversion.impl.DefaultTypeConverterCreator.createTypeConverter(DefaultTypeConverterCreator.java:23)
> >> >  at
> >>
> com.opensymphony.xwork2.conversion.impl.DefaultConversionPropertiesProcessor.loadConversionProperties(DefaultConversionPropertiesProcessor.java:64)
> >> >  at
> >>
> com.opensymphony.xwork2.conversion.impl.DefaultConversionPropertiesProcessor.process(DefaultConversionPropertiesProcessor.java:40)
> >> >  at
> >>
> com.opensymphony.xwork2.conversion.impl.XWorkConverter.setConversionPropertiesProcessor(XWorkConverter.java:179)
> >> >  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> >  at
> >>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >> >  at
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >> >  at java.lang.reflect.Method.invoke(Method.java:601)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:299)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:438)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:499)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:539)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:593)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:537)
> >> >  at
> >>
> com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:130)
> >> >  at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$ParameterInjector.inject(ContainerImpl.java:469)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.getParameters(ContainerImpl.java:484)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.access$000(ContainerImpl.java:34)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:299)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:438)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:499)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:539)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:593)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:537)
> >> >  at
> >>
> com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:130)
> >> >  at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$ParameterInjector.inject(ContainerImpl.java:469)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.getParameters(ContainerImpl.java:484)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.access$000(ContainerImpl.java:34)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:299)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:438)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:499)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:539)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:593)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:537)
> >> >  at
> >>
> com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:130)
> >> >  at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$ParameterInjector.inject(ContainerImpl.java:469)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.getParameters(ContainerImpl.java:484)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.access$000(ContainerImpl.java:34)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:299)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:438)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:499)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:539)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:593)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:537)
> >> >  at
> >>
> com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:130)
> >> >  at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:514)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:524)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl$9.call(ContainerImpl.java:555)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:584)
> >> >  at
> >>
> com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:553)
> >> >  at
> >>
> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:243)
> >> >  at
> >>
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
> >> >  at
> >>
> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446)
> >> >  at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490)
> >> >  at
> >>
> org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
> >> >  at
> >>
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
> >> >  at
> >>
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
> >> >  at
> >>
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:424)
> >> >  at
> >>
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
> >> >  at
> >>
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
> >> >  at
> >>
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
> >> >  at
> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> >> >  at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
> >> >  at
> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> >> >  at
> >> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
> >> >  at
> >> org.apache.catalina.core.StandardService.start(StandardService.java:525)
> >> >  at
> >> org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
> >> >  at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
> >> >  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> >  at
> >>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >> >  at
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >> >  at java.lang.reflect.Method.invoke(Method.java:601)
> >> >  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> >> >  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> >> >
> >> >
> >> > ~Regards,
> >> > ~~Alireza Fattahi
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message