hi.
i have a web-app project!
spring 2.5.3
(spring-web, spring-jdbc, spring-tx, spring-mock, spring-orm, spring-beans, spring-core, spring-context), struts2 2.1.6, jboss-5.0.1.
applicationContext.xml
Code:
lt;?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?gt;
lt;beans xmlns=quot;schema/beansquot; default-autowire=quot;autodetectquot;
xmlns:xsi=quot;2001/XMLSchema-instancequot; xmlns:aop=quot;schema/aopquot;
xmlns:tx=quot;schema/txquot;
xsi:schemaLocation=quot; schema/beans schema/beans/spring-beans-2.0.xsd schema/tx schema/tx/spring-tx-2.0.xsd schema/aop schema/aop/spring-aop-2.0.xsdquot;gt;
lt;bean id=quot;webStoreLoginquot;
class=quot;org..ejb.access.LocalStatelessSessionProxyFactoryBeanquot;gt;
lt;property name=quot;jndiNamequot; value=quot;GamigoWebStore/WebStoreLogin/localquot; /gt;
lt;property name=quot;businessInterfacequot; value=quot;de.gamigo.services.domain.IWebStoreLoginquot; /gt;
lt;/beangt;
lt;bean id=quot;loginActionquot;
class=quot;de.gamigo.webStore.store.presentation.struts.LoginActionquot; scope=quot;prototypequot;gt;
lt;!--lt;property name=quot;webStoreLoginquot; ref=quot;webStoreLoginquot; /gt;--gt;
lt;constructor-arg ref=quot;webStoreLoginquot;/gt;
lt;/beangt;
lt;/beansgt;
struts.xml
Code:
lt;strutsgt;
lt;constant name=quot;struts.objectFactoryquot; value=quot;springquot; /gt;
lt;!--lt;constant name=quot;struts.objectFactoryquot; value=quot;org.apache.struts2.spring.StrutsSpringObjectFactoryquot; /gt;--gt;
lt;constant name=quot;struts.objectFactory.spring.autoWirequot; value=quot;namequot; /gt;
lt;constant name=quot;struts.devModequot; value=quot;falsequot; /gt;
lt;constant name=quot;struts.configuration.xml.reloadquot; value=quot;falsequot; /gt;
lt;constant name=quot;struts.custom.i18n.resourcesquot; value=quot;ApplicationResourcesquot; /gt; lt;constant name=quot;struts.i18n.encodingquot; value=quot;UTF-8quot;/gt; lt;constant name=quot;struts.i18n.reloadquot; value=quot;falsequot;/gt;lt;!-- Configuration for the default package. --gt;
lt;package name=quot;quot; extends=quot;struts-defaultquot;gt;
lt;!-- Default interceptor stack. --gt;
lt;default-interceptor-ref name=quot;paramsPrepareParamsStackquot; /gt;
lt;global-resultsgt;
lt;result name=quot;errorquot;gt;/WEB_INF/jsp/error.jsplt;/resultgt;
lt;/global-resultsgt;
lt;!-- m.kemal struts config begin --gt;
lt;action name=quot;indexquot; class=quot;loginActionquot;gt;
lt;resultgt;/WEB-INF/jsp/login.jsplt;/resultgt;
lt;result name=quot;successquot;gt;/WEB-INF/jsp/home.jsplt;/resultgt;lt;result name=quot;errorquot;gt;/WEB-INF/jsp/login.jsp lt;/resultgt;lt;result name=quot;AGBquot;gt;/WEB-INF/jsp/acceptAGB.jsp lt;/resultgt;
lt;/actiongt;
web.xml
Code:
lt;?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?gt;
lt;web-app xmlns:xsi=quot;2001/XMLSchema-instancequot;
xmlns=quot;xml/ns/javaeequot; xmlns:web=quot;xml/ns/javaee/web-app_2_5.xsdquot;
xsi:schemaLocation=quot;xml/ns/javaee xml/ns/javaee/web-app_2_5.xsdquot;
id=quot;WebApp_IDquot; version=quot;2.5quot;gt;
lt;display-namegt;GamigoWebStorelt;/display-namegt;
lt;context-paramgt;
lt;param-namegt;contextConfigLocationlt;/param-namegt;
lt;param-valuegt;classpath*:applicationContext*.xml lt;/param-valuegt;
lt;/context-paramgt;
lt;listenergt;
lt;listener-classgt;org..web.context.request.RequestContextListenerlt;/listener-classgt;
lt;/listenergt;
lt;listenergt;
lt;listener-classgt;org..web.context.ContextLoaderListenerlt;/listener-classgt;
lt;/listenergt;
lt;filtergt;
lt;filter-namegt;strutslt;/filter-namegt;
lt;filter-classgt;org.apache.struts2.dispatcher.FilterDispatcherlt;/filter-classgt;
lt;/filtergt;
lt;filter-mappinggt;
lt;filter-namegt;strutslt;/filter-namegt;
lt;ucl-patterngt;/*lt;/ucl-patterngt;
lt;/filter-mappinggt;
LoginAction.java
Code:
public class LoginAction extends ActionSupport {
.
.
.
public String execute() {
my problem:
Code:
Unable to instantiate Action, loginAction, defined for 'index' in namespace '/'loginAction from BaseClassLoader@147f75{VFSClassLoaderPolicy@1bc12c9{name=vfszip:/usr/local/jboss-5.0.1/server/default/deploy/GamigoWebStore.ear/GamigoWebStore.war/ domain=ClassLoaderDomain@4148d4{name=vfszip:/usr/local/jboss-5.0.1/server/default/deploy/GamigoWebStore.ear/GamigoWebStore.war/ parentPolicy=AFTER_BUT_JAVA_BEFORE
please help me
hi, I have a very similar problem. Did you manage to solve this?
You return quot;loginActionquot; as a result, but you do not have it defined. It should probably be defined as a global result. |