struts1.3 国际化
我在jsp页面里用<bean:message key="cc">为什么访问的时候出错
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /home/register.jsp at line 11
8: <head>
9: <%String realpath=request.getContextPath(); System.out.println(realpath);%>
10: <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
11: <title><bean:message key="register.title" /></title>
12: <link href="<%=realpath %>/home/css/register.css" rel="stylesheet" type="text/css">
13: <script type="text/javascript" src="<%=realpath %>/home/jsfile/register.js"></script>
14: </head>
标签库也加了,资源文件也有,在struts-config也写了
<message-resources parameter="speak.resources.RegisterResources"></message-resources>
speak是包,resources市里面的文件夹,RegisterResources是里面的资源文件名,还有RegisterResources_zh_CH这些
会的解释一下哪里错了,配置的不对吗
我看控制台里的错误是
严重:
Servlet.service() for servlet jsp threw exceptionjava.lang.NullPointerException: Module 'null' not found.
at org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:755)
at org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:735)
at org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1098)
at org.apache.struts.taglib.TagUtils.message(TagUtils.java:956)
at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:224)
------解决方案--------------------看下你国际化文件的名称写的可对。。
------解决方案--------------------你把里面的文件夹换成包或者去掉试试
我的异常网推荐解决方案:An exception occurred processing JSP page,http://www.aiyiweb.com/j2se/33144.html