Hello struts-user,
I fill form with values and try to submit it to the ActionServlet.
But I have Error 500 in browser and anything else. And in tomcat
console I can view next message -
2000-11-14 03:14:02 - Ctx( /rusbiz ): 500 R( /rusbiz + /news.do +
null) No action instance for path /news could be created
Java code of Action -
package bcom.actions;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.JspException;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionForm;
class NewsAction extends Action {
public ActionForward perform(ActionMapping mapping,
ActionForm actionForm,
HttpServletRequest request,
HttpServletResponse response
) throws IOException, ServletException {
return (mapping.findForward("success"));
}
}
Form has some String fields and struts-config is -
<struts-config>
<!-- ========== Form Bean Definitions =================================== -->
<form-beans>
<form-bean name="logonForm"
type="bcom.actions.LogonForm"/>
<form-bean name="logonForm"
type="bcom.actions.LogonForm"/>
<form-bean name="changeLanguageForm"
type="bcom.actions.ChangeLanguageForm"/>
</form-beans>
<!-- ========== Global Forward Definitions ============================== -->
<global-forwards>
<forward name="logon" path="/logon.jsp"/>
<forward name="index" path="/index.jsp"/>
</global-forwards>
<!-- ========== Action Mapping Definitions ============================== -->
<action-mappings>
<action path="/changeLanguage"
type="bcom.actions.ChangeLanguageAction"
name="changeLanguage"
scope="request">
</action>
<action path="/logon"
type="bcom.actions.LogonAction"
name="logonForm"
scope="request">
<forward name="failure" path="/error.jsp"/>
<forward name="success" path="/index.jsp"/>
</action>
<!-- Process a user logoff -->
<action path="/logoff"
type="bcom.actions.LogoffAction">
<forward name="success" path="/index.jsp"/>
</action>
<action path="/news"
type="bcom.actions.NewsAction"
name="newsForm"
scope="request"
input="/newsedit.jsp">
<forward name="success" path="/newsindex.jsp"/>
</action>
<!-- The standard administrative actions available with Struts -->
<!-- These would be either omitted or protected by security -->
<!-- in a real application deployment -->
<action path="/admin/addFormBean"
type="org.apache.struts.actions.AddFormBeanAction"/>
<action path="/admin/addForward"
type="org.apache.struts.actions.AddForwardAction"/>
<action path="/admin/addMapping"
type="org.apache.struts.actions.AddMappingAction"/>
<action path="/admin/reload"
type="org.apache.struts.actions.ReloadAction"/>
<action path="/admin/removeFormBean"
type="org.apache.struts.actions.RemoveFormBeanAction"/>
<action path="/admin/removeForward"
type="org.apache.struts.actions.RemoveForwardAction"/>
<action path="/admin/removeMapping"
type="org.apache.struts.actions.RemoveMappingAction"/>
</action-mappings>
</struts-config>
--
Best regards,
Oleg mailto:[EMAIL PROTECTED]