This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Hello this may have already been asked so excuse me for redundancy. I would like to know how to access a file that is located in a virtual path on the server such as: \WEB-INF\classes\package\classes.cfg Whenever I try to access it either through the abs path or the relative path I get an IO error. I have a standalone app that needs to access the file and then communicate with the servlet. I am positive that I have done this before but my brain is so fried right now, I can't see straight Well I hope someone can help me clear this up, Im gonna get some dinner maybe that will help thanks in advance, EL Durango
use the relative path and pass it to the getRealPath method on the context object to get the full path and then open the file. also check your servlet container is setup to allow reading and writting files in the context by looking at the .properties file in the conf dir and adding an entry if needed.
Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
Joined: Oct 09, 2003
Thanks Tim, I did realize that servletcontext was the best approach. It's now up and running. regards, El Durango