2
Когда я пытаюсь добавить разные методы, которые определены в классе CustomerAction
, система вводит метод, но после выполнения метода Struts не смог определить имя класса:Struts 2 Spring 3 интеграция, класс действия не найден
Invalid action class configuration that references an unknown class named [customerActionBean]
struts.xml
: класс
<constant name="struts.devMode" value="false" />
<package name="myPack" extends="struts-default">
<action name="customerAction" class="customerActionBean">
<result name="successView">/success.jsp</result>
</action>
<action name="welcome" class="customerActionBean" method="welcome">
<result name="successView">/index2.jsp</result>
</action>
</package>
действие:
public String execute() throws Exception {
customerService.addCustomer(customer);
savedCustomerList=customerService.getCustomers();
return "successView";
}
public String welcome(){
System.out.println("girdiiiiiii");
savedCustomerList=customerService.getCustomers();
return "succesView";
}
контекст приложения:
<bean id="customerActionBean" class="com.thecafetechno.CustomerAction" >
<property name="customerService" ref="CustomerService" />
</bean>
Вы используете DMI? –