调用指定Action的步骤

调用指定Action的方法主要在配置文件中配置下:注:如应用于增删改查的类1.struts.xmlaction nameconvert

调用指定Action的方法
主要在配置文件中配置下:
注:如应用于增删改查的类
1.struts.xml

<action name="converterAction" method="test" ><result name="success">/output.jsp</result><result name="input">/error.jsp</result></action>

2.PointAction类:
public String test() throws Exception{System.out.println("test invoked");System.out.println("x="+point.getX());System.out.println("y="+point.getY());return SUCCESS;}public String execute() throws Exception{System.out.println("x="+point.getX());System.out.println("y="+point.getY());return SUCCESS;}