10 Replies Latest reply on Oct 26, 2002 12:08 PM by jules

    getRealPath returns null

    ben2

      I have seen this posted a couple other times but did not see any solution.

      I am running jboss-3.0.3_tomcat-4.1.12 and when I call getRealPath it always returns null.

        • 1. Re: getRealPath returns null
          sdixit

          There is no solution. Don't use integrated JBoss-Tomcat version. I did post this as a bug in Tomcat, they sent me back to JBoss as well as suggested using unpackwar=false tag. I haven't done anything with it yet though.

          Sandeep

          • 2. Re: getRealPath returns null
            ben2

            I forgot to also mention that I get this when trying to use turbine

            • 3. Re: getRealPath returns null
              zeroshot

              i know it defies the point of war files but if u make a dir called .war in server/x/deploy then u wont get a null value

              • 4. Re: getRealPath returns null
                ben2

                This is sorta unrelated to the original topic but if I have an ear with a war module and an ejb module can I have a a full application deployed in a directory structure sorta like this

                /someapp.ear/
                /someapp.ear/META-INF/application.xml
                /someapp.ear/someapp.war/
                /someapp.ear/someapp.war/WEB-INF/web.xml
                /someapp.ear/someapp.jar/
                /someapp.ear/someapp.jar/META-INF/ejb-jar.xml

                • 5. Re: getRealPath returns null
                  sdixit

                  I don't think that will work. As far as I know it only works for webapp.war directory.

                  - Sandeep

                  • 6. Re: getRealPath returns null

                    I can understand that you guys all have your reasons for wishing to stay with TC - but there is always the option of going with Jetty - you may be pleasantly surprised.

                    At the very least, give it a try. You will benefit by cross-referencing against another implementation of the spec, so your app becomes more portable. You might just choose to use Jetty while you wait for TC bug-fixes to filter through, or you might find you like it and stay with it....

                    Jules (Jetty Evangelist!)

                    • 7. Re: getRealPath returns null
                      sdixit

                      I am trying out Jetty. In terms of compilation of jsp, it seems to be a little slower than Tomcat. getRealPath() does work but there is problem in translating \ as well as / to system-dependent File.separator().

                      Sandeep

                      • 8. Re: getRealPath returns null
                        ben2

                        Is there a release of jboss3.0.X that comes bundled with jetty? There only appears to be jboss-2.4.X versions that come bundled with jetty. Or am I missing something?

                        • 9. Re: getRealPath returns null
                          sdixit

                          Jetty comes with all JBoss3.X distributions by default. Use JBoss-3.0.3.zip.

                          Sandeep

                          • 10. Re: getRealPath returns null

                            Jetty and Tomcat both use Jasper (Jakarta JSP engine) for JSPs, so it is unlikely that there will be much speed difference in actual JSP handling.

                            What you are probably seeing is that Jetty may allocate more resources initially, because it is production-tuned and this enables it to ramp-up to production-level throughputs more quickly.

                            If you try Jetty and experience any difference in fn-ality between it and Tomcat, please take the time to reduce it to a small test app and mail it to me. These differences may reflect ambiguities in the spec, or other points of divergence between Jetty and Tomcat. They should all be investigated and resolved.

                            Thanks for your time guys,


                            Jules@jboss.org