I am sorry for the title, may be you get confused about it. But definitely, you will find the answer about the external file and java web app problem. I put phrase “the story about” because I retell how I solve that thing.
Although it is not the first time I build an application using Java Web App, there are lot of stuff that I don’t really understand. I think because Java Web App is well design application platform. Because of that, I tried to know more about it so finally I tried implementing my final project using Java Web App.
There are some considerations why I prefer web app, the main reason is using web app, the system could be used by a lot of people. I hope it could also happen to my app.
At the first time, I think all will go well as I plan in my head. You’re right, problem can rise anytime. Based on the Java Web architecture, there are some components on Java Web App. They are source package for implementing the java logic class, then web for implementing web page. We also could use library when our App needs library.
First, my app goes well without any problem when it run on java logic classes. Suddenly, after creating a java servlet and initiate an object that use library for reading external files, the server get some SEVERE messages and shut down as well as give me lot of error messages.
Oh my God, I never imagine, it would happen. Okay, finally for the full day today, I tried to overcome this. I search over the internet and ask to my friends about it and even I tried to ask in stackoverflow.com (here for the first time, I ask about it), I still could not figure out, what I supposed to do.
Until finally I asked my friend again (I hope he give me an inspiration to overcome this), yeah right, he give me some clues although he don’t realize that i think but thank you very much. So, to solve that thing, I tried to create an external file from a java class to find out the relative path of the server by printing the absolute path of the file. I know it is like a tricky thing. Based on that information, I put all of the external file that I need there. I tried to start it over again. Thanks, it goes well.
So, I got something interesting thing, you got a problem and for the whole day you haven’t figure out the solution. May be you only need to ask your friend opinion about it then you will get an inspiration. It is like my friend said, I want to sleep to get an inspiration.
At the end, my be the solution that I figure out is not the best solution, but I hope it will help you to manage the same problem to me.
Thanks for spending your time for reading my story. 😀