You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rob Cartier <rc...@snet.net> on 2002/12/13 00:57:12 UTC

help: logging j_username

Is there a way besides using session cookies to log
invalid logon attempts from a form based logon jsp

I was using cookies before but I would like to find another
way from within this jsp

========================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<HEAD>
<META name="GENERATOR" content="IBM WebSphere Studio">
</HEAD>
<body>
<%@ page session="true" %>
<%@ page contentType="text/html"%>
<table border="0" cell="" padding="0" size="480" width="640">
<body onload="document.login.j_username.focus()"></body>


<%
 System.out.println("JSP======> " + request.getRemoteUser() + "|"
+ request.getRequestURI()  + "|" + request.getRemoteAddr() + "|"
+ new java.util.Date().toString() + "|" + request.getHeader("User-Agent") );
%>

<%
String url = "j_security_check";
%>

<h2>Login page </h2>
<form  action='<%= response.encodeURL(url) %>' name="login"  >
<table border="0" cell padding="0" width=480>
 <tr>
    <td  nowrap><font face="Fixedsys">Username:</font></td>
    <td ><input type="text" name="j_username"></td>
</tr>
 <tr>
    <td nowrap><font face="Fixedsys">Password:</font></td>
    <td ><input type="password" name="j_password"></td>
 <tr>
 <tr>
 	<td > </td>
	<td><input type="submit" value="Login"></td>
 </tr>
<br>

</table>

</form>

</body>
</html>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: help: logging j_username

Posted by "Noel J. Bergman" <no...@devtech.com>.
Look at the JSP Specification for <jsp:useBean> (which will require you to
provide a proper JavaBean with setters/getters), or just use
HttpSession.setAttribute in a servlet to keep an Integer in session with a
count (a bit primitive, but ok for an outline).

If you want me to do it for you, I'm available off-list.

	--- Noel

-----Original Message-----
From: Rob Cartier [mailto:rcartier@snet.net]
Sent: Friday, December 13, 2002 7:14
To: 'Noel J. Bergman'; 'Tomcat Users List'
Subject: RE: help: logging j_username


ok .. I am interested any ideas how to implement it

thanks in advance

--Rob

> -----Original Message-----
> From: Noel J. Bergman [mailto:noel@devtech.com]
> Sent: Thursday, December 12, 2002 7:09 PM
> To: Tomcat Users List
> Subject: RE: help: logging j_username
>
>
> > Is there a way besides using session cookies to log
> > invalid logon attempts from a form based logon jsp
>
> Have you considered a session bean?
>
> 	--- Noel
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: help: logging j_username

Posted by Rob Cartier <rc...@snet.net>.
ok .. I am interested any ideas how to implement it

thanks in advance

--Rob

> -----Original Message-----
> From: Noel J. Bergman [mailto:noel@devtech.com]
> Sent: Thursday, December 12, 2002 7:09 PM
> To: Tomcat Users List
> Subject: RE: help: logging j_username
> 
> 
> > Is there a way besides using session cookies to log
> > invalid logon attempts from a form based logon jsp
> 
> Have you considered a session bean?
> 
> 	--- Noel
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: help: logging j_username

Posted by "Noel J. Bergman" <no...@devtech.com>.
> Is there a way besides using session cookies to log
> invalid logon attempts from a form based logon jsp

Have you considered a session bean?

	--- Noel

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>