cvs commit: jakarta-tomcat-4.0/webapps/examples/jsp/security/protected index.jsp

2001-07-28 Thread craigmcc

craigmcc01/07/28 16:29:12

  Modified:webapps/examples/jsp/security/protected index.jsp
  Log:
  Add an option so that the user can request a logoff (which, with form
  based login configured, should cause a new session to be created and the
  user returned to the login page).
  
  Revision  ChangesPath
  1.4   +14 -1 
jakarta-tomcat-4.0/webapps/examples/jsp/security/protected/index.jsp
  
  Index: index.jsp
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/examples/jsp/security/protected/index.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- index.jsp 2001/07/26 19:42:44 1.3
  +++ index.jsp 2001/07/28 23:29:12 1.4
  @@ -1,10 +1,18 @@
  +%
  +  if (request.getParameter(logoff) != null) {
  +session.invalidate();
  +response.sendRedirect(index.jsp);
  +return;
  +  }
  +%
   html
   head
   titleProtected Page for Examples/title
   /head
   body bgcolor=white
   
  -You are logged in as remote user b%= request.getRemoteUser() %/bbrbr
  +You are logged in as remote user b%= request.getRemoteUser() %/b
  +in session b%= session.getId() %/bbrbr
   
   %
 if (request.getUserPrincipal() != null) {
  @@ -41,6 +49,11 @@
   form method=GET action=index.jsp
   input type=text name=role value=%= role %
   /form
  +brbr
  +
  +If you have configured this app for form-based authentication, you can log
  +off by clicking a href=index.jsp?logoff=truehere/a.  This should cause
  +you to be returned to the logon page after the redirect that is performed.
   
   /body
   /html
  
  
  



cvs commit: jakarta-tomcat-4.0/webapps/examples/jsp/security/protected index.jsp

2001-03-26 Thread craigmcc

craigmcc01/03/26 12:50:48

  Modified:webapps/examples/jsp/security/protected index.jsp
  Log:
  Explicitly identify the destination of the form submit, so that this page
  works correctly when used in a form-based login environment.
  
  Revision  ChangesPath
  1.2   +1 -1  
jakarta-tomcat-4.0/webapps/examples/jsp/security/protected/index.jsp
  
  Index: index.jsp
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/examples/jsp/security/protected/index.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.jsp 2000/08/17 00:58:17 1.1
  +++ index.jsp 2001/03/26 20:50:47 1.2
  @@ -37,7 +37,7 @@
   
   To check whether your username has been granted a particular role,
   enter it here:
  -form method="GET"
  +form method="GET" action="index.jsp"
   input type="text" name="role" value="%= role %"
   /form