There's an "ns_internalredirect" Tcl command which calls the
Tcl_ConnRedirect C function -- maybe that does the right thing. I
suppose you could also use "ns_register_adp" to map the URL to an ADP
file instead of using "ns_register_proc" -- the ADP could then do the
login and include guts of main.adp if needed.
-Jim
/*
*----------------------------------------------------------------------
*
* Ns_ConnRedirect --
*
* Perform an internal redirect by updating the connection's
* request URL and re-authorizing and running the request. This
* Routine is used in FastPath to redirect to directory files
* (e.g., index.html) and in return.c to redirect by HTTP result
* code (e.g., custom not-found handler).
*
* Results:
* Standard request procedure result, normally NS_OK.
*
* Side effects:
* Depends on request procedure.
*
*----------------------------------------------------------------------
*/
int
Ns_ConnRedirect(Ns_Conn *conn, char *url)
On Mar 19, 2008, at 11:08 PM, Robert Seeger wrote:
I've never been fond of the fact that AOLServer has no "internal
redirect" mechanism.
Rob Seeger
Xavier Bourguignon wrote:
Thanks Don and Darren, I will look at the info.
I just find it strange that I have to REDIRECT to another url, to me
redirect means to go away from the current context to go to another,
usually another domain, but i may be wrong and my understanding needs
to be revised.
Thanks
On 18/03/2008, Xavier Bourguignon <[EMAIL PROTECTED]> wrote:
Ok, but what do I do if they do exist? How do I say to aolserver
that
I want to serve the menu.adp file?
Thank you
On 18/03/2008, Don Baccus <[EMAIL PROTECTED]> wrote:
> On Mar 18, 2008, at 11:25 AM, Xavier Bourguignon wrote:
> >
> >
> > I have a URL mapped to a Tcl procedure like this:
ns_register_proc
> > POST /login login
> >
> > in my adp page called index.adp I have this:
> > <form action ="/login" method="post">
> > username: <input type="text" name="username"><br>
> > password: <input type="password" name="password"><br>
> > <input type="submit" name="submit" value="Login">
> > </form>
> >
> > In one of my Tcl file, I have a procedure called login. This
procedure
> > gets called once the submit button is clicked. This
procedure gets the
> > username and password from the form and processese them to
check that
> > the username/password combination exists in the database.
> > If it does then I want to show the menu.adp page, if not, I
want to
> > show the index.adp page again.
>
>
> Look here: http://panoptic.com/wiki/aolserver/Ns_returnredirect
>
> ns_returnredirect foo
>
> tells the browser to redirect to the URL foo
>
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]
> with the
> body of "SIGNOFF AOLSERVER" in the email message. You can
leave the Subject: field of your email blank.
>
--
Xavier Bourguignon
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]
> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]>
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.