Where to place text files in Eclipse Dynamic Web Project using Tomcat?

I am working on a dynamic web project in Eclipse with Tomcat 7. All my html, css and javascript files are inside the WebContent folder in the eclipse workspace. All java files are inside the src folder . Everything works well for simple programs. But now I want to read a text file from java programs. I'm not sure where to put the text file in the eclipse workspace so that it is correctly deployed to the Tomcat webapps directory inside the folder. / metadata eclipse.

+5
source share
2 answers

You can use the ServletContext.getResourceAsStream () API.

. , /WEB-INF

0

ur webroot webroot , .

- classpath -

-1

All Articles