当前位置:首页 > 开发 > 编程语言 > Spring > 正文

spring mvc theme change 换肤

发表于: 2012-07-31   作者:bozch   来源:转载   浏览:
摘要: 在spring mvc换肤的相关 配置完成后,出现了如下的异常: javax.servlet.jsp.JspTagException: Theme 'gray': No message found under code 'css' for locale 'zh_CN'. org.springframework.web.servlet.tags.MessageTag.doStartTagInte

在spring mvc换肤的相关 配置完成后,出现了如下的异常:

javax.servlet.jsp.JspTagException: Theme 'gray': No message found under code 'css' for locale 'zh_CN'.
org.springframework.web.servlet.tags.MessageTag.doStartTagInternal(MessageTag.java:184)
org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:79)
org.apache.jsp.WEB_002dINF.jsp.index_jsp._jspx_meth_spring_005ftheme_005f0(index_jsp.java:148)
org.apache.jsp.WEB_002dINF.jsp.index_jsp._jspService(index_jsp.java:82)
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.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:119)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76

出现此问题的原因是:

没有找到classpath下面的主题配置文件,如果是本地化的需要加上_zh_CN ,例如:cool_zh_CN.properties

解决方法是:

查看classpath下面是不是存在主题配置文件以及文件名称,是不是符合要求。如果不符合要求修改之即可。

 

spring mvc theme change 换肤

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号