tsh偏高 t3 t4正常:org.apache.struts.action does not exit,是为什么呀,应该处理

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/29 19:59:47
package app;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import java.io.*;
public class RegisterAction extends Action {
public ActionForward perform (ActionMapping mapping,
ActionForm form,
HttpServletRequest req,
HttpServletResponse res) {
// ①Cast the form to the RegisterForm
RegisterForm rf = (RegisterForm) form;
String username = rf.getUsername();
String password1 = rf.getPassword1();
String password2 = rf.getPassword2();
// ②Apply business logic
if (password1.equals(password2)) {
try {
// ③Return ActionForward for success
UserDirectory.getInstance().setUser(username,password1);
return mapping.findForward("success");
} catch (UserDirectoryException e) {
return mapping.findForward("failure");
}
}
// ④Return ActionForward for failure
return mapping.findForward("failure");
}
}

struts lib下的全部文件复制到web-inf/lib下了啊
copy的代码,eclipse根本没有用到

你用什么编写的?你确定在struts-cfg.xml中有那个.do标签属性么

你的Action类没有问题呀,应该是JSP或XML的配置有问题吧