Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread Chris Pratt
It's static, you call it just like I sent in the previous email (*Chris*) On May 23, 2013 4:55 PM, "john lee" wrote: > in the interceptor, > > in order to access ServletActionContext, in the interceptor class, which > interface should be implement? > > tks in advance > > john > >

Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread john lee
in the interceptor,  in order to access ServletActionContext, in the interceptor class, which interface should be implement? tks in advance john From: Chris Pratt To: Struts Users Mailing List ; john lee Sent: Thursday, May 23, 2013 6:25 PM Subject: Re: s

Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread john lee
because if cookie exist, then interceptor can catch it and assign the session object if user open the new webpage. From: "jlm...@gmail.com" To: Struts Users Mailing List ; john lee Sent: Thursday, May 23, 2013 6:25 PM Subject: Re: struts 2 Intercepter Serv

Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread Chris Pratt
ServletActionContext.getRequest().getCookies() (*Chris*) On Thu, May 23, 2013 at 4:20 PM, john lee wrote: > > > thanks, > > so, how can I access Cookie in the interceptor? as my knowledge, to access > cookie, i have to get Servlet first, then get Request object, then access > Cookie.. > > ple

Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread jlmagc
You need to access the request directly. But why do you want to use a cookie in an interceptor? Sent via BlackBerry from T-Mobile -Original Message- From: john lee Date: Thu, 23 May 2013 16:20:08 To: Struts Users Mailing List Reply-To: "Struts Users Mailing List" Subject: Re: struts 2

Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread john lee
thanks, so, how can I access Cookie in the interceptor? as my knowledge, to access cookie, i have to get Servlet first, then get Request object, then access Cookie.. please advise  john From: Chris Pratt To: Struts Users Mailing List ; john lee Sent:

Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread Chris Pratt
You cannot use ServletRequestAware or ServletResponseAware in an Interceptor. (*Chris*) On Thu, May 23, 2013 at 2:58 PM, john lee wrote: > please explain more, thanks in advance > > > > From: Dave Newton > To: Struts Users Mailing List > Sent: Thursday, May

Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread john lee
please explain more, thanks in advance  From: Dave Newton To: Struts Users Mailing List Sent: Thursday, May 23, 2013 4:53 PM Subject: Re: struts 2 Intercepter ServletRequestAware You may have misunderstood what I said. those interfaces are for actions, not

Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread Dave Newton
You may have misunderstood what I said. those interfaces are for actions, not interceptors. On May 23, 2013 5:51 PM, "john lee" wrote: > it is interceptor, the following is struts.xml, (i just not include last > time) > > > > > > class="SecurityVerifySessionIntercepter

Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread john lee
it is interceptor, the following is struts.xml, (i just not include last time)                                                                                                                                                          PageLogin.jsp                     PageMain.jsp            

Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread Dave Newton
That interface is for actions, not interceptors. On May 23, 2013 5:30 PM, "john lee" wrote: > Please advise the following > > for struts2, for an login action, an predefined interceptor is triggered > for checking cookie , the code is the following > > for SecurityVerifySessionIntercepter, i im

struts 2 Intercepter ServletRequestAware

2013-05-23 Thread john lee
Please advise the following for struts2, for an login action, an predefined interceptor is triggered for checking cookie , the code is the following for  SecurityVerifySessionIntercepter, i implement the ServletRequestAware, but get null catached. my question is: for intercepter, Request obje

Re: Custom error message per converter

2013-05-23 Thread Lukasz Lenart
It isn't possible right now, only invalid.fieldvalue. - you can always request the change via https://issues.apache.org/jira/browse/WW Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/5/23 Alfredo Manuel Osorio Martinez : > Conversion errors are always reported with a default

RE: Custom error message per converter

2013-05-23 Thread Alfredo Manuel Osorio Martinez
Conversion errors are always reported with a default message defined in the xwork.default.invalid.fieldvalue (Invalid field value for field "xxx", where xxx is the field name) but what I want is a way to be more specific depending of the type. For example for java.math.BigDecimal a custom messag

RE: Custom error message per converter

2013-05-23 Thread Alfredo Manuel Osorio Martinez
Sure. public class DateConverter extends StrutsTypeConverter { @SuppressWarnings("rawtypes") public Object convertFromString(Map context, String[] values, Class toClass) { if (values != null && values.length > 0 && values[0] != null && values[0].length() > 0) { Si

Re: Custom error message per converter

2013-05-23 Thread Lukasz Lenart
Could you show source code of your DateConverter? Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/5/23 Alfredo Manuel Osorio Martinez : > Hello, > > Is it possible to configure a custom error message per converter? > > For example I have this in my xwork-conversion.properties

Re: S2 Validation XML + Bootstrap

2013-05-23 Thread Lukasz Lenart
Have you tried validate="true" in ? It should work, maybe just add Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/5/23 Frans Thamura : > Hi All > > anyone have idea how to implement validation xml inside s2 > (serverside), and link with bootstrap theme UI. > > the idea is t

Fwd: [ANN] Struts 2.3.14.1 GA (fast track | security)

2013-05-23 Thread J. Garcia
FYI -- Forwarded message -- From: Lukasz Lenart Date: Thu, May 23, 2013 at 9:00 AM Subject: [ANN] Struts 2.3.14.1 GA (fast track | security) To: Struts Users Mailing List The Apache Struts group is pleased to announce that Struts 2.3.14.1 is available as a "General Availability

[ANN] Struts 2.3.14.1 GA (fast track | security)

2013-05-23 Thread Lukasz Lenart
The Apache Struts group is pleased to announce that Struts 2.3.14.1 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