: Programmatic login
The following is a bare-bones implemetation. Posted under the standard
Apache Licence.
import java.io.*;
import java.security.Principal;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.catalina.*;
public class MyValve implements Valve {
public
Juergen Weber wrote:
Hello,
we have a portal. Now the marketing people want that
on the portal page be a form with user and password
field. After submitting the user should be logged in.
First this looked like a very easy to do feature.
We use container managed security to protect some
pages.
Hi,
thanks to all who answered to my question.
The valve solution looks good, but as we develop with
tomcat and run on weblogic we cannot use nonportable
solutions.
So, if marketing insists on their idea we have to dump
container managed security. Probably we will use a
struts based security.
Hi Juergen,
another approach is to put your welcome file under a security constraint.
Your app will then start with the login page.
Regards
Christoph
Juergen Weber schrieb:
Hi,
thanks to all who answered to my question.
The valve solution looks good, but as we develop with
tomcat and run on
Hi,
it sounds very interesting. Could you provide some implementation details
(source code)?
Zsolt
On Saturday 16 November 2002 08:26, Bill Barker wrote:
setUserPrincipal
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
The following is a bare-bones implemetation. Posted under the standard
Apache Licence.
import java.io.*;
import java.security.Principal;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.catalina.*;
public class MyValve implements Valve {
public MyValve() {}
public
Hello,
we have a portal. Now the marketing people want that
on the portal page be a form with user and password
field. After submitting the user should be logged in.
First this looked like a very easy to do feature.
We use container managed security to protect some
pages.
So submitting the
[mailto:weberjn;yahoo.com]
Sent: Friday, November 15, 2002 8:42 AM
To: [EMAIL PROTECTED]
Subject: Programmatic login
Hello,
we have a portal. Now the marketing people want that
on the portal page be a form with user and password
field. After submitting the user should be logged in.
First
Solution Center GmbH
Hamburg, Germany
Hosting, Content Management, Java Consulting
http://www.uptime-isc.de
-Original Message-
From: Juergen Weber [mailto:weberjn;yahoo.com]
Sent: Friday, November 15, 2002 2:42 PM
To: [EMAIL PROTECTED]
Subject: Programmatic login
we have a portal. Now
I've had similar demands :). Since under this case, the validating servlet
must be outside of any security-constraints, if the user is successfully
validated it stores the Principal in as a well-known attribute in the
Session. You then write a simple (Context-level) Valve that queries the
Hello people,
I need to programmatically login my session into Tomcat 4.0.1 servlet
container. However, I could not find the API in JavaDocs that accomplishes
this goal.
How do I programmatically login into TC 4.0.1?
Sincirely,
Sergei Batiuk.
--
To unsubscribe: mailto:[EMAIL PROTECTED]
For
If you use BASIC authentication, user/password are contained in the Authorization
HTTP 1.1 Header (in Base64 encoded form).
Never tried, but should work when supplying correct data into your HTTP request
(including headers).
| How do I programmatically login into TC 4.0.1?
|
| Sincirely,
|
Well, but what about programmatic login, i. e. something like
Context ctx = new InitialContext();
UserManager um = ( UserManager )ctx.lookup( java:comp/UserManager );
um.login( login, password );
Does Tomcat have an API similar to this? The thing is I have a login form on
my first page
[EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, January 04, 2002 5:48 AM
Subject: RE: Programmatic login with Tomcat 4.0.1
| Well, but what about programmatic login, i. e. something like
|
| Context ctx = new InitialContext();
| UserManager um = ( UserManager )ctx.lookup
:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 14:48
To: Tomcat Users List
Subject: RE: Programmatic login with Tomcat 4.0.1
Well, but what about programmatic login, i. e. something like
Context ctx = new InitialContext();
UserManager um = ( UserManager )ctx.lookup(
java:comp
On Fri, 4 Jan 2002, Sergei Batiuk wrote:
Date: Fri, 4 Jan 2002 14:10:03 +0200
From: Sergei Batiuk [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Programmatic login with Tomcat 4.0.1
Hello people,
I need to programmatically login my
Users List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Programmatic login with Tomcat 4.0.1
Hello people,
I need to programmatically login my session into Tomcat 4.0.1 servlet
container. However, I could not find the API in JavaDocs that
accomplishes
this goal.
How do I
17 matches
Mail list logo