• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: DirectAction authentification and Session
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DirectAction authentification and Session


  • Subject: Re: DirectAction authentification and Session
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 13 Dec 2004 09:47:05 -0800

Direct actions have nothing to do with whether a session has been created or not. Make the login a component action not a direct action:

1. Direct action request returns login page with component action login button
2. Login request is component action and returns page with component actions.


Chuck


On Dec 11, 2004, at 6:16 AM, Erwin wrote:

In fact, I start my app with the defaultRequestHandler set to directAction and
when the user is authentificated I want to continue with the ComponentRequestHandler


I know the session has been created ! boolean hasSession = (context().request().sessionID() != null); is true
but I don't know to display the nextPage with wo
I tried to use return session().context().page();
but I got the error message : An Internal Server Error Has Occurred.


Should I change the url before sending the request (wa to wo type url) and use only a return nextPage; ??

hereafter is the log from running the app, login and submit the loginForm ..
Form is bind to userAction() in the LoginAction.java .. which extends DirectAction.java


--------- sending the request
[2004-12-11 14:51:20,227] <WorkerThread1> dispatch - Creating request for URL: /cgi-bin/WebObjects/OVApp.woa/wa/LoginAction/User? userid=dingo&password=pluto&1.5=1.5&LoginAction/User=Login&WOSubmitAc tion=LoginAction/User&wosid=bHFt5sly7oPXTbgst37l40
[2004-12-11 14:51:20,229] <WorkerThread1> dispatch - Starting to dispatch request: /cgi-bin/WebObjects/OVApp.woa/wa/LoginAction/User? userid=dingo&password=pluto&1.5=1.5&LoginAction/User=Login&WOSubmitAc tion=LoginAction/User&wosid=bHFt5sly7oPXTbgst37l40
[2004-12-11 14:51:20,231] <WorkerThread1> application - Finding handler for request: /cgi-bin/WebObjects/OVApp.woa/wa/LoginAction/User? userid=dingo&password=pluto&1.5=1.5&LoginAction/User=Login&WOSubmitAc tion=LoginAction/User&wosid=bHFt5sly7oPXTbgst37l40
[2004-12-11 14:51:20,232] <WorkerThread1> request - returning key wa from /cgi-bin/WebObjects/OVApp.woa/wa/LoginAction/User? userid=dingo&password=pluto&1.5=1.5&LoginAction/User=Login&WOSubmitAc tion=LoginAction/User&wosid=bHFt5sly7oPXTbgst37l40
[2004-12-11 14:51:20,233] <WorkerThread1> application - Returning handler: <com.webobjects.appserver._private.WODirectActionRequestHandler actionClassName=DirectAction defaultActionName=default shouldAddToStatistics=true>
[2004-12-11 14:51:20,269] <WorkerThread1> application - awake


then the app get it
2004-12-11 14:51:20,269] <WorkerThread1> application - awake
[2004-12-11 14:51:20,273] <WorkerThread1> application - Creating context for response to request: /cgi-bin/WebObjects/OVApp.woa/wa/LoginAction/User? userid=dingo&password=pluto&1.5=1.5&LoginAction/User=Login&WOSubmitAc tion=LoginAction/User&wosid=bHFt5sly7oPXTbgst37l40
[2004-12-11 14:51:20,275] <WorkerThread1> request - returning key wa from /cgi-bin/WebObjects/OVApp.woa/wa/LoginAction/User? userid=dingo&password=pluto&1.5=1.5&LoginAction/User=Login&WOSubmitAc tion=LoginAction/User&wosid=bHFt5sly7oPXTbgst37l40
[2004-12-11 14:51:20,277] <WorkerThread1> request - returning key wa from /cgi-bin/WebObjects/OVApp.woa/wa/LoginAction/User? userid=dingo&password=pluto&1.5=1.5&LoginAction/User=Login&WOSubmitAc tion=LoginAction/User&wosid=bHFt5sly7oPXTbgst37l40
[2004-12-11 14:51:20,278] <WorkerThread1> application - context page: null
[2004-12-11 14:51:20,353] <WorkerThread1> request - returning key wa from /cgi-bin/WebObjects/OVApp.woa/wa/LoginAction/User? userid=dingo&password=pluto&1.5=1.5&LoginAction/User=Login&WOSubmitAc tion=LoginAction/User&wosid=bHFt5sly7oPXTbgst37l40


