0
我已经上传图像到服务器机器文件夹像c:图像。 此<context-param> <description>Location to display uploaded file</description> <param-name>file-display</param-name> <param-value> C:/images/ </param-value> </context-param>
图像显示在jsp从servlet
它上传得很清楚我写了“web.xml中”。 现在我需要在一个jsp上用<img src=""/>
标签显示这些图像。
我发现在servlet的 使用
filepath = getServletContext().getInitParameter("file-display");
路径,以及附加的图像名称。 但是如何在jsp中用“<img src=""/>
”标记表示。 有没有另一种方式来从服务器位置文件夹中jsp中显示图像。
谢谢@micha,但我没有得到,你可以发送示例代码。 –