Resources cannot be null

一.resources cannot be null 主要原因应该是没有定义actionform。
struts1.2.4中要把 Action中的perform()方法改成execute()方法
如:public ActionForward execute(ActionMapping mapping,
ActionForm form, HttpServletRequest req,
HttpServletResponse res)throws Exception

package book;
import javax.servlet.http.*;
import org.apache.struts.action.*;
public final class BookAction extends Action
{
public ActionForward execute(ActionMapping mapping,
ActionForm form, HttpServletRequest req,
HttpServletResponse res)throws Exception
{
System.out.println("Start perform("+form+")......");
String title=req.getParameter("title");
Book book=new Book();
book.setTitle(title);
System.out.println("After creation of book:"+book.getTitle());
req.setAttribute("BOOK",book);
return mapping.findForward("bookCreated");
}
}

二.Struts配置文件是缺少plug-in配置

如validator的配置

三.资源文件找不到

你可能感兴趣的:(apache,struts,servlet)