不可能呀,我在windows或是linux下都是这样用的
确定你的代码没问题吗?

解决方案 »

  1.   

    确定了,主要和你的应用服务器有关,我用的是 weblogic 8.1
       javadoc里有这样的说明:This method returns null if the servlet container cannot translate the virtual path to a real path for any reason (such as when the content is being made available from a .war archive).
      

  2.   

    呀,忘了,weblogic下确实不行
    我写好的程序跑在jboss下,有次在weblogic7下做测试也不行
    不好意思楼主