javax.servlet.ServletException: javax.servlet.jsp.JspException: Missing message for key
typeExceptionreportmessagejavax.servlet.ServletException:javax.servlet.jsp.JspExcepti...
type Exception report
messagejavax.servlet.ServletException:
javax.servlet.jsp.JspException: Missing message for key
"login.page.title"
descriptionThe server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Missing message for key "login.page.title"
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1023)
org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.ServletException: javax.servlet.jsp.JspException: Missing message for key "login.page.title"
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:865)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794)
org.apache.jsp.login_jsp._jspService(login_jsp.java:130)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1023)
org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
struts-config,xml中
<message-resources parameter="com.Demostruts.struts.resources.ApplicationResources.properties" />
</struts-config>
而ApplicationResources.properties中也有login.page.title=login.page.title=Login window 展开
messagejavax.servlet.ServletException:
javax.servlet.jsp.JspException: Missing message for key
"login.page.title"
descriptionThe server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Missing message for key "login.page.title"
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1023)
org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.ServletException: javax.servlet.jsp.JspException: Missing message for key "login.page.title"
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:865)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794)
org.apache.jsp.login_jsp._jspService(login_jsp.java:130)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1023)
org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
struts-config,xml中
<message-resources parameter="com.Demostruts.struts.resources.ApplicationResources.properties" />
</struts-config>
而ApplicationResources.properties中也有login.page.title=login.page.title=Login window 展开
3个回答
2016-01-12 · 做真实的自己 用良心做教育
千锋教育
千锋教育专注HTML5大前端、JavaEE、Python、人工智能、UI&UE、云计算、全栈软件测试、大数据、物联网+嵌入式、Unity游戏开发、网络安全、互联网营销、Go语言等培训教育。
向TA提问
关注
展开全部
“Missing message for key "XXX"”
缺少所需的资源,检查ApplicationResources.properties文件里是否有jsp文件里需要的资源,例如:
<bean:message key="msg.name.prompt"/>
这行代码会找msg.name.prompt资源,如果AppliationResources.properties里没有这个资源就会出现本异常。在使用多模块时,要注意在模块的struts-config-xxx.xml里指定要使用的资源文件名称,否则当然什么资源也找不到,这也是一个很容易犯的错误。
注意:记得把AppliationResources.properties文件拷贝到TOMCAT的相关目录下
缺少所需的资源,检查ApplicationResources.properties文件里是否有jsp文件里需要的资源,例如:
<bean:message key="msg.name.prompt"/>
这行代码会找msg.name.prompt资源,如果AppliationResources.properties里没有这个资源就会出现本异常。在使用多模块时,要注意在模块的struts-config-xxx.xml里指定要使用的资源文件名称,否则当然什么资源也找不到,这也是一个很容易犯的错误。
注意:记得把AppliationResources.properties文件拷贝到TOMCAT的相关目录下
展开全部
都正确加载了 properties 文件?那个 paramter 的值需要 .properties 后缀吗?服务器启动时有没有打印出其实的日志,比如警告?
更多追问追答
追问
paramter的值有的,没有警告
追答
贴一段 ApplicationResources_zh_CN.properties 里面的内容来看看,这个文件名是 zh_CN 结尾的吧?我看一般别人的程序如果使用了这样的 properties 文件都是 zh_CN 这种大写结尾的啊。
ApplicationResources_zh_CN.properties 里面不能有中文字符,必须都是 ISO-8859-1 能识别的字符。中文会以 \2343 这样方法编码的。
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
可能你JSP页面取值时写错了,仔细检查一下
追问
当我把中的null设为false时,页面显示它到ApplicationResources_zh_cn.properties中去找了,但没找到标签,可我的ApplicationResources_zh_cn.properties的确有,当我重新用native2ascii命令时,出现ApplicationResources_zh_cn.properties can not read
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |