Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: joist/java/org/joist/util URL.java

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

CVS update: joist/java/org/joist/util URL.java

Author davidp
Full name David C. Pellegrini
Date 2001-02-09 13:03:06 PST
Message User: davidp
  Date: 01/02/09 13:03:06

  Modified: java/org/joist/util URL.java
  Log:
  Added getRequestURL()
  
  Revision Changes Path
  1.31 +23 -1 joist/java/org/joist​/util/URL.java
  
  Index: URL.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/util/URL.java,​v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- URL.java 2001/02/01 01:37:33 1.30
  +++ URL.java 2001/02/09 21:03:06 1.31
  @@ -64,7 +64,7 @@
    *
    * @author David C. Pellegrini <A HREF="mailto:davidp@​dataweb-systems.com"​>davidp@dataweb-s​ystems.com</A>​
    * @author <a href="mailto:dlr@col​lab.net">Daniel Rall</a>
  - * @version $Id: URL.java,v 1.30 2001/02/01 01:37:33 elicia Exp $
  + * @version $Id: URL.java,v 1.31 2001/02/09 21:03:06 davidp Exp $
    *
    * Copyright (c) 1999 dataweb systems, inc.
    * Copyright (c) 1999, 2000 CollabNet, Inc.
  @@ -341,4 +341,26 @@
               
           return protocol;
       }
  +
  +
  + /**
  + * Generate a URL to match the incoming request's URL
  + *
  + * @param context the current WebContext
  + * @return a string with the reconstructed URL
  + */
  + protected String getRequestURL (WebContext context)
  + {
  + HttpServletRequest request = context.getRequest();
  +
  + StringBuffer url = schemeAndServer(context);
  + String port = getPort((String)null);
  + if (port != null) url.append(':').append(port);
  + url.append(request.g​etRequestURI());
  + String queryString = request.getQueryString();
  + if (queryString != null) url.append('?').appe​nd(queryString);
  +
  + return url.toString();
  + }
  +
   }

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

Messages

Show all messages in topic

CVS update: joist/java/org/joist/util URL.java davidp David C. Pellegrini 2001-02-09 13:03:06 PST
Messages per page: