《structs in action》 里面的一个bean,我编译的时候提示找不到UserDirectory类
《structs in action》 里面的一个bean,我编译的时候提示找不到UserDirectory类
package app;
import org.apache.struts.action.*;
import java.io.*;
import javax.servlet.http.*;
public class RegisterAction extends Action
{
public ActionForward perform(ActionMapping mappin
ActionForm form,
HttpServletRequest req,
HttpServletResponse res)
{
RegisterForm rf=(RegisterForm) form;
String username=rf.getUsername();
String password1=rf.getPassword1();
String password2=rf.getPassword2();
if(password1.equals(password2))
{
try
{
UserDirectory.getInstance().setUser(username,password1);
return mapping.findForward("success");
}
catch(UserDirectoryException e)
{
return mapping.findForward("failure");
}
}
mapping.findForward("failure");
}
}
就是书中开头的RegisterAction.java这个例子.我编译的时候怎么提示cannot find symbol
我的环境是jdk5.0+tomcat5.0.28
classpath=.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;%TOMCAT_HOME%\common\lib\servlet-api.jar
Eclipse IDE