欢迎访问 生活随笔!

凯发k8官方网

当前位置: 凯发k8官方网 > 前端技术 > javascript >内容正文

javascript

jsp无法解析java方法-凯发k8官方网

发布时间:2024/10/12 javascript 23 豆豆
凯发k8官方网 收集整理的这篇文章主要介绍了 jsp无法解析java方法_spring无法解析jsp视图 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

我有一个tomcat部署,其中一个webapp生活在 web/web-inf 中 . 这是我实例化 spring 容器的方式:

report

org.springframework.web.servlet.dispatcherservlet

contextconfiglocation

/web-inf/report-servlet.xml

1

report

/

正确地找到,加载和解析 report-servlet.xml 文件 .

但是,我的jsp视图无法解析 . 这是我的解析器:

我将根url映射到/ welcome:

当我请求 http://localhost/ 时,找到此视图并委托给 internalresourceviewresolver ,但找不到.jsp:

[org.springframework.web.servlet.view.internalresourceview] (http-11080-1) rendering view with name 'welcome' with model null and static attributes {}

[org.springframework.web.servlet.view.internalresourceview] (http-11080-1) forwarding to resource [/web-inf/views/welcome.jsp] in internalresourceview 'welcome'

[org.springframework.web.servlet.dispatcherservlet] (http-11080-1) bound request context to thread: org.apache.catalina.core.applicationhttprequest@10ea443f

[org.springframework.web.servlet.dispatcherservlet] (http-11080-1) dispatcherservlet with name 'report' processing get request for [//web-inf/views/welcome.jsp]

[org.springframework.web.servlet.dispatcherservlet] (http-11080-1) testing handler map [org.springframework.web.servlet.mvc.annotation.defaultannotationhandlermapping@4ab83be0] in dispatcherservlet with name 'report'

[org.springframework.web.servlet.mvc.annotation.defaultannotationhandlermapping] (http-11080-1) no handler mapping found for [/web-inf/views/welcome.jsp]

[org.springframework.web.servlet.dispatcherservlet] (http-11080-1) testing handler map [org.springframework.web.servlet.handler.simpleurlhandlermapping@2c1533c8] in dispatcherservlet with name 'report'

[org.springframework.web.servlet.handler.simpleurlhandlermapping] (http-11080-1) no handler mapping found for [/web-inf/views/welcome.jsp]

[org.springframework.web.servlet.dispatcherservlet] (http-11080-1) testing handler map [org.springframework.web.servlet.handler.simpleurlhandlermapping@4268cc6] in dispatcherservlet with name 'report'

[org.springframework.web.servlet.handler.simpleurlhandlermapping] (http-11080-1) no handler mapping found for [/web-inf/views/welcome.jsp]

以及web-inf / views的内容:

# ls -l web-inf/views/welcome.jsp

-rw-r--r-- 1 user group 1.2k 2011-05-24 15:43 web-inf/views/welcome.jsp

为什么容器在查找包含我的bean的spring xml文件时没有问题,但是无法解析包含我的jsp的目录?

与50位技术专家面对面20年技术见证,附赠技术全景图

总结

以上是凯发k8官方网为你收集整理的jsp无法解析java方法_spring无法解析jsp视图的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得凯发k8官方网网站内容还不错,欢迎将凯发k8官方网推荐给好友。

  • 上一篇:
  • 下一篇:
网站地图