2007-12-24

Struts国际化

关键字: 一个最简单的例子
下面是login.jsp页面 -------------------------------------------------------------- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> <% ...
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
2007-12-21

Struts常见问题

关键字: BeanUtils自动复制
在 action中 将formbean中内容复制到javabean中可用 BeanUtils.copyProperties(javabean,formbean); if(user.getBirthdayString()!=null && !user.getBirthdayString().trim().isEmpty()) { BeanUtils.copyProperty(bean, "birthday", user.getBirthdayString()); } copyProperties方法可实现自动转型. 当预知会出现不可转类型时,可用copyPro ...
  • 18:12
  • 浏览 (141)
  • 评论 (0)
2007-12-21

Struts错误信息显示

关键字: 显示错误信息的列表样式
<logic:messagesPresent> <fieldset class="errorMessage"> <legend> <bean:message key="errors.header" /> </legend> <ul> <html:messages id="i"> <li> <bean:write name="i" /> </li> </html:messa ...
  • 16:37
  • 浏览 (188)
  • 评论 (0)
Circle
搜索本博客
最近加入圈子
最新评论