public String getServletURI ( HttpServletRequest req ) { String uriName = req . getServletPath ( ) ; String pathInfo = req . getPathInfo ( ) ; if ( pathInfo != null ) uriName = uriName . concat ( pathInfo ) ; if ( uriName == null || uriName . length ( ) == 0 ) uriName = "/" ; uriName = WSUtil . resolveURI ( uriName ) ; int sindex ; if ( ( sindex = uriName . indexOf ( ";" ) ) != - 1 ) { uriName = uriName . substring ( 0 , sindex ) ; } //we need to ensure we are following the java EE spec and handle a colon in the uri if ( uriName . indexOf ( ":" ) >= 0 ) { uriName = uriName . replaceAll ( ":" , "%3A" ) ; } return uriName ; }
Return the full servlet path including any additional path info .