You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by chen thomas <xp...@gmail.com> on 2009/05/13 18:21:01 UTC
how to integrate struts2 + convention plugin +spring
Hi
I'm a Struts 2 newbie .I want to integrate struts2 ,convention plugin and
spring.
how to do? anyone give me some advice?
thanks a lot
thomas
Re: adding spring to struts2
Posted by phillips1021 <bp...@ku.edu>.
I've done some blog articles on integrating Spring and Struts 2, which
include some example applications you may want to study if you're not
familiar with how to use these two technologies together.
See:
http://www.brucephillips.name/blog/index.cfm/2009/3/7/Using-Spring-In-A-Struts-2-Web-Application
and
http://www.brucephillips.name/blog/index.cfm/2008/10/17/Using-Struts-2-and-Spring-Frameworks-Together
--
View this message in context: http://www.nabble.com/how-to-integrate-struts2-%2B-convention-plugin-%2Bspring-tp23525241p23567130.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: adding spring to struts2
Posted by Dave Newton <ne...@yahoo.com>.
Don't send it to *me*, send it to the list.
Dave
Dave Newton wrote:
> You'll want to send plain-text emails or otherwise escape your XML,
> otherwise all we see is this:
>
> k_ocel wrote:
>> applicationContext.xml
>> Code:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
> Which makes figuring out any problems really hard ;)
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: adding spring to struts2
Posted by Dave Newton <ne...@yahoo.com>.
You'll want to send plain-text emails or otherwise escape your XML,
otherwise all we see is this:
k_ocel wrote:
> applicationContext.xml
> Code:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
Which makes figuring out any problems really hard ;)
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
adding spring to struts2
Posted by k_ocel <k_...@yahoo.com>.
hi.
i have annother problem!
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:
<?xml version="1.0" encoding="UTF-8"?>
struts.xml
Code:
/WEB_INF/jsp/error.jsp
/WEB-INF/jsp/login.jsp
/WEB-INF/jsp/home.jsp
/WEB-INF/jsp/login.jsp
/WEB-INF/jsp/acceptAGB.jsp
web.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
GamigoWebStore
contextConfigLocation
classpath*:applicationContext*.xml
org.springframework.web.context.request.RequestContextListener
org.springframework.web.context.ContextLoaderListener
struts
org.apache.struts2.dispatcher.FilterDispatcher
struts
/*
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
--
View this message in context: http://www.nabble.com/how-to-integrate-struts2-%2B-convention-plugin-%2Bspring-tp23525241p23558491.html
Sent from the Struts - User mailing list archive at Nabble.com.
Re: how to integrate struts2 + convention plugin +spring
Posted by thomas <xp...@gmail.com>.
I have found a way to determine how to config application-web.xml:
Please set break point on the following code of the SpringObjectFactory.java
,which is contained in the xwork-2.1.2.jar,
public Object buildBean(String beanName, Map<String, Object> extraContext,
boolean injectInternal) throws Exception {
Object o = null;
try {
o = appContext.getBean(beanName);
} catch (NoSuchBeanDefinitionException e) {
Class beanClazz = getClassInstance(beanName);
o = buildBean(beanClazz, extraContext);
}
if (injectInternal) {
injectInternalBeans(o);
}
return o;
}
from the parameter *beanName*, you can know how to config
applicationContext-web.xml.
2009/5/14 Frans Thamura <fr...@meruvian.org>
> i am still learning the REST implementation :0
>
> still un familiar
>
> the class is less than the old one, but work :0
>
> F
>
> On Wed, May 13, 2009 at 11:21 PM, chen thomas <xp...@gmail.com>
> wrote:
> > Hi
> >
> > I'm a Struts 2 newbie .I want to integrate struts2 ,convention plugin and
> > spring.
> > how to do? anyone give me some advice?
> >
> > thanks a lot
> >
> > thomas
> >
>
>
>
> --
> --
> Frans Thamura
> Meruvian. Java and Enterprise OSS
>
> Mobile: +62 855 7888 699
> Blog & Profile: http://frans.thamura.info
>
> We provide services to migrate your apps to Java (web), in amazing
> fast and reliable.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: how to integrate struts2 + convention plugin +spring
Posted by Frans Thamura <fr...@meruvian.org>.
i am still learning the REST implementation :0
still un familiar
the class is less than the old one, but work :0
F
On Wed, May 13, 2009 at 11:21 PM, chen thomas <xp...@gmail.com> wrote:
> Hi
>
> I'm a Struts 2 newbie .I want to integrate struts2 ,convention plugin and
> spring.
> how to do? anyone give me some advice?
>
> thanks a lot
>
> thomas
>
--
--
Frans Thamura
Meruvian. Java and Enterprise OSS
Mobile: +62 855 7888 699
Blog & Profile: http://frans.thamura.info
We provide services to migrate your apps to Java (web), in amazing
fast and reliable.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: how to integrate struts2 + convention plugin +spring
Posted by Dave Newton <ne...@yahoo.com>.
chen thomas wrote:
> I'm a Struts 2 newbie .I want to integrate struts2 ,convention plugin and
> spring. how to do? anyone give me some advice?
I'd probably start by reading the Convention and Spring plugin
docs--after that if you have any specific questions this is the place to
ask them.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org