系统由windows部署在linux问题

1,web.xml中classpath问题“

classPath不能在前面加”/“,linuxx系统中认为"/"为绝对路劲

<context-param>

        <param-name>contextConfigLocation</param-name>

        <!-- 应用上下文配置文件 -->

        <param-value>

classpath:config_spring/applicationContext.xml

<!-- ,classpath:/config_spring/spring-mybatis.xml -->

</param-value>

    </context-param>

2,jsp中用:

<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/jquery-2.1.4.js"></script>

上下文路劲

或者绝对路劲----

<script type="text/javascript"

src="${applicationScope.contextPath}/resources/plugins/nice-validator/jquery.validator.js?local=zh-CN"></script>

猜你喜欢

转载自yuhuiblog6338999322098842.iteye.com/blog/2306670