3 Replies Latest reply: Feb 2, 2007 4:47 AM by 800322 RSS

    file not found exception....in jboss

    807607
      how to access a .properties file in jboss web application....as when running the jsp code from jboss which in turn invokes the java class file which is using the .properties file we get the file not found exception with respect to the properties file though it is not posing any exceptions while executing the java code from the command line..please feel free to provide any useful answers.
        • 1. Re: file not found exception....in jboss
          800322
          Well, the file isn't where you tell the program it would be. You are aware that you should use direct file access anyway? Use the resource loading mechanism (ClassLoader.getResourceAsStream()) instead.

          Why is a JSP doing anything but displaying data? Everything else is a servlet's task.
          • 2. Re: file not found exception....in jboss
            807607
            the jsp file has been used to create an object of the java file that contains the processing logic...there are no servlets in the picture so what do i do so that the sane code works fine..when it is being accessed through the jsp file coz its running absolutely fine on command line no hassels....even after incorporating the ResourceBundle.getBundle() option.
            • 3. Re: file not found exception....in jboss
              800322
              the jsp file has been used to create an object of the
              java file that contains the processing logic...
              Yes, and given all I know about good application design, this doesn't sound like something a JSP should be doing.
              absolutely fine on command line no hassels....
              An application server is not a command-line environment. It imposes a huge bunch of restrictions and implications.

              Did you try what I told you?