Re: Adding cookie in a DA handler
Re: Adding cookie in a DA handler
- Subject: Re: Adding cookie in a DA handler
- From: Miguel Arroz <email@hidden>
- Date: Sat, 12 Jan 2008 17:34:20 +0000
Hi!
Looks like calling generateResponse() before the addCookie stuff
makes it work. Now I have another problem, the cookie is beeing
erased somewhere between that and the response is actually sent to
the browser. Oh well...
Yours
Miguel Arroz
On 2008/01/12, at 16:53, Miguel Arroz wrote:
Hi!
I'm trying to add a cookie to the response of a DA handler. I
found this thread: <http://lists.apple.com/archives/Webobjects-dev/
2006/Oct/msg00261.html> and followed those instructions. Still, I
can't make it work. I do this:
if( doNotShowPopupAgainCookie != null ) {
NSLog.out.appendln( "******************* response: " +
showSurveyComponent.context().response() );
showSurveyComponent.context().response().addCookie
(doNotShowPopupAgainCookie);
}
And I get the following. What's weird is that the response of the
component is null. From the thread above, it shouldn't be null,
right? Or am I doing something wrong, as usual?
INFO 16:49:21 (NSLog :38) -*******************
response: null
WARN 16:49:21 (NSLog :41) -
<com.survs.wo.DirectAction>: Exception in performActionNamed() on
the action "showSurvey" with the message:
java.lang.NullPointerException
[2008-01-12 16:49:21 WET] <WorkerThread10>
java.lang.NullPointerException
at com.survs.wo.DirectAction.showSurveyAction(DirectAction.java:679)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.webobjects.appserver.WODirectAction.performActionNamed
(WODirectAction.java:128)
at er.extensions.ERXDirectAction.performActionNamed
(ERXDirectAction.java:327)
at
com.webobjects.appserver._private.WOActionRequestHandler._handleReques
t(WOActionRequestHandler.java:240)
at
com.webobjects.appserver._private.WOActionRequestHandler.handleRequest
(WOActionRequestHandler.java:145)
at er.extensions.ERXDirectActionRequestHandler.handleRequest
(ERXDirectActionRequestHandler.java:82)
at com.webobjects.appserver.WOApplication.dispatchRequest
(WOApplication.java:1306)
at er.extensions.ERXApplication.dispatchRequest
(ERXApplication.java:1322)
at com.webobjects.appserver._private.WOWorkerThread.runOnce
(WOWorkerThread.java:173)
at com.webobjects.appserver._private.WOWorkerThread.run
(WOWorkerThread.java:254)
at java.lang.Thread.run(Thread.java:613)
ERROR 16:49:21 (er.extensions.ERXApplication:1093) -Exception
caught: null
Extra info: {
"Bundles" = {
"Ajax" = "4.0";
"ERExtensions" = "4.0";
"JavaWebObjects" = "5.3.3";
"ERJars" = "4.0";
"ERJavaMail" = "4.0";
"PostgresqlPlugIn" = "4.0";
"JavaJDBCAdaptor" = "5.3.2";
"WOOgnl" = "4.0";
"JavaEOAccess" = "5.3.2";
"SurvsFramework" = "";
"SurvMailerFramework" = "";
"JavaWOExtensions" = "4.0";
"PostgresqlPrototypes" = "";
"JavaEOControl" = "5.3.2";
"JavaXML" = "5.3";
"Survey" = "";
"JavaFoundation" = "5.3.3";
};
}
java.lang.reflect.InvocationTargetException
at
com.webobjects.appserver._private.WOActionRequestHandler._handleReques
t(WOActionRequestHandler.java:250)
at
com.webobjects.appserver._private.WOActionRequestHandler.handleRequest
(WOActionRequestHandler.java:145)
at er.extensions.ERXDirectActionRequestHandler.handleRequest
(ERXDirectActionRequestHandler.java:82)
at com.webobjects.appserver.WOApplication.dispatchRequest
(WOApplication.java:1306)
at er.extensions.ERXApplication.dispatchRequest
(ERXApplication.java:1322)
at com.webobjects.appserver._private.WOWorkerThread.runOnce
(WOWorkerThread.java:173)
at com.webobjects.appserver._private.WOWorkerThread.run
(WOWorkerThread.java:254)
at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.NullPointerException
at com.survs.wo.DirectAction.showSurveyAction(DirectAction.java:679)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.webobjects.appserver.WODirectAction.performActionNamed
(WODirectAction.java:128)
at er.extensions.ERXDirectAction.performActionNamed
(ERXDirectAction.java:327)
at
com.webobjects.appserver._private.WOActionRequestHandler._handleReques
t(WOActionRequestHandler.java:240)
... 7 more
Yours
Miguel Arroz
Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40guiamac.com
This email sent to email@hidden
Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden