Originally posted by I Wayan Saryada: I think you can read it using a File or FileReader class. But first you need to get the path to your JSP files, and this can be done by getting the path from the servlet context.
If the file exists within the structure of the web app, using FileReader with getRealPath is a poor (or, at least, non-portable) choice.
getRealPath returns null if your application has been deployed as a packed war file. Using getResourceAsStream works the same way whether the app has been deployed as a packed war file or as an expanded file system.