Hi together,
I know that many posts about this topic already exist. But I am not able to find a working solution for me. Hope you guys can help me.
I want to outsource all my images into a folder, outside the project folder. so i tried to add following code to my servlet.xml:
andCode:<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:security="http://www.springframework.org/schema/security" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.directwebremoting.org/schema/spring-dwr http://www.directwebremoting.org/schema/spring-dwr-3.0.xsd">
JSP Call:Code:<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/> <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/> <!-- External resource mapping --> <mvc:resources mapping="/images/**" location="/../external_files/images/" />
Project folder StructureCode:<img src="<c:url value='/images/pdf.jpg'/>" />
WebRoot
|- images
|- META-INF
|- WEB-INF
External folder
[tomcat6 dictionary]/webapps/external_files/images
Don't know what's going wrong. Thx for your help!


Reply With Quote
