ranjiexu
2016-07-25 20:54
我配置了这个标签,但还是无法访问js
<script type="text/javascript" src="http://localhost:8080/seckill/resources/srcipt/seckillDetail.js"></script>
<script type="text/javascript">
$(function(){
debugger;
seckill.detail.init({
seckillId : '1003',
startTime : '1467178967000',
endTime : '1467438172000'
});
});
</script>
报错如下:
Failed to load resource: the server responded with a status of 404 (Not Found)
Uncaught ReferenceError: seckill is not defined
大家不用费神看了,是我的js路劲写错了,不好意思
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<!-- 配置dispatcherServlet -->
<servlet>
<servlet-name>seckill-dispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<!-- 配置springMVC需要的配置文件 -->
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-*.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>seckill-dispatcherServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
Java高并发秒杀API之web层
66085 学习 · 395 问题
相似问题