tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brad Pardee <pard...@yahoo.com>
Subject Performing actions prior to j_security_check
Date Fri, 20 Jul 2001 20:51:51 GMT
Hello,

I have a single user system and I set up a JDBCRealm
where the form-login-page is a servlet which either
redirects to a simple login page or to a registration
page if this is the first use.  The simple login page
works fine.  However, on the registration page, I want
to store the registration information as well as
inserting the username/password into the jdbc table. 
If everything is successful, I want to redirect again
to j_security_check (using the parameters j_username
and j_password) from the registration page.  I was
hoping that authentication would succeed at this point
and the user would be redirected to their original
page, since I just added the user to the database. 
Unfortunately, I get the following traceback instead:

java.lang.NullPointerException
	at java.util.Hashtable.put(Hashtable.java:380)
	at
org.apache.tomcat.session.StandardSession.setAttribute(StandardSession.java:731)
	at
org.apache.tomcat.request.FormSecurityCheckHandler.doService(AccessInterceptor.java:540)
	at
org.apache.tomcat.core.Handler.service(Handler.java:287)
	at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
	at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
	at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
	at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
	at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
	at java.lang.Thread.run(Thread.java:484)

Anyone have any idea what I'm doing wrong or a better
way that I should be doing this.  I'm using Tomcat
3.2.3 and the 2nd redirect is actually a struts
ActionForward with setRedirect(true) called.

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Mime
View raw message