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 davidp
Full name David C. Pellegrini
Date 2000-11-14 17:39:58 PST
Message User: davidp
  Date: 00/11/14 17:39:58

  Modified: java/org/joist/security UnsecureServlet.java
  Log:
  In redirectToHomePage(), construct the url from properties set in
  zone.properties: hostname + http_port + HomePage.
  This ensures that the logout send the user to the "site" home page rather than
  a vhosted project "home" page.
  
  Revision Changes Path
  1.75 +12 -3 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.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- UnsecureServlet.java 2000/11/14 01:13:58 1.74
  +++ UnsecureServlet.java 2000/11/15 01:39:58 1.75
  @@ -73,7 +73,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.74 $
  + * @version $Revision: 1.75 $
    *
    * Copyright (c) 1999 dataweb systems, inc.
    * Copyright (c) 1999, 2000 CollabNet, Inc.
  @@ -630,6 +630,9 @@
       /**
        * Redirect to the site home page.
        *
  + * Construct the home page URL from properties specified in zone.properties.
  + * If the port number is not port 80, include it in the URL.
  + *
        * @param context The WebContext partially populated by WMServlet.
        *
        * @exception HandlerException
  @@ -641,10 +644,16 @@
       {
       try
       {
  - HttpServletResponse response = context.getResponse();
  - StringBuffer newURL = URL.httpAndServer(context);
  + // Build the new URL from properties, leaving off port 80.
  + StringBuffer newURL = new StringBuffer("http://");
  + newURL.append(JoistP​roperties.getPropert​y("hostname"));
  + String port = JoistProperties.getP​roperty("http_port")​;
  + if (!port.equals("80")) newURL.append(':').a​ppend(port);
           newURL.append(JoistP​roperties.getPropert​y("HomePage"));
           if (debug) log.debug("redirectToHomePage: " + newURL);
  +
  + // Redirect
  + HttpServletResponse response = context.getResponse();
           response.sendRedirect
                   (response.encodeRedi​rectUrl(newURL.toStr​ing()));
           throw new RedirectURLException();

« 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 davidp David C. Pellegrini 2000-11-14 17:39:58 PST
Messages per page: