I am trying to migrate my application to Tomcat from Jetty and am running into a snag with the way Jetty/Tomcat implement thier method getResource(). Why does Tomcat return a JNDI reference URL and Jetty returns a File reference URL? I am trying to read files that are located in my WAR under /folder directory. What code change can I make in order for this to work on both Jetty and Tomcat implementations?
URL url = ServletContext.getResource( "/folder/file.txt"); System.out.println( "url: " + url.toString() ); Jetty Results: url: file:/home/jboss/server/default/deploy/myapp.ear/myapp.war/folder/file.txt Tomcat Results: url: jndi:/localhost/warcontext/folder/file.txt View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3841398#3841398 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3841398 ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
