<servlet>
<servlet-name>JobCreateServlet</servlet-name>
<servlet-class>com.vayam.gip.JobCreateServlet</servlet-class>
<init-param>
<param-name>upload_path</param-name>
<param-value>/home/gip/static</param-value>
</init-param>
</servlet>
上面的代码是XML,名为web.xml。我想将<param-value>
即/ home / gip / static更改为/ home / ToUser&#39; sFolder。如何动态更改路径?
答案 0 :(得分:0)
使用XML Parser读取文件并更改所需的值。您可以在此处找到有关如何执行此操作的教程:http://www.java-samples.com/showtutorial.php?tutorialid=152