Re: Struts - XWork validation - error message not taking parameters
2018-03-15 14:18 GMT+01:00 Vikul Aggarwal : > Hi > > I am using xwork validation to valid whether the value of an integer falls > in a valid range or not. > > This is how the validator is configured: > > > 0 > 9 > > > > > int validator is com.opensymphony.xwork2.valida > tor.validators.IntRangeFieldValidator > > The message import.validRange is present in the properties file and is as > follows: > > import.validRange=${fieldName}: You must enter a value in the range ${min} > and ${max}. > > However, when the validation runs the message that is printed is as follows: > > You must enter a value in the range ognl.NoConversionPossible and > ognl.NoConversionPossible. What's a type of the field? I have pushed an additional code snippet to show how the IntRangeValidator works https://github.com/apache/struts-examples/tree/master/form-xml-validation Regards Łukasz - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
[ANN] Apache Struts 2.5.16 GA
The Apache Struts group is pleased to announce that Struts 2.5.16 is available as a “General Availability” release. The GA designation is our highest quality grade. Apache Struts 2 is an elegant, extensible framework for creating enterprise-ready Java web applications. The framework is designed to streamline the full development cycle, from building, to deploying, to maintaining applications over time. Below is a full list of all changes: - unclosed instantiation of PrintWriter - Http Sessions forcefully created for all requests using I18nInterceptor with default Storage value. - NotSerializableException - org.apache.struts2.dispatcher.StrutsRequestWrapper - NotSerializableException: com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector when using ExecuteAndWait interceptor - ClassCastException in JarEntryRevision - Dependency Mapping Exception When Using PrefixBasedActionProxyFactory - The converter() method of com.opensymphony.xwork2.conversion.annotations.TypeConversion is now deprecated. If this method is removed in some next release, it will forbid to describe a converter by the name (id) of a Spring bean. - Conversion by annotation does not work - List of Boolean is not populated in Action class - JSONResult exception in struts2-json-plugin-2.5.14.1.jar - buttons with name="method:METHODNAME" sometimes ignore global-allowed-methods defined in struts.xml - Could not create JarEntryRevision for [zip:C:/ unknown protocol c - NPE in I18nInterceptor$SessionLocaleHandler.read - JasperReportResult: NPE When Not Using SQL Connection - support JSR 303 Validation Groups in BeanValidation-Plugin - Debug tag should not display anything when not in dev mode - Allow using of Initializable interface on an implementation level - Allowed methods inheritance - Allow use Jackson XML bindings to serialise / deserialise XML - when using an custom array as a filed in struts 2 action form textfiled data from jsp page in not populating into custom array but populating in String array or array list - Upgrade Spring to version 4.3.13 - Update Log4j2 to 2.10.0 Please read the Version Notes to find more details about performed bug fixes and improvements. https://cwiki.apache.org/confluence/display/WW/Version+Notes+2.5.16 All developers are strongly advised to perform this action. The 2.5.x series of the Apache Struts framework has a minimum requirement of the following specification versions: Servlet API 2.4, JSP API 2.0, and Java 7. Should any issues arise with your use of any version of the Struts framework, please post your comments to the user list, and, if appropriate, file a tracking ticket. You can download this version from our download page. http://struts.apache.org/download.cgi#struts-ga Kind regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts2 login action class seems to be reused
On 3/16/2018 1:49 AM, Prasanth Pasala wrote: > We do have login time, using that and the IP to correlate that with the > access logs. Not all login entries have corresponding POST entries in access > log, so those would be our problems occurrences. > They actual correspond to a GET entry from a user. > > IP of the GET request of User1 matches with the login record in the database > (login would be for User2 id and IP from User1 GET). So it looks as if the > same user logged in from two different IPs > around the same time, which shouldn't be the case. I'm almost sure Struts always asks object factory to create the action on each request. This is belong to object factory if create a new one object of that action, or no, reuse a previous one object of an action. So have you set any specific object factory via struts.xml? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts2 login action class seems to be reused
We have a pretty standard struts.xml just declaration of action and the class along with the results (tiles results). Nothing other than that. On 03/16/2018 11:55 AM, Yasser Zamani wrote: > > On 3/16/2018 1:49 AM, Prasanth Pasala wrote: >> We do have login time, using that and the IP to correlate that with the >> access logs. Not all login entries have corresponding POST entries in access >> log, so those would be our problems occurrences. >> They actual correspond to a GET entry from a user. >> >> IP of the GET request of User1 matches with the login record in the database >> (login would be for User2 id and IP from User1 GET). So it looks as if the >> same user logged in from two different IPs >> around the same time, which shouldn't be the case. > I'm almost sure Struts always asks object factory to create the action > on each request. This is belong to object factory if create a new one > object of that action, or no, reuse a previous one object of an action. > So have you set any specific object factory via struts.xml? > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org >
Re: Struts2 login action class seems to be reused
And you confirm that those log record insertions are only possible via LoginAction.execute method? Right? Or util.authenticate are called elsewhere also? On Mar 16, 2018, at 9:45PM, Prasanth Pasala mailto:ppas...@pangburngroup.com>> wrote: We have a pretty standard struts.xml just declaration of action and the class along with the results (tiles results). Nothing other than that. On 03/16/2018 11:55 AM, Yasser Zamani wrote: On 3/16/2018 1:49 AM, Prasanth Pasala wrote: We do have login time, using that and the IP to correlate that with the access logs. Not all login entries have corresponding POST entries in access log, so those would be our problems occurrences. They actual correspond to a GET entry from a user. IP of the GET request of User1 matches with the login record in the database (login would be for User2 id and IP from User1 GET). So it looks as if the same user logged in from two different IPs around the same time, which shouldn't be the case. I'm almost sure Struts always asks object factory to create the action on each request. This is belong to object factory if create a new one object of that action, or no, reuse a previous one object of an action. So have you set any specific object factory via struts.xml? To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts2 login action class seems to be reused
There is only one reference to Util.authenticate in the project and that is in LoginAction. On 03/16/2018 02:13 PM, Yasser Zamani wrote: > And you confirm that those log record insertions are only possible via > LoginAction.execute method? Right? Or util.authenticate are called elsewhere > also? > On Mar 16, 2018, at 9:45PM, Prasanth Pasala > mailto:ppas...@pangburngroup.com>> wrote: > > We have a pretty standard struts.xml just declaration of action and the class > along with the results (tiles results). Nothing other than that. > > On 03/16/2018 11:55 AM, Yasser Zamani wrote: > > On 3/16/2018 1:49 AM, Prasanth Pasala wrote: > We do have login time, using that and the IP to correlate that with the > access logs. Not all login entries have corresponding POST entries in access > log, so those would be our problems occurrences. > They actual correspond to a GET entry from a user. > > IP of the GET request of User1 matches with the login record in the database > (login would be for User2 id and IP from User1 GET). So it looks as if the > same user logged in from two different IPs > around the same time, which shouldn't be the case. > I'm almost sure Struts always asks object factory to create the action > on each request. This is belong to object factory if create a new one > object of that action, or no, reuse a previous one object of an action. > So have you set any specific object factory via struts.xml? > > > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >