JWSAdHocServletRequestWrapperpublic class JWSAdHocServletRequestWrapper extends HttpServletRequestWrapper Wrapper around HttpServletRequest used for forwarding requests for the
initial JNLP document for an app client - which arrives at the ad hoc
servlet - off to the system servlet for processing. |
Fields Summary |
---|
private String | adjustedPathInfo |
Constructors Summary |
---|
public JWSAdHocServletRequestWrapper(HttpServletRequest request, String contextRoot, String category)Creates a new instance of AdHocServletRequestWrapper
super(request);
setUserInfo(contextRoot, category);
|
Methods Summary |
---|
public java.lang.String | getPathInfo()Returns the adjusted path information for use in the system web app.
return adjustedPathInfo;
| private java.lang.String | removeLeadingSlash(java.lang.String path)Removes any leading slash from the path segment.
String result = null;
/*
*Exclude a slash at the beginning of the context root.
*/
int slash = path.indexOf("/");
if (slash == 0 && path.length() > 1) {
result = path.substring(1);
} else {
result = path;
}
return result;
| private void | setUserInfo(java.lang.String contextRoot, java.lang.String category)
adjustedPathInfo = "/" + removeLeadingSlash(category) + "/" + removeLeadingSlash(contextRoot);
|
|