I am using spring-mvc framework in my current project. ROOT folder has lots of web folders containing html, jsp, css, js etc. My spring mvc configuration is as follows:
<context:annotation-config />
<bean id="comicControllerBean" class="tv.cinemacraft.videogramwebapp.springmvc.controllers.ComicController" />
<bean id="dashboardControllerBean" class="tv.cinemacraft.videogramwebapp.springmvc.controllers.DashBoardController" />
<bean id="genericControllerBean" class="tv.cinemacraft.videogramwebapp.springmvc.controllers.GenericController" />
<bean id="channelControllerBean" class="tv.cinemacraft.videogramwebapp.springmvc.controllers.ChannelController" />
<!-- <context:component-scan base-package="tv.cinemacraft.videogramwebapp.springmvc.controllers" /> -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/" />
<property name="suffix" value=".jsp" />
<property name="order" value="1" />
</bean>
<bean class="org.springframework.web.servlet.view.ResourceBundleViewResolver">
<property name="basename" value="views" />
<property name="order" value="0" />
</bean>
And I have mapping defined in my java controller. But this is causing static content like any image to vanish. If I request for any image inside any folder by accessing ROOT//.jpg, it gives me 404 response code although image exists. If I remove spring-mvc, image gets displayed.
Note that spring-mvc's resources attribute works for static content but that need my static content to be present inside particular folder e.g. resouce folder. So this approach is not useful for me.