我对Spring很陌生。我使用spring 3.29版本,tomcat 7.我需要在.jsp文件中显示图像。我搜索了很多。有很多关于这个问题的文章。但是我仍然无法解决这个问题。请帮忙。如何在Spring MVC中的jsp文件中显示图像
,以下是我的应用程序结构
以下是我的春天-servlet.xml文件代码
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
<context:component-scan base-package="com.wipro.controller" />
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass">
<value>
org.springframework.web.servlet.view.tiles2.TilesView
</value>
</property>
</bean>
<bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
<property name="definitions">
<list>
<value>/WEB-INF/tiles.xml</value>
</list>
</property>
</bean>
</beans>
我有一个页面footer.jsp中。我需要在这个文件中添加图像 以下是代码
<!-- Here I need to add an image -->
<hr/>
<p>Copyright 2010-2014 javatpoint.com.</p>
?静态或基于用户登录后? –
静态图像。我已经放置在图像文件夹中。谢谢你的时间。请帮忙。 – Abdul
将你的images文件夹移动到WebContent不是WEB-INF,然后你可以用HTML方式将它添加到
–
vincent