vmassol     2003/02/20 05:47:02

  Modified:    framework/src/java/share/org/apache/cactus ServletURL.java
  Log:
  Added method to verify if the simulated URL is defined or not
  
  Revision  Changes    Path
  1.10      +17 -1     
jakarta-cactus/framework/src/java/share/org/apache/cactus/ServletURL.java
  
  Index: ServletURL.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/ServletURL.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ServletURL.java   3 Jan 2003 15:35:47 -0000       1.9
  +++ ServletURL.java   20 Feb 2003 13:47:01 -0000      1.10
  @@ -658,4 +658,20 @@
           }
       }
   
  +    /**
  +     * @return true if the simulation URL is not defined or false otherwise. 
  +     */
  +    public boolean isDefined()
  +    {
  +        boolean defined = true;
  +
  +        if ((getHost() == null) && (getPort() == -1) 
  +            && (getContextPath() == null) && (getServletPath() == null) 
  +            && (getPathInfo() == null) && (getQueryString() == null))
  +        {
  +            defined = false;
  +        }
  +        
  +        return defined; 
  +    }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to