杰哥无敌
2016-02-25 20:41
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd"> <struts> <package name="default" namespace="/" extends="struts-default"> <action name="*_*" method="{2}" class="com.study.struts.action.{1}Action"> <result>/result.jsp</result> <result name="add">{2}.jsp</result> <result name="update">/update.jsp</result> </action> </package> </struts> package com.study.struts.action; import com.opensymphony.xwork2.ActionSupport; public class FirstAction extends ActionSupport { public String add(){ System.out.println("add action......."); return SUCCESS; } public String update(){ System.out.println("update action......."); return SUCCESS; } @Override public String execute() throws Exception { System.out.println("First action ---------------------"); return SUCCESS; } }
错了。上面的是我的http://localhost:8080/你的项目名/First_update.action
把输入地址http://localhost:8080/MYeclipse/First_update.action
http://localhost:8080/MYeclipse/First_add.action这样写
Struts2入门
95061 学习 · 456 问题
相似问题