Import the Cookie class, and get the cookies from the request, not the
class of the request?
Dave
On Wed, May 15, 2013 at 4:56 PM, john lee sh_thorn_b...@yahoo.com wrote:
I have no difficulty to handle cookie in struts 1, but have lots of error
in struts 2
i have the following program
You might want to look into the CookiesAware interface. It's a better way
of accessing cookies. Here's a good post on handling Cookies in Struts 2:
http://omkarp.blogspot.com/2007/07/working-with-cookies-in-struts2.html
(*Chris*)
On Wed, May 15, 2013 at 2:14 PM, Dave Newton
(With the caveat that the interface is really for actions, while the OP
seems to be working inside an interceptor.)
Dave
On Wed, May 15, 2013 at 5:25 PM, Chris Pratt thechrispr...@gmail.comwrote:
You might want to look into the CookiesAware interface. It's a better way
of accessing
Ah, my bad, you are correct, Dave.
John, like Dave pointed out, you should be using:
import javax.servlet.Cookie;
Cookie[] cookieList = ServletActionContext.getRequest().getCookies();
(*Chris*)
On Wed, May 15, 2013 at 2:41 PM, Dave Newton davelnew...@gmail.com wrote:
(With the caveat that
thanks, in my program, after i import it, the compile error is gone.
From: Chris Pratt thechrispr...@gmail.com
To: Struts Users Mailing List user@struts.apache.org
Cc: john lee sh_thorn_b...@yahoo.com
Sent: Wednesday, May 15, 2013 4:54 PM
Subject: Re: Cookie
Em 27-05-2010 11:27, Vishnu Vyasan Nelliparmbil escreveu:
Hi Guys,
I am handling a application in which we have application in two
languages. There is a Locale action for setting locale to English or
Arabic based on the parameter being passed from the respective index
pages. I.e. index_en.jsp
Musachy Barroso wrote:
It is a bug. This interceptor was added in 2.0.7, and it was never
added to struts-default.xml in the 2.1 branch. Just add this to your
struts.xml:
interceptor name=cookie
class=org.apache.struts2.interceptor.CookieInterceptor/
for reference:
That explains my deja vu feeling :)
musachy
On Wed, Feb 11, 2009 at 7:36 AM, Andy Law andy@roslin.ed.ac.uk wrote:
Musachy Barroso wrote:
It is a bug. This interceptor was added in 2.0.7, and it was never
added to struts-default.xml in the 2.1 branch. Just add this to your
struts.xml:
|#]
From: Musachy Barroso musa...@gmail.com
To: Struts Users Mailing List user@struts.apache.org
Sent: Monday, February 9, 2009 5:20:45 PM
Subject: Re: Cookie Intercepter configuration
There should be a more meaningful exception down there in the log, can
you post the whole stack trace?
musachy
List user@struts.apache.org
Subject: Re: Cookie Intercepter configuration
Is there a library that I should be including?
[#|2009-02-10T08:19:42.441-0500|INFO|sun-appserver9.1|org.apache.struts2.spring.StrutsSpringObjectFactory|_ThreadID=22;_ThreadName=httpWorkerThread-4848-1;|...
initialized
From: Dave Newton newton.d...@yahoo.com
To: Struts Users Mailing List user@struts.apache.org
Sent: Monday, February 9, 2009 9:27:02 PM
Subject: Re: Cookie Intercepter configuration
Norris Shelton wrote:
Struts 2.1.6 on Glassfish 9.1_02
I am trying to configure the cookie
Sent: Tuesday, February 10, 2009 8:55:11 AM
Subject: Re: Cookie Intercepter configuration
what's the
file:/C:/dev/sun/sjas9_1_u2/domains/domain1/applications/j2ee-modules/conap/WEB-INF/classes/struts.xml:17:44
show text!
--
From: Norris Shelton
To: Struts Users Mailing List user@struts.apache.org
Sent: Monday, February 9, 2009 9:27:02 PM
Subject: Re: Cookie Intercepter configuration
Norris Shelton wrote:
Struts 2.1.6 on Glassfish 9.1_02
I am trying to configure the cookie intercepter, but it looks like I am
missing something.
I have
Subject: Re: Cookie Intercepter configuration
what's the
file:/C:/dev/sun/sjas9_1_u2/domains/domain1/applications/j2ee-modules/conap/WEB-INF/classes/struts.xml:17:44
show text!
--
From: Norris Shelton norrisshel...@yahoo.com
Sent: Tuesday
That is a very good question. Is it supposed to be in the default? I assumed
it was there.
From: Musachy Barroso musa...@gmail.com
To: Struts Users Mailing List user@struts.apache.org
Sent: Tuesday, February 10, 2009 10:27:42 AM
Subject: Re: Cookie
Users Mailing List user@struts.apache.org
Sent: Tuesday, February 10, 2009 8:55:11 AM
Subject: Re: Cookie Intercepter configuration
what's the
file:/C:/dev/sun/sjas9_1_u2/domains/domain1/applications/j2ee-modules/conap/WEB-INF/classes/struts.xml:17:44
show text
/action
/package
/struts
From: Jack Qu qujiak...@hotmail.com
To: Struts Users Mailing List user@struts.apache.org
Sent: Tuesday, February 10, 2009 8:55:11 AM
Subject: Re: Cookie Intercepter configuration
what's the
file:/C:/dev/sun/sjas9_1_u2/domains
Thanks!
From: Musachy Barroso musa...@gmail.com
To: Struts Users Mailing List user@struts.apache.org
Sent: Tuesday, February 10, 2009 10:35:01 AM
Subject: Re: Cookie Intercepter configuration
It is a bug. This interceptor was added in 2.0.7, and it was never
Norris Shelton wrote:
Correct, that is the only action that needs cookie information.
I believe I was misunderstood.
I'm saying that the cookie interceptor is the *only* interceptor that
will be called for that action--again, this may be what you intended,
but that is something different
There should be a more meaningful exception down there in the log, can
you post the whole stack trace?
musachy
On Mon, Feb 9, 2009 at 4:38 PM, Norris Shelton norrisshel...@yahoo.com wrote:
Struts 2.1.6 on Glassfish 9.1_02
I am trying to configure the cookie intercepter, but it looks like I am
Norris Shelton wrote:
Struts 2.1.6 on Glassfish 9.1_02
I am trying to configure the cookie intercepter, but it looks like I am missing
something.
I have the following in my struts.xml:
default-interceptor-ref name=paramsPrepareParamsStack/
action name=/soldier/view
I've never done it myself but this might try to add the cookie with a null
value in theresponse object.
response.addCookie(new Cookie(targetName,null));
Let me know if works.
*
Ruben Cepeda
[EMAIL PROTECTED]
*
Good Morning David
The domain name you supply must conform to rfc2109 domain name specification
(reference)
http://www.faqs.org/rfcs/rfc2109.html
to quote
7.2 Protocol Design
The restrictions on the value of the Domain attribute, and the rules
concerning unverifiable transactions, are
23 matches
Mail list logo