File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Strut 2 and Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Strut 2 and Spring" Watch "Strut 2 and Spring" New topic
Author

Strut 2 and Spring

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300

Hi List[],
I have integrated the strut2 and spring but my problem is the property value inside the action coming null.
i.e when i print system.out.println(message) inside execute method its values is coming null.

Please tell me where i am wrong.
Below is my code:


and
applicationcontext.xml


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">



<bean id="helloClass" class="com.Action.HelloWorld">
<property name="message" value="pankaj" />
</bean>
</beans>



David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What libraries are you deploying? How are you initializing Spring (i.e., via web.xml, or...)? What does the startup log look like?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Strut 2 and Spring
 
Similar Threads
Spring JDBC Transaction
spring form submission
Spring MVC question
Spring Struts implementation for Database conncetion problem in Login module
DI is not working in my example.