struts.xml配置:
<constant name="struts.custom.i18n.resources" value="package"/>404.jsp页面:
<%@page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=GBK">
  <title><s:property value="%{getText('page.title')}"/></title>
</head>
<body class=main topmargin=30 leftmargin=30>
<span align=center class=alert>
  <img src="/szxckin/zh_CN/images/png-0652.png" width=64 height=64/>
 <s:property value="%{getText('notfound')}"/>(404 Not Found)!
</span>
</body>
</html>我这样配置了,但运行会出错,提示_jspx_th_s_005fproperty_005f0.setValue("%{getText('page.title')}");这里有错!请各位帮忙。

解决方案 »

  1.   

    <title><s:property value="%{getText('page.title')}"/></title>
    这样累不累,直接<s:text name="page.title"/>不就行了?
      

  2.   

    <title><s:property value="%{getText('page.title')}"/></title>
    这样累不累,直接<s:text name="page.title"/>不就行了?
      

  3.   

    <fmt:message key='page.title' />
    一般不都通过fmt,来实现国际化的马?
      

  4.   

    我记得struts2标签不就有<i18n相应的标签来处理国际化吗,建议查看struts标签库文档吧。
      

  5.   

    你的国际化资源文件中有没有配置page.title的关键字
      

  6.   

    这种会提示org.apache.jasper.jasperException:The absolute uri:http://java.sun.com/jsp/jstl/fmt cannot be resolved in either web.xml or the jar files deployed with this application
    把对应的包导进去还是会提示这个错的!
      

  7.   

    使用struts国际化是要经过action的,你没经过action就直接到了jsp页面,这样是得不到配置文档的值的。试试用action再跳到jsp页面中去。