public static String getModulePathForRelativeURI ( String uri ) { if ( uri == null ) return null ; assert uri . length ( ) > 0 ; assert uri . charAt ( 0 ) == ' ' : uri ; // Strip off the actual page name (e.g., some_page.jsp) int slash = uri . lastIndexOf ( ' ' ) ; uri = uri . substring ( 0 , slash ) ; return uri ; }
Get the Struts module path for a URI that is relative to the web application root .