Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: joist/java/org/joist/security UnsecureServlet.java

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

CVS update: joist/java/org/joist/security UnsecureServlet.java

Author otnx at tigris dot org
Full name otnx at tigris dot org
Date 2000-07-15 09:14:39 PDT
Message User: otnx
  Date: 00/07/15 09:14:39

  Modified: java/org/joist/security UnsecureServlet.java
  Log:
  Added formatted "today's date" to the context as "todayDate".
  Added method redirectToUrl()
  
  Revision Changes Path
  1.27 +29 -1 joist/java/org/joist​/security/UnsecureSe​rvlet.java
  
  Index: UnsecureServlet.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/security/Unsec​ureServlet.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- UnsecureServlet.java 2000/07/14 08:05:50 1.26
  +++ UnsecureServlet.java 2000/07/15 16:14:39 1.27
  @@ -49,6 +49,7 @@
   import java.io.*;
   import java.sql.*;
   import java.util.*;
  +import java.text.*;
   import javax.servlet.*;
   import javax.servlet.http.*;
   
  @@ -69,7 +70,7 @@
    * loading to WebMacro servlets.
    *
    * @author David C. Pellegrini <A HREF="mailto:davidp@​dataweb-systems.com"​>davidp@dataweb-s​ystems.com</A>​
  - * @version $Revision: 1.26 $
  + * @version $Revision: 1.27 $
    *
    * Copyright (c) 1999 dataweb systems, inc.
    * Copyright (c) 1999, 2000 Collab.Net, Inc.
  @@ -463,6 +464,8 @@
           throw new HandlerException(e.g​etMessage());
       }
   
  + DateFormat df = DateFormat.getDateIn​stance(DateFormat.FU​LL);
  + context.put("todayDate", df.format(new java.util.Date()));
   
       // Use the default template to start with. Another template could
       // be substituted before we're done.
  @@ -547,6 +550,31 @@
       throws HandlerException, RedirectURLException
       {
       URL.redirectToHomePage(context, config);
  + }
  +
  +
  + /**
  + * Redirect to a URL
  + *
  + * @param context the WebContext partially populated by WMServlet
  + * @param targetURL the URL to which to redirect
  + * @exception RedirectURLException
  + */
  + protected void
  + redirectToURL (WebContext context, String targetURL)
  + throws RedirectURLException, RedirectException
  + {
  + if (debug) log.debug("redirectToURL: " + targetURL);
  + HttpServletResponse response = context.getResponse();
  + try
  + {
  + response.sendRedirec​t(response.encodeRed​irectUrl(targetURL))​;
  + }
  + catch (IOException e)
  + {
  + redirectToError(context, e.getMessage());
  + }
  + throw new RedirectServletExcep​tion(targetURL);
       }

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: joist/java/org/joist/security UnsecureServlet.java otnx at tigris dot org otnx at tigris dot org 2000-07-15 09:14:39 PDT
Messages per page: