部署的服务器中缺少JS文件夹

时间:2016-12-12 12:30:41

标签: twitter-bootstrap jsp ant

我有一台服务器,在部署时无法找到bootstrap.min.js,它应该位于localhost:8080 / js。但是,当我通过chrome查看网页的来源时,没有js文件夹,只有一个css文件夹:

enter image description here

Whcih导致无法加载资源错误:

enter image description here

在eclipse中,js文件夹存在于web-content:

enter image description here

我正在使用ant来构建war文件,是否需要做一些特定的事情才能让它与JS文件夹及其中的正确文件一起部署?当我查看.war文件的内容时,js文件夹就存在于其中。我已经尝试更改它访问bootstrap.min.js的路径以匹配.war文件中的内容,但这没有用。

1 个答案:

答案 0 :(得分:0)

我猜你的build.xml有问题。 请检查这个属性:

<property name="src.web.dir" value="${src.main.dir}/web"/>