The jar was not initially imported into the WEB-INF lib directory, but directly into the project lib directory, resulting in a 404 or 500 error

After the import is complete, a null pointer error occurs (browser side).

File File = new File(” SRC /druid.properties”); // The main function path is relative to the entire project, i.e. JavaWebInstance. This method does not work on the Web, because SRC // is not read on the Web, and the default/corresponds to the Web directory

Found to be using this. GetSystemClassLoader (.) getResourceAsStream (” druid. Properties “); Resulting error

After using jdbcutils. Class. GetClassLoader () getResourceAsStream (” druid. Properties “); The file information is successfully read

After successful request forwarding, the CSS, js and other paths of the page also fail, so it is best to use the base tag because the request forwarding is based on the path of the previous page load CSS and other files (not sure if it is correct, but I think it should be).