javax.servlet.ServletException: Could not resolve view with name 'xxxxx'in servlet with name 'xxx'
来源:互联网 发布:php企业产品展示网站 编辑:程序博客网 时间:2024/06/05 00:29
在请求的返回值中加入 @ResponseBody
如果还是没有
则需要对springMvc 配置文件进行配置
第一,springmvc的配置文件中
<bean id="freemarkerConfig"
class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
<property name="templateLoaderPath" value="/templates/" />
<property name="defaultEncoding" value="utf-8" />
模版加载地址配置是否正确 value="/templates/"
在controller中返回的页面地址需去掉默认加载路径 ( templates/login.ftl) 需去掉 templates
第二,返回json格式的数据的时候需注意 在配置文件中配置的
<property name="defaultContentType" value="text/html" />改为<property name="defaultContentType" value="application/json" />
阅读全文
0 0
- javax.servlet.ServletException: Could not resolve view with name 'xxxxx'in servlet with name 'xxx'
- javax.servlet.ServletException: Could not resolve view with name 'xxxxx'in servlet with name 'xxx'
- javax.servlet.ServletException: Could not resolve view with name 'xxx' in servlet with name
- Spring mvc-异常javax.servlet.ServletException: Could not resolve view with name 'xxx' in servlet with
- javax.servlet.ServletException: Could not resolve view with name 'ok' in servlet with name 'spring'
- javax.servlet.ServletException: Could not resolve view with name 'qq' in servlet with name 'WeiXin'
- javax.servlet.ServletException: Could not resolve view with name 'destination/isOtherExist' in servl
- Spring mvc 4.0+freemarker抛javax.servlet.ServletException: Could not resolve view with name
- Could not resolve view with name 'xxxxx‘
- Could not resolve view with name 'bok.html' in servlet with name 'spring'
- Could not resolve view with name 'ok' in servlet with name 'spring'
- Could not resolve view with name 'pcir/del' in servlet with name 'forum'
- Could not resolve view with name 'sys/menu/user' in servlet with name 'dispatcher'
- Could not resolve view with name '***' in servlet with name 'dispatcher'
- Could not resolve view with name
- Spring 4.0.2 + Apache Tiles 3.0.3 [Could not resolve view with name "xxx"]
- springMVC+freemarker中Could not resolve view with name... 问题解决
- javax.servlet.ServletException: bean [name] not found within scope
- Swfit Array 遍历 map flatMap filter reduce
- sparse coding VS autoencoder
- allegro 小技巧--给一组bus net 分配颜色
- QMediaPlayer多媒体类
- 华为单臂路由配置-Smallbaal的博客
- javax.servlet.ServletException: Could not resolve view with name 'xxxxx'in servlet with name 'xxx'
- Windows密码破解工具ophcrack
- OC学习笔记,几种初始化元素的方式
- BASIC-12十六进制转八进制
- jmeter(postman)发送请求对象,springmvc接收对象
- Android GPS定位详解
- 简单实现Table固定表头
- 即试即买丨帕克西首推假发自动售卖机,3D发型试戴变革假发购物体验!
- macOS High Sierra 重装系统卡在剩余……