p***p 发帖数: 559 | 1 我想在Servlet里面读写文件,于是用getServletContex.getRealPath("/relativePath"),在LINUX
下面可以得到绝对路径,可是在Windows里面总是NULL。哪位能给段现成的Code,读写
一个Object入文件。 | m******t 发帖数: 2416 | 2 I wouldn't write into anywhere under the servlet context. It may not always
work, e.g., when your app is deployed in a war file. |
|