private String readMessage ( String pFileName ) { try { // Read resource from web app InputStream is = getServletContext ( ) . getResourceAsStream ( pFileName ) ; if ( is != null ) { return new String ( FileUtil . read ( is ) ) ; } else { log ( "File not found: " + pFileName ) ; } } catch ( IOException ioe ) { log ( "Error reading file: " + pFileName + " (" + ioe . getMessage ( ) + ")" ) ; } return null ; }
Reads the response message from a file in the current web app .