下面我给出我的代码,它显示了一些错误,它说不org.apache.struts.action
存在我能做什么,请告诉我解决方案....
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForward;
public class LoginAction extends org.apache.struts.action.Action {
/* forward name="success" path="" */
private final static String SUCCESS = "success";
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
LoginBean loginbean=(LoginBean)form;
String uname=loginbean.getLogin();
String pass=loginbean.getPass();
HttpSession session=request.getSession();
ArrayList al=new ArrayList();
al.add(uname);//User Name
al.add("1");//User Id
al.add("A");//User Level Means Admin Or Simple User
if(uname.equalsIgnoreCase("Admin")&& pass.equals("admin"))
{
session.setAttribute("admin",al.get(0));
response.sendRedirect("main.jsp");
}
else
{
session.removeAttribute("admin");
response.sendRedirect("index.jsp?error=notvalid");
}
return mapping.findForward(SUCCESS);
}
}
下面我给出我的代码它显示了一些错误它说 org.apache.struts.action 不存在我能做什么请告诉我解决方案....