And sheetal in the case of transactions we used a facade. I think may be this will be a good solution for this.
And sheetal in the case of transactions we used a facade. I think may be this will be a good solution for this.
hello Lijin,
actually i'm still learning these. so there's very littile that i could help.
steps u have to follow are :
1. write the web.xml file like this:
2. write applicationContext.xml. it should empty for now. place it in the same folder as ur web.xml<?xml version="1.0" encoding="UTF-8"?>
<web-app id="person" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>person</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>/login.jsp</welcome-file>
</welcome-file-list>
<!-- this step is to add spring with struts2 -->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListe ner
</listener-class>
</listener>
</web-app>
if u've used struts2 others things are same as before. jars u r gonna need are :<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<!--
- Application context definition
-->
<beans>
</beans>
1.spring.jar
2.struts2-spring-plugin.jar
Thank you very much Sheetal for your help. Thanks for giving the config help.
In our project we are working on Spring currently. We want to integrate Struts2 to spring. But when i tried to configure struts 2.. its not working for me. I think struts can directly access / read application context beans. But my struts2 configuration is not working..
Will post more outcomes in the future here.
Thanks for your support friend..
Lijin
can u post the errors u r getting? is that the dreadful error filterStart?
Hi Sheetal,
Actually I had configured struts with Zero configuration like specifing the struts action namespace in the web.xml. At that time it worked.
But when i declare the actions in struts.xml it is not redirecting to the corresponding jsp page. No error is coming but just dont getting that action in browser
Thanking you
Lijin
Hi sheetal,
Its worked now. Just i missed to include WEB_INF directory path to the resulting jsp. Thxs for all your help frnd. Your tips helped me a lot. Thxs
Lijin