LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   No action instance for path XXX could be created STRUTS (https://www.linuxquestions.org/questions/programming-9/no-action-instance-for-path-xxx-could-be-created-struts-255832/)

poeta_boy 11-16-2004 11:10 PM

No action instance for path XXX could be created STRUTS
 
Hello:

I have a little web application under Tomcat + Struts + J2EE and I just can't seem to find out what's wrong:

I have this action mapping:

Code:

<action-mappings>
      <action path="/teacher/setSchedule"
type="crimson.ccss.teacher.action.SetScheduleAction" scope="request"
name="setScheduleForm" validate="false" input="/teacher/setSchedule.jsp">
        <forward name="Success" path="/ok.html" />
      </action>
 </action-mappings>
 <form-beans>
      <form-bean name="setScheduleForm"
type="crimson.ccss.teacher.form.SetScheduleForm" />
 </form-beans>

and my /teacher/setSchedule.jsp:

Code:

<html:form action="teacher/setSchedule">
 // STUFF IN A FORM
</html:form>

I know the bean ActionForm is correctly written because it does't complain about bean not found of bad setter and getter methods.

I click on submit (to send the form) and I get:


Code:

type Status report

message No action instance for path /teacher/setSchedule could be created


description The server encountered an internal error (No action instance for
path /teacher/setSchedule could be created) that prevented it from fulfilling
this request.

I've checked the action class, that is as follows:

Code:

package crimson.ccss.teacher.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;

import crimson.ccss.common.IConstants;

public class SetScheduleAction extends Action
{
        public ActionForward execute(          ActionMapping mapping,
                                                ActionForm form,
                                                HttpServletRequest request,
                                                HttpServletResponse response)
                                                                                                                                            throws Exception
    {
                return mapping.findForward(IConstants.SUCCESS_KEY );
        }// execute

}// set Schedule Action

It does extend from Action, it does have execute() and all.... also I believe the package it's in is correct.... but I have that tomcat error...

please any ideas? thanks a lot
:cry: :cry:

Poeta

poeta_boy 11-18-2004 03:41 PM

I've solved it.... after going blind I desperately erased all .class and recompiled it all over again.... working now

Thanks!

angelblond 06-23-2011 08:03 PM

Thanks!!
 
Man YOU'RE THE ONE!!! I spent HOURS trying to find the solve to that, and I realized I changed the name of the XXXAction.java and in the compiled .class the old name was already registered. After recompiling everything goes right. Thanks A LOT!!!


All times are GMT -5. The time now is 11:30 AM.