finally the session is restored, but the page is not displayed
[2004-12-11 14:51:23,184] <WorkerThread1> session - <com.webobjects.appserver.WOContext contextID=2 requestSenderID=null elementID=null sessionID=bHFt5sly7oPXTbgst37l40 request=<LoggingRequest (<LoggingRequest httpVersion=HTTP/1.1 headers={user-agent = (Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12); cookie = ("OVAppUser=dingo"); host = (kermac.local:58379); accept = (*/*); referer = (http://kermac.local:58379/cgi-bin/WebObjects/OVApp.woa/wa/ LoginAction/default); accept-encoding = (gzip, deflate;q=1.0, identity;q=0.5, *;q=0); accept-language = (fr, ja;q=0.10, de-de;q=0.80, de;q=0.70, it-it;q=0.60, it;q=0.50, es;q=0.40, pt-pt;q=0.30, pt;q=0.20, en;q=0.90); connection = (keep-alive); } content-length=0 cookies=null userInfo=null>) method=GET uri=/cgi-bin/WebObjects/OVApp.woa/wa/LoginAction/User? userid=dingo&password=pluto&1.5=1.5&LoginAction/User=Login&WOSubmitAc tion=LoginAction/User&wosid=bHFt5sly7oPXTbgst37l40 defaultFormValueEncoding=ISO8859_1 f
[2004-12-11 14:51:23,178] <WorkerThread1> application - Restoring session with ID bHFt5sly7oPXTbgst37l40 in context null
[2004-12-11 14:51:23,181] <WorkerThread1> request - returning key wa from /cgi-bin/WebObjects/OVApp.woa/wa/LoginAction/User? userid=dingo&password=pluto&1.5=1.5&LoginAction/User=Login&WOSubmitAc tion=LoginAction/User&wosid=bHFt5sly7oPXTbgst37l40
[2004-12-11 14:51:23,182] <WorkerThread1> request - returning key wa from /cgi-bin/WebObjects/OVApp.woa/wa/LoginAction/User? userid=dingo&password=pluto&1.5=1.5&LoginAction/User=Login&WOSubmitAc tion=LoginAction/User&wosid=bHFt5sly7oPXTbgst37l40
[2004-12-11 14:51:23,183] <WorkerThread1> session - bHFt5sly7oPXTbgst37l40 awake
formValueEncodingDetectionEnabled=NO formValueEncoding=ISO8859_1 formValues={wosid = ("bHFt5sly7oPXTbgst37l40"); LoginAction/User = ("Login"); WOSubmitAction = ("LoginAction/User"); 1.5 = ("1.5"); userid = ("dingo"); password = ("pluto"); } > response=null pageElement=null pageComponent=null currentComponent=null url=/cgi-bin/WebObjects/OVApp.woa urlApplicationNumber=-1 distributionEnabled=false pageChanged=false pageReplaced=false>
[2004-12-11 14:51:23,219] <WorkerThread1> session -
[2004-12-11 14:51:23,337] <WorkerThread1> generation - pageWithName AdminHomePage
[2004-12-11 14:51:23,353] <WorkerThread1> generation - pageWithName created page named AdminHomePage
[2004-12-11 14:51:23,358] <WorkerThread1> request - returning key wa from /cgi-bin/WebObjects/OVApp.woa/wa/LoginAction/User? userid=dingo&password=pluto&1.5=1.5&LoginAction/User=Login&WOSubmitAc tion=LoginAction/User&wosid=bHFt5sly7oPXTbgst37l40
[2004-12-11 14:51:23,359] <WorkerThread1> request - returning key wa from /cgi-bin/WebObjects/OVApp.woa/wa/LoginAction/User? userid=dingo&password=pluto&1.5=1.5&LoginAction/User=Login&WOSubmitAc tion=LoginAction/User&wosid=bHFt5sly7oPXTbgst37l40
[2004-12-11 14:51:23,361] <WorkerThread1> application - Saving session with ID bHFt5sly7oPXTbgst37l40 in context 2
[2004-12-11 14:51:23,362] <WorkerThread1> session - bHFt5sly7oPXTbgst37l40 sleep
[2004-12-11 14:51:23,364] <WorkerThread1> request - returning key wa from /cgi-bin/WebObjects/OVApp.woa/wa/LoginAction/User? userid=dingo&password=pluto&1.5=1.5&LoginAction/User=Login&WOSubmitAc tion=LoginAction/User&wosid=bHFt5sly7oPXTbgst37l40
[2004-12-11 14:51:23,365] <WorkerThread1> request - returning key wa from /cgi-bin/WebObjects/OVApp.woa/wa/LoginAction/User? userid=dingo&password=pluto&1.5=1.5&LoginAction/User=Login&WOSubmitAc tion=LoginAction/User&wosid=bHFt5sly7oPXTbgst37l40
[2004-12-11 14:51:23,432] <WorkerThread1> application - sleeping
[2004-12-11 14:51:23 CET] <WorkerThread1> <WOWorkerThread id=1 socket=Socket[addr=/127.0.0.1,port=58457,localport=58379]> Exception occurred while responding to client: java.lang.NullPointerException
[2004-12-11 14:51:23 CET] <WorkerThread1> java.lang.NullPointerException
at Application.createResponseInContext(Application.java:195)
at com.webobjects.appserver._private.WODirectActionRequestHandler.nullResp onse(WODirectActionRequestHandler.java:80)
at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest( WOActionRequestHandler.java:150)
at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.ja va:1306)
at Application.dispatchRequest(Application.java:133)
at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread .java:173)
at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.jav a:254)
at java.lang.Thread.run(Thread.java:552)


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net


This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects




_______________________________________________
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


References: 
 >DirectAction authentification and Session (From: Erwin <email@hidden>)

  • Prev by Date: Re: DirectAction authentification and Session
  • Next by Date: Re: XmlHttpRequest and WO
  • Previous by thread: DirectAction authentification and Session
  • Next by thread: EOModeler/Prototypes question
  • Index(es):
    • Date
    • Thread