----- Original Message -----
From: "Thomas Haines" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Sunday, August 24, 2008 4:16 PM
Subject: automatic login
Hi all
I'm trying to figure out a way to "automatically login" a user. It
arises when they have created an account, and I don't want to then direct
them back to a login page - rather, I want to, in this instance, just log
them in.
I am using Tomcat's container-managed security.
I am using CentOS / JVM 1.6 / apache-tomcat-6.0.14.
Does anyone know if the API allows this (and if so, how!)?
I guess I could implement my own application-managed security, but I'd
like to stick with the tomcat implementation.
Cheers
Tom
Tom I actually do my own auth thing... but I think in theory you can try
this...
Emulate a client from your code... its not too difficult doing a 'post' from
java, or use httpclient, whatever you want to... then send the form stuff to
TC... TC will send you back a cookie... JSessionID = whatever
Then set that cookie manually when you send the first page back to the
user...
I think that will fool TC's security into thinking the client is logged
on...
There is no real way that I know of for intercepting TC's security (for good
reasons) other than valves, and its actually easier to just do your own
thing if you go that way... I think
Its interesting stuff...
Have fun...
---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]