com.jfw.web.util
Class Misc

java.lang.Object
  extended by com.jfw.web.util.Misc

public final class Misc
extends java.lang.Object

Various utilities methods. All methods are static and thread safe.


Constructor Summary
Misc()
           
 
Method Summary
static java.lang.String getHostApp(javax.servlet.http.HttpServletRequest request)
          Get the request url from the begin until action name.
static java.lang.String getService(javax.servlet.http.HttpServletRequest request)
          Get the service name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Misc

public Misc()
Method Detail

getService

public static java.lang.String getService(javax.servlet.http.HttpServletRequest request)
Get the service name.

Parameters:
request - an HttpServletRequest object.
Returns:
a portion of the requested url, from last char "/" to the end of the url.

getHostApp

public static java.lang.String getHostApp(javax.servlet.http.HttpServletRequest request)
Get the request url from the begin until action name.

Parameters:
request - an HttpServletRequest object.
Returns:
a portion of the requested url, form start until the name of the action.