-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

Tifara Markovits <[EMAIL PROTECTED]> writes:

>  hello all, i have searched the faq and the documentation to no
>  avail.  i have successfully redirected any request to my host to a
>  servlet using mod_rewrite (rewrite rules and conditions). my
>  question is: after it goes to my servlet how can i send it back to
>  the target url?  example: a user wants to go to
>  "localhost/servlets/HelloWorld".  the user is first sent to an
>  authentication/login servlet (by mod_rewrite) now, from that
>  servlet i want to send it back to "localhost/servlets/HelloWorld",
>  without specifying the name of the servlet, because the target url
>  can be from anywhere within 'localhost'. how is that done?

I agree this is a less than ideal solution, but the way that we did it
for www.experienceonline.com is to use mod_rewrite to direct every
request of an *.htm(l) page that requires authentication to a home
brewed authentication servlet and if the user is authenticated, the
originally requested page is piped back to the browser by connecting a
FileInputStream to the Response object's output stream.  If the user
is not authenticated, we put the originally requested page into a
session object, redirect them to a login page, and if they
authenticate successfully, we bounce them back to the page that was
stored in the session.  I think this is also how the JDC works.

-Paul


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to