Forum OpenACS Development: Re: Getting a Return Path
set return_url [ad_conn url]?[ad_conn query]
will get you a url that references the current page. Pass it using export_vars if you're generating a hypertext link or in the -export clause to ad_form if you're building a form that needs to include the return address.