日期:2014-05-19 浏览次数:20695 次
package com.eptal.action;
import com.opensymphony.xwork2.ActionSupport;
public class UserAction extends ActionSupport {
private static final long serialVersionUID = -2863157710995261597L;
private String names;
public String execute() {
System.out.println("zjijian");
return "Dt";
}
public String getNames() {
return names;
}
public void setNames(String names) {
this.names = names;
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
"http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<constant name="struts.action.extension" value="do,action" />
<package name="users" extends="json-default">
<action name="userlogin" class="com.eptal.action.UserAction">
<result type="json"></result>
</action>
</package>
</struts>