图像未显示在网络服务器上

时间:2016-01-14 09:52:09

标签: jsp tomcat servlets

我是春季发展的新手。我正在创建一个小应用程序,其中图像将上传到Web服务器,然后显示在jsp页面中。到目前为止,这在我的localhost

工作正常

图片上传路径是(在localhost上)

<ImageView android:id="@+id/preview_post_image" android:layout_width="100dp" android:layout_height="50dp" android:layout_marginLeft="@dimen/regular_corner_small" android:layout_marginTop="@dimen/regular_top" > </ImageView> <TextView android:id="@+id/preview_post_title" android:textStyle="bold" android:layout_toRightOf="@+id/preview_post_image" android:layout_width="wrap_content" android:textColor="@color/color_black" android:layout_height="wrap_content" android:layout_marginTop="@dimen/regular_top" android:textSize="16sp" > </TextView> <TextView android:id="@+id/preview_post_description" android:layout_below="@+id/preview_post_title" android:layout_toRightOf="@+id/preview_post_image" android:layout_width="wrap_content" android:textColor="@color/color_black" android:layout_height="wrap_content" android:textSize="12sp" > </TextView>

我正在使用

在jsp页面中显示图像

E:\S30102015\public\WebContent\public_images

在localhost上一切正常,但在创建<img width='100%' height='100%' src= '<c:url value='/public_images/"+response.filename+"'/>'/> 文件后,图片部分无效。

有人可以指导我这个问题吗? 1.图像可以写在war文件中吗? 2.如果NO为1,那我该怎么办?

编辑:

我的服务器路径是 -

war

我应该在public-html | ---cgi-bin ---WEB-INF---- | --- classes --- lib ---myWar 中有另一个文件夹images并上传其中的所有图片吗?

0 个答案:

没有答案
相关问题