If we're both doing something wrong, or if you find a work around please let me know. I'm using jboss I had the same problem on 3. My workaround has been Jetty, although I would prefer Tomcat. I have asked this question about a year ago since JBoss 3. Since that time, I use JBoss with Jetty. It seems that the problem is not solved for a year. Or no one aware of this? You have 3 alternatives now: 1.
You unpack the. Below is the code that is made reusable. The problem is when I call the getServletContext. Would it be too much to ask for you to post a working example of how I could make this file existence check in a reusable way? I am obviously having a problem getting it to work. When Tomcat starts a context an HttpServlet child instance , it gives the instance the information it needs to respond to certain questions, such as getServletContext.
A reusable File IO class should know nothing about servlets, this includes knowing nothing about how to retrieve a servlet context path which, when I put it that way, seems to be awfully specialized information, does it not? Therefore: not something one would find in a properly generalized class. Have your FileIO accept the result of the getContextPath query as a method parameter, not generate it!
Hello I am trying to build a reusable class to handle all of my file IO. Pranav Thakur. Optional 'thank-you' note:. I want to get the real path of a file in WebLogic 9. When I do this via an enterprise application it gives the real path. Whereas, when I do it via an EAR file then it returns null. I also found out that this is a security feature introduced by WebLogic 9.
I also tried using a configuration tag in weblogic-application. Please let me know if there is a work around for this. Thanks, -Pranav. Joe Ess. I like Welcome to the JavaRanch.
0コメント