先搭建环境
webapp目录下创建js的文件夹。然后里面引入jquery.min.js这个文件。
页面引入这个js文件
先alert弹窗做测试
服务器重新部署
点击ajax的按钮 并没有起作用
我们在web.xml配置过 servlet的控制器。 配置的拦截模式是 斜线,所有的请求拦截
配置前端控制器,静态资源不要拦截
对js文件夹下的都拦截
如果还有其他的配置,可以参考下图
重新部署项目
创建css和iamges文件夹和配置 对应