从jsp中获取,作为参数传进来

解决方案 »

  1.   

    System.getProperty("user.dir")
    这是得到user的目录,而不是当前程序运行的工作目录,大哥!
      

  2.   

    我的应用和web是两个空间,之间通过数据库来同步的,在jsp中得到的保存下后。在app中并不能得到。秋帮助!!
      

  3.   

    如果Jsp和Java代码路径之间没有关系的化,就不知道如何做了,
    关注中……
      

  4.   

    你应该看看jsp规范,就知道了。
      

  5.   

    File f = new File(".");
    System.out.println(f.getAbsolutePath());
      

  6.   

    File f = new File("");
    System.out.println(f.getAbsolutePath());
      

  7.   

    System.getProperty("user.dir")
    得到的是你当前应用程序所在的目录。