2.<bean:message key="index.title"/>//消息标志,显示属性文件中定义的index.title的值
4.<logic:notPresent name="database" scope="application">
//判断application范围内是否有database这个对象

解决方案 »

  1.   

    4.<logic:notPresent name="database" scope="application">
    //判断application范围内是否有database这个对象
    如果存在,则跳出其包含的体内容,否则执行体内容。
      

  2.   

    5.<bean:write name="registrationForm" property="username"
                       scope="request" filter="true"/>相当于<%=registrationForm.getUsername()%>假设registrationForm.getUsername()="<b>filter test string</b>"
    filter=true 则输出filter test string 即过滤超文本
    filter=false则输出<b>filter test string</b> 即不过滤超文本缺省filter=false
      

  3.   

    2.<bean:message key="index.title"/>//消息标志,显示属性文件中定义的index.title的值"属性文件" 在那里?怎么设置?
      

  4.   

    struts-config.xml 有这么一个段落
    <message-resources parameter="ApplicationResources" />
    如果这么写的话对应的文件为/WEB-INF/classes/ApplicationResources.properties如果写成
    <message-resources parameter="resources.ApplicationResources"/>
    对应的文件为/WEB-INF/classes/resources/ApplicationResources.properties-------------------------------------------------------------
    明白了路径和配置,看ApplicationResources.properties文件本身
    例如index.title 中文为“消息标志”
    找到你的jdk/bin/native2ascii.exe 打开
    用中文输入法输入 消息标志 回车
    然后得到转码结果\u6d88\u606f\u6807\u5fd7这样ApplicationResources.properties中加入这句index.title=\u6d88\u606f\u6807\u5fd7则 <bean:message key="index.title"/>不会抱错了,会显示 消息标志 字样