六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 147|回复: 0

Struts1.2.4学习心得!(五)

[复制链接]

升级  55%

113

主题

113

主题

113

主题

举人

Rank: 3Rank: 3

积分
365
 楼主| 发表于 2013-2-7 20:02:53 | 显示全部楼层 |阅读模式
第五次学习

1.错误和信息的处理.

首先在资源文件中定义错误信息和普通信息.如:MessageResources.properties中定义如下:
[table=90%][tr][td]java代码: [/td][/tr][tr][td]<div style="">
  
  #
  # Resources for testing <html:errors> tag.
  #
  
  errors.header=<table>
  errors.footer=</table>
  errors.prefix=<tr><td>
  errors.suffix=</td></tr>
 10 
 11 property1error1=Property 1, Error 1
 12 property2error1=Property 2, Error 1
 13 property2error2=Property 2, Error 2
 14 property2error3=Property 2, Error 3
 15 property3error1=Property 3, Error 1
 16 property3error2=Property 3, Error 2
 17 globalError=Global Error
 18 
 19 #
 20 # Resources for testing <html:messages> tag.
 21 #
 22 
 23 messages.header=<table>
 24 messages.footer=</table>
 25 
 26 property1message1=Property 1, Message 1
 27 property2message1=Property 2, Message 1
 28 property2message2=Property 2, Message 2
 29 property2message3=Property 2, Message 3
 30 property3message1=Property 3, Message 1
 31 property3message2=Property 3, Message 2
 32 globalMessage=Global Message
 33
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表