action代码-----------------------------public class LoginAction extends ActionSupport { private static final long serialVersionUID = 7038538052682849306L;
private List<Point> point;
private Date time; public List<Point> getPoint() {
return point;
} public void setPoint(List<Point> point) {
this.point = point;
}
public Date getTime() {
return time;
} public void setTime(Date time) {
this.time = time;
} public String execute() throws Exception {
// TODO Auto-generated method stub
return SUCCESS;
}
}bean代码-----------------------------
package com.bean;public class Point {
private int x;
private int y; public int getX() {
return x;
} public void setX(int x) {
this.x = x;
} public int getY() {
return y;
} public void setY(int y) {
this.y = y;
}}
转化类代码------------------------------
public class PointConver extends StrutsTypeConverter { @Override
public Object convertFromString(Map arg0, String[] values, Class arg2) {
List<Point> list= new ArrayList<Point>();
for (int i=0;i<values.length;i++)
{
Point point= new Point();
String[] paramValues = values[i].split(",");
int x = Integer.parseInt(paramValues[0]);
int y = Integer.parseInt(paramValues[1]);
point.setX(x);
point.setY(y);
list.add(point);
}
return list;
} @Override
public String convertToString(Map arg0, Object o) 
{
List<Point> list = (List<Point>)o;
StringBuilder sb = new StringBuilder();
sb.append("[");
int number = 0;
for (Point point : list) 
{
++number;
int x = point.getX();
int y = point.getY();
sb.append(number).append("x=").append(x).append("y=").append(y);
}
sb.append("]");
return sb.toString();
}}web xml  文件------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="leixing_zhuanhuan_jihe"
extends="struts-default">
<action name="login" class="com.action.LoginAction">
<result name="success">/MyJsp.jsp</result>
</action>
</package>
</struts>struts xml文件-----------------------------
com.bean.Point=com.leixingzhuanhuan.PointConver
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 
xmlns="http://java.sun.com/xml/ns/javaee" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
  <filter>
<filter-name>struts</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
login.jsp-----------------------
<html>
<head>
<base href="<%=basePath%>"> <title>My JSF 'login.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head> <body>
<s:form action="login" >
<s:textfield name="point" label="zhuobiao1"></s:textfield>
<s:textfield name="point" label="zhuobiao2"></s:textfield>
<s:textfield name="point" label="zhuobiao3"></s:textfield>
<s:textfield name="time" label="time"></s:textfield>
<s:submit label="ti_jiao"></s:submit>
</s:form>
</body>
</html>myjso-------------------------------<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSF 'MyJsp.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--></head>
  
<body>
<s:property value="point"/><br>
<s:property value="time"/>
</body>
</html>