FileDocCategorySizeDatePackage
WebPath.javaAPI DocGlassfish v2 API3072Fri May 04 22:34:12 BST 2007com.sun.enterprise.appclient.jws

WebPath

public class WebPath extends Object
Provides a convenient way to give a complete path and get back the constituent context root and the remaining path.
author
tjquinn

Fields Summary
private String
contextRoot
private String
path
Constructors Summary
public WebPath(String fullPath)
Creates a new instance of WebPath

        /*
         *The context root should start with a slash.  Find the first one
         *after that, which will separate the context root (for web 
         *container purposes) from the path.
         */
        int secondSlash = fullPath.indexOf('/", 1);
        if (secondSlash < 0) {
            contextRoot = fullPath;
            path = "";
        } else {
            contextRoot = fullPath.substring(0, secondSlash);
            path = fullPath.substring(secondSlash);
        }
    
Methods Summary
public java.lang.StringcontextRoot()

        return contextRoot;
    
public java.lang.Stringpath()

        return path;
    
public java.lang.StringtoString()

        return "WebPathPath: context root = \"" + contextRoot + "\", path = \"" + path + "\'";