PDA

View Full Version : No action instance for path <your path name> could be created



mahdieh_khatibi
دوشنبه 19 فروردین 1387, 22:38 عصر
سلام
من یه پروژه کوچیک نوشتم که یه Action دارو و یک صفحه JSP
فایل Struts ام این شکلیه
<struts-config>
<action-mappings>
<action path="/first" type="j2eebook.struts.FirstAction" >
<forward name="success" path="/FirstView.jsp"/>
</action>
</action-mappings>
</struts-config>

و action هم به اینصورت
package j2eebook.struts;
import org.apache.struts.action.*;
import javax.servlet.http.*;
public class FirstAction {
public ActionForward execute(ActionMapping mapping,ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
{ return mapping.findForward("success");}
}
و فایل JSP

<HTML>
<HEAD>
<TITLE>First JSP View</Title>
</HEAD>
<BODY>
<h1>Welcome To First Struts View</h1>
</BODY>
</HTML>

وقتی http://localhost:8080/First/first.do رو میزنم،پیغام
HTTP Status 500 - No action instance for path /first could be created
رو میده