`

struts+spring+hibernate的web应用【10】

    博客分类:
  • ssh
阅读更多

第二十六部分:接着就是写资源文件了。

              com.game.resources包中添加ApplicationResourcesProducts.properties文件。

              如果你的eclipse中有Properties Editor这个插件,就可以用Properties Editor打开资源文件

              进行编写,省去了用命令行转换格式的麻烦。配置内容如下:

errors.required={0}不能为空.
errors.minlength={0}不能小于 {1} 个字符.
errors.maxlength={0}不能大于 {1} 个字符.
errors.invalid={0}输入格式不对.
errors.byte={0}必须为字节.
errors.short={0}必须为短整型.
errors.integer={0}必须为整型.
errors.long={0}必须为长整型.
errors.float={0}必须为浮点型.
errors.double={0}必须为双精度型.
errors.date={0}不是一个正确的日期或格式不对.
errors.range={0} is not in the range {1} through {2}.
errors.creditcard={0} is not a valid credit card number.
errors.email={0}不是一个有效的email地址.

errors.gameNameCn=游戏中文名称
errors.gameNameEn=游戏英文名称
errors.gameCapacity=碟数
errors.gamePrice=价格

 

 

 第二十七部分:接下来就是写页面文件了。在products文件夹中添加如下页面。

               index.jsp页面代码:

 

<%@ page contentType="text/html;charset=GBK" language="java" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK"/>
<title>游戏软件管理系统</title>
</head>
<body>

<a href="/game/getProducts.do?method=doGetProducts&&flag=1">进入游戏软件管理单元</a>
</body>
</html>

 

 

 

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics