jsp访问到之后报错如下:

Uncaught SyntaxError: Unexpected token <

问题出在哪里:

发现把这个注销掉,就不会出现这个问题了,那script引用js文件哪里出了问题,和这个有关系么?

解决:

最后发现

看来 和页面上的前台代码没有任何的关系。

最后定位到,是因为spring boot项目中,设置了拦截器,拦截了所有的请求,只放过/toLogin和/login这两个,所以请求http://localhost:8080/js/jquery-3.2.1.min.js而给他返回的却是个页面,所以才会报本篇文章的错误。

问题解决~~~

【jsp】jsp访问到之后报错如下:Uncaught SyntaxError: Unexpected token <的更多相关文章

  1. 【转】Vue项目报错:Uncaught SyntaxError: Unexpected token <

    这篇文章主要介绍了Vue项目报错:Uncaught SyntaxError: Unexpected token <,在引入第三方依赖的 JS 文件时,遇到的一个问题,小编觉得挺不错的,现在分享给 ...

  2. 【shiro】使用shiro搭建的项目,页面引用js,报错:Uncaught SyntaxError: Unexpected token <

    使用shiro搭建项目过程中,总是出现登录页面 登录第一次有效果,登陆第二次出现302状态码,第三次又有效果,第四次又没有效果的局面. 因此,采用ajax提交页面登录的用户名和密码,但是在引用js的过 ...

  3. Thinkphp中js报错,Uncaught SyntaxError: Unexpected token }

    tp中js在行末使用注释报错Uncaught SyntaxError: Unexpected token } if (new_directors==1) {// 注释 解决办法:注释换成单行 if ( ...

  4. js中字符串转json对象时报错: Uncaught SyntaxError: Unexpected token s in JSON at position 2

    解决方法: js中获取jsp的返回值 var json='${channels}' var channels = JSON.parse(json);就报上面的错. json的值最终会转成这种json格 ...

  5. 报错:Uncaught SyntaxError: Unexpected token)

    用JSON格式传值时,js一直 报这个错误:Uncaught SyntaxError: Unexpected token) 错误位置是:result=eval('('+result+')'): 原因: ...

  6. 关于Uncaught SyntaxError: Unexpected token o in JSON at position 1,chrome持续报错的相关解析

    今天跟大家分享我前两天遇见的一个BUG,说出来很难受,因为这个BUG花了我一个多小时去找原因,后来莫名其妙的故障消失了,强迫症犯了的我,居然花了2个多小时去故意再制造这个BUG,只想弄明白WHY??? ...

  7. jsp页面的html代码显示不出来,提示Uncaught SyntaxError: Unexpected token <

    jsp页面的html代码显示不出来,提示Uncaught SyntaxError: Unexpected token < <input type="hidden" na ...

  8. jquery使用ajax报错[Uncaught SyntaxError: Unexpected token :]

    $.post('/ajax/validate.do',{"id": id},function(ret){ //ret }); 返回值明明是json,格式也是正确的,却解析不成功,在 ...

  9. vue - public 引入 <script>报错 Uncaught SyntaxError: Unexpected token '<'

    1.现象 原本我是直接在母版引入 <script type="application/javascript" src="static/config.js" ...

随机推荐

  1. 【Minimum Path Sum】cpp

    题目: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right w ...

  2. leetcode 【 Plus One 】python 实现

    题目: Given a non-negative number represented as an array of digits, plus one to the number. The digit ...

  3. python2.7运行报警告:UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal解决办法

    1. 程序源代码报错部分: #选择年级if grade == '幼升小': outline.nianji().pop(0).click()elif grade == "一年级": ...

  4. 5个最佳的Android测试框架(带示例)

    谷歌的Android生态系统正在不断地迅速扩张.有证据表明,新的移动OEM正在攻陷世界的每一个角落,不同的屏幕尺寸.ROM /固件.芯片组以及等等等等,层出不穷.于是乎,对于Android开发人员而言 ...

  5. JWT实现token的生成和认证demo

    上篇写到对JWT的理解,这篇写一个小的demo来实践下 Github:https://github.com/wuhen152033/token/tree/dev 简介 本次的demo是基于Spring ...

  6. 安装 Redis的Python客户端redis-py

    安装 redis-py 使用easy_install sudo easy_install redis 源码安装 git clone https://github.com/andymccurdy/red ...

  7. schema.xml属性概念

    # schema 定义逻辑库 checkSQLschema  当该值设置为 true 时,如果我们执行语句**select * from TESTDB.travelrecord;**则 MyCat 会 ...

  8. 【转】log4js在PM2的cluster模式下大坑

    请直接查看原文:https://blog.yourtion.com/fix-log4js-with-pm2-not-work.html 之前一直使用 debug 还有 console.log 去打日志 ...

  9. hibernate运行常见错误

    错误一: Exception in thread "main" org.hibernate.MappingException: Could not determine type f ...

  10. 对计算属性中get和set的理解

    原文参考:https://blog.csdn.net/xiaxiaoxian/article/details/79304004