You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Wilson <DW...@relevant.com> on 2004/06/28 00:46:02 UTC
WARNING: Unexpected error forwarding to login page
Is this the correct Mailing list to post this on?
I am trying to use FORM based authentication but I am getting this error in
the tomcat console...
code:
_____
Jun 25, 2004 2:51:46 PM org.apache.catalina.authenticator.FormAuthenticator
authenticate
WARNING: Unexpected error forwarding to login page
java.lang.NullPointerException
at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthent
icator.java:214)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:504)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:702)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:644)
at java.lang.Thread.run(Thread.java:534)
_____
When I try to goto my web page
(http://localhost:8080/E3/common/CustomerInq/index.faces) I get a blank
screen.
However, if after getting the blank screen I goto the login page
(http://localhost:8080/E3/login2.jsp) and type in a correct login page then
I will get redirected to the CustomerInq/index.faces page correctly.
This is a snippit of my web.xml...
code:
_____
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>resticted</web-resource-name>
<url-pattern>/common/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>user</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-page>/login2.jsp</form-login-page>
<form-error-page>/loginerror.jsp</form-error-page>
</login-config>
<security-role>
<role-name>user</role-name>
</security-role>
</web-app>
_____
and here is the login from the Orielly JSF book that I am trying to use as a
starting point...
code:
_____
<html>
<head>
<title>Login</title>
<link rel="stylesheet" type="text/css"
href="${pageContext.request.contextPath}/style.css">
</head>
<body bgcolor="white">
<div class="title">Please Login</div>
<p>
The page you requested is only available to registered users.
Please enter your username and password and click Login.
</p>
<form action="j_security_check" method="post">
<table class="tablebg">
<tr>
<td align="right">Username:</td>
<td><input name="j_username"></td>
</tr>
<tr>
<td align="right">Password:</td>
<td>
<input type="password" name="j_password">
</td>
</tr>
</table>
<input type="submit" value="Login">
</form>
</body>
</html>
_____
Any ideas are will be greatly appreciated.
-David
BM_000001
********************************************************
David Wilson
dwilson@relevant.com
Staff Developer
Relevant Business Systems
(Fax) 678-868-1773
Please send complaints to /dev/null
********************************************************