• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Linking to file in WEB-INF  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone! i am new to Java EE programming and have successfully deployed a java application for the first time! The application works fine when im testing on my local machine, but when i get the app online, it fails to locate a .txt file that is included in the WEB-INF folder. I am not too knowledgable about deploying java to the web, and im using my uncles web hosting service. He uses Plesk to manage this many websites, and his server has Tomcat 7.x. To get my java app on my domain, i simply give Plesk a .war file and everything else is done automatically.

This code works for me when i am on my local machine:

ItemIO is looking to accomplish this:

Once the app goes online, im not really sure what source i should be specifying. to create this File object. Any help or ideas would be greatly appreciated.

I would like to avoid the solution of putting the .txt in a directory that is accessible by the public.

Author and ninkuma
Posts: 66806
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

You haven't really said what your specific issue is. Do you get an error message? if so, please include it in a reply.
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!