web.xml servlet配置多个初始化参数init-param

 

配置多个init-param即可(在websphere下可用)

<!-- 上传Servlet -->
<servlet>
	<servlet-name>UploadHeaderServlet</servlet-name>
	<servlet-class>com.urthinker.app.servlet.UploadHeaderServlet</servlet-class>
	<!--设置初始化参数 -->
	<init-param>
		<param-name>sizeMax</param-name>
		<param-value>1048576</param-value>
	</init-param>
	<init-param>
		<param-name>savePath</param-name>
		<param-value>wwwroot/app/upload/header</param-value>
	</init-param>
</servlet>
<servlet-mapping>
	<servlet-name>UploadHeaderServlet</servlet-name>
	<url-pattern>/appServlet/UploadHeaderServlet</url-pattern>
</servlet-mapping>

 

你可能感兴趣的:(web.xml,servlet,多个,init-param)