Do you really need to load it from a file? If you place it along your classes (in WEB-INF/classes) you can get an InputStream to it using the class loader:
InputStream csv =
SomeClassInTheSamePackage.class.getResourceAsStream("filename.csv");
More Related Contents:
- How to connect with Web Api Spotify (in Java)?
- getResourceAsStream() vs FileInputStream
- Socket using in a swing applet
- File path to resource in our war/WEB-INF folder?
- java.lang.UnsatisfiedLinkError no *****.dll in java.library.path
- Who sets response content-type in Spring MVC (@ResponseBody)
- Getting IP address of client [duplicate]
- Add Bean Programmatically to Spring Web App Context
- What to learn for making Java web applications in Java EE 6? [closed]
- What is the main-stream Java alternative to ASP.NET / PHP
- Servlet Mapping using web.xml
- calling a java servlet from javascript [duplicate]
- Exception NoClassDefFoundError for CacheProvider
- Best Practices to Create and Download a huge ZIP (from several BLOBs) in a WebApp
- Spring – No EntityManager with actual transaction available for current thread – cannot reliably process ‘persist’ call
- Can I turn off the HttpSession in web.xml?
- question on GWT, Cookies and webpage directing
- Initializing Log4J with Spring?
- shutdown hook for java web application
- Tomcat CORS filter
- How can I share a variable or object between two or more Servlets?
- How do I get a list of all HttpSession objects in a web application?
- Is there a way to run a method/class only on Tomcat/Wildfly/Glassfish startup?
- Deploying Springboot to Azure App Service
- Role/Purpose of ContextLoaderListener in Spring?
- NoClassDefFoundError JsonAutoDetect while parsing JSON object
- Log4j, configuring a Web App to use a relative path
- How to deploy a Java Web Application (.war) on tomcat?
- ExceptionHandler doesn’t work with Throwable
- Maven: Customize web.xml of web-app project