Only 44 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Linking to file in WEB-INF  RSS feed

 
Tim Pulley
Greenhorn
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.

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
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!