I have coded a small example that shows various listeners and filter invocation.
The issues are:
1. I am unable to see any of the system.out.println in listeners and filters on the console except
i)Value bound
ii)user nto in role
2.The getRemoteUser() isnt returning "max".
The input to form is
username:max password:max for authentication as defined in web.xml and the input to Welcom.jsp are
max and
eassy .
The
servlet check if the username and password are same as defined in database and upon correct login forwards request to other
JSP
I am using Eclipse Helios and
tomcat server 5.5 .
please do tell where to see tomcat logs.
Files are:
web.xml
listeners:
Employee
HttpSessionAttributeListener
HttpSession
ServletContexxt
Servlets:
Sign
filters
LoginFilter
Welcom.jsp
Output on Console:
Oct 9, 2011 12:48:40 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_23\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Java\jdk1.6.0_23\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Graphviz2.26.3\bin;C:\Program Files\Java\jdk1.6.0_23\bin;C:\TCWIN45\BIN
Oct 9, 2011 12:48:40 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 9, 2011 12:48:40 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 393 ms
Oct 9, 2011 12:48:40 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 9, 2011 12:48:40 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.31
Oct 9, 2011 12:48:40 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Oct 9, 2011 12:48:41 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 9, 2011 12:48:41 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 9, 2011 12:48:41 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/17 config=null
Oct 9, 2011 12:48:41 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Oct 9, 2011 12:48:41 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 413 ms
user in nto filter
Value Bound