Hi Roger,

You need to bind directActionName and have the login form submit to a direct 
action.  The action then validates the credentials and returns the page after 
login if valid.  This also requires that the login page come from a direct 
action.

Chuck

On 2013-03-12, at 10:33 AM, Roger Perryman wrote:

> I am creating a Login page and I don't want it to create a new Session until 
> after the page is submitted. Loading the Login page creates a new session. 
> Initially, I had a few elements that had session references but I corrected 
> those. I am still getting a session created. I've traced it down to the 
> ERXWOForm tag (It does the same thing with WOForm). Removing the tag stops 
> the session from being created. I don't recall this behavior before. I'm 
> hoping it is a simple setting in the properties file.
> 
> I am using WOnder 5.8.1.
> 
> I have stripped it down to the simplest page I can get:
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> <html xmlns = "http://www.w3.org/1999/xhtml";>
>       <head>
>               <meta http-equiv="Content-Type" content="text/html; 
> charset=UTF-8" />
>               <title>Login</title>
>       </head>
>       <body>
>               <webobject name="loginForm">
>                       <!-- Form content removed for testing -->
>               </webobject name="loginForm">
>       </body>
> </html>
> 
> 
> loginForm: ERXWOForm
> {
>       id = "loginForm";
>       multipleSubmit = true;  // I've tried both true and false
> }
> 
> I believe I have done all of the requisite steps:
> 
> 
> In Application.java: 
> 
>       public Application()
>       {
>               super();
>               setDefaultRequestHandler( requestHandlerForKey( 
> directActionRequestHandlerKey() ) );
>       } 
> 
> 
> In DirectAction.java:
> 
>       public WOActionResults defaultAction()
>       {
>               return pageWithName( Login.class );
>       }
> 
> In Session.java: (not required but helpful)
> 
>       public Session()
>       {
>               super();
>               log.info( "Session Created: " + sessionID());
>       }
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
> 
> This email sent to [email protected]

-- 
Chuck Hill             
Executive Managing Partner, VP Development and Technical Services

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.    
http://www.global-village.net/gvc/practical_webobjects

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing 
Companies in B.C! 
Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
Canada’s Fastest-Growing Companies by PROFIT Magazine!












 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to