Yup.  Its just a well known URL.  In effect its really

http://foo.bar.com/j_security_check

As Carson says, its a logical token that denotes the authentication
service.  You could use this example to POST to any URL, but I thought
this example was double useful. (and technically it is a URL and not a
URI, but now we're splitting hairs <wink>)

-- 
Dave Wolf
Cynergy Systems, Inc.
Macromedia Flex Alliance Partner
http://www.cynergysystems.com

Email:  [EMAIL PROTECTED]
Office: 866-CYNERGY
--- In [email protected], "Carson Hager" <[EMAIL PROTECTED]>
wrote:
>
> Dave is about to arrive out here on the West Coast so I'll answer this
> for him. j_security_check is a token in J2EE web applications that
> signals a J2EE web application to authenticate a user with FORM
> authentication.  Required to be sent to this "page" are parameters of
> "j_username" and "j_password".  At this point, the container takes over
> authentication however you have set it up.
> 
> 
> Carson
> 
> 
> ____________________________________________
>  
> Carson Hager
> Cynergy Systems, Inc.
> http://www.cynergysystems.com
>  
> Email:  [EMAIL PROTECTED]
> Office:  866-CYNERGY
> Mobile: 1.703.489.6466
>  
> 
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Tracy Spratt
> Sent: Monday, January 30, 2006 9:00 AM
> To: [email protected]
> Subject: RE: [flexcoders] Re: Using HTTPService to POST complex data
> 
> Dave, in your example, what is " j_security_check"?
> Tracy
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Dave Wolf
> Sent: Sunday, January 29, 2006 6:03 PM
> To: [email protected]
> Subject: [flexcoders] Re: Using HTTPService to POST complex data
> 
> 
> Here is an example of doing a login form which does a POST from a MXML
> form.  This "simulates" the posting of a HTML form to the standard
> J2EE login service.  This also goes to show how simple it is to
> integrate into J2EE security.  There's no reason to need to roll your
> own security.
> 
> 
> <mx:Script>
>      <![CDATA[
>               
>      var j_username:String;
>      var j_password:String;
> 
>      function submitLogin() { 
>           j_username = username.text;
>           j_password = password.text;
>           getURL( "j_security_check" , "_self" , "POST" );
>      }
>      ]]>
> </mx:Script>
> 
> <mx:Form>
>      <mx:FormItem>
>           <mx:Label text="Username">
>           <mx:TextInput id="username" />
>      </mx:FormItem>
>      <mx:FormItem>
>           <mx:Label text="Password"/>
>           <mx:TextInput id="password" password="true"/>
>      </mx:FormItem>
>      <mx:FormItem>
>      <mx:VBox horizontalAlign="center">
>           <mx:Button label="Login" click="submitLogin();"/>
>      </mx:VBox>
>      </mx:FormItem>
> </mx:Form>
> 
> 
> -- 
> Dave Wolf
> Cynergy Systems, Inc.
> Macromedia Flex Alliance Partner
> http://www.cynergysystems.com
> 
> Email:  [EMAIL PROTECTED]
> Office: 866-CYNERGY
> 
> 
> 
> 
> --- In [email protected], "Mark Wales" <[EMAIL PROTECTED]> wrote:
> >
> > 
> > I've tried using child tags in the same namespace, I've also tried
> > creating objects in Actioncript and then embedding them such as:
> > 
> > In MXML:
> >      <request>{myRequestObject}</request>
> > 
> > In Actionscript:
> >     new myRequestObject:Object = new Object;
> >     new embeddedObject:Object = new Object;
> >     
> >     embeddedObject.name = "test"
> >     myRequestObject.commit = "Create";
> >     myRequestObject.category = embeddedObject;
> > 
> > The "commit"=>"Create" works fine but "category" points to some
> > variation of "{object}" - never quite what I am trying to attain.
> > 
> > I've used generic objects as well as arrays - all to no avail. I can
> > give an enumeration of the variations and permutations on my results
> in
> > my next email - but it seems there is probably some obvious "right
> way"
> > to do this that I'm just missing somehow.
> > 
> > -Mark
> > 
> > -----Original Message-----
> > From: [email protected] [mailto:[EMAIL PROTECTED]
> On
> > Behalf Of Peter Farland
> > Sent: Saturday, January 28, 2006 3:49 PM
> > To: [email protected]
> > Subject: RE: [flexcoders] Using HTTPService to POST complex data
> > 
> > Have you tried moving your custom values as the child tags of
> > <mx:request> to the same namespace by prefixing them with mx:   ?
> > Alternatively, have you assigned an id to your HTTPService and then
> used
> > script to set the request property to an anonymous Object that
> contains
> > the properties that you want to POST?
> > 
> > What do you have set for the contentType? The default should be
> > "application/x-www-form-urlencoded" which is what you'd want for a
> form
> > submission.
> > 
> > Pete
> > 
> > -----Original Message-----
> > From: [email protected] [mailto:[EMAIL PROTECTED]
> On
> > Behalf Of stuff
> > Sent: Saturday, January 28, 2006 9:18 AM
> > To: [email protected]
> > Subject: [flexcoders] Using HTTPService to POST complex data
> > 
> > 
> > I am trying to emulate an HTML form submission with HTTPService and I
> > seem to be missing something on the construction of the associated
> > request. From the server log of a successful POST I have the
> following:
> > 
> > [POST]  Parameters: {"commit"=>"Create", "category"=>{"name"=>"Test"},
> > ...}
> > 
> > At present, my request looks like this:
> > 
> >     <mx:request>
> >             <category><name>Test</name></category>
> >                     <commit>Create</commit>
> >         </mx:request>
> > 
> > ...But that generates a runtime error. I have tried multiple
> constructs
> > (Arrays, ActionScript, etc.) but I've not been able to hit on the
> right
> > solution. 
> > 
> > Does anyone have any suggestions?
> > 
> > Thanks,
> > 
> > -Mark
> > 
> > 
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> > 
> > 
> > 
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> > Yahoo! Groups Links
> >
> 
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to