package fe.struts.action;import org.apache.struts.action.*;
import javax.servlet.http.*;
import fe.struts.form.LoginForm;public class LoginAction extends Action
{
public ActionForward perform(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
{
System.err.println( "Now entering perform() in loginAction...");
String name;
String password;
ActionForward forward = null;
LoginForm form = (LoginForm)actionForm;
name = form.getName();
password = form.getPassword();
forward = actionMapping.findForward("success");
}
}
import javax.servlet.http.*;
import fe.struts.form.LoginForm;public class LoginAction extends Action
{
public ActionForward perform(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
{
System.err.println( "Now entering perform() in loginAction...");
String name;
String password;
ActionForward forward = null;
LoginForm form = (LoginForm)actionForm;
name = form.getName();
password = form.getPassword();
forward = actionMapping.findForward("success");
}
}
看到了吗? feActionServlet.java第20行,NullPointException