Spring Framework using RAD7

| No TrackBacks

Reference from: Developing a Spring Framework MVC application step-by-step


If you want to use Spring in Rational Application Developer v.7, follow below steps.
1.Create A EAR project to contain Spring web project.
2.Create A Dynamic Web Project, add to an EAR. In Project Facets, adds support for Struts to your project.
3.Copy spring.jar (from spring-framework-2.5/dist), spring-webmvc.jar (from spring-framework-2.5/dist/modules) and commons-logging.jar (from spring-framework-2.5/lib/jakarta-commons) to the '/WEB-INF/lib'.
4.In project properties -> Java Build Path -> Libraries, Add Step 3 those jar files using Add External JARs.
5.Open Web Deployment Descriptor, add a servlet, check Use existing Servlet class, Browse. Type DispatcherServlet, select that in springframework package. Name: springapp, modify URL Mapping from /DispatcherServlet to *.htm, Finish.
6.Create /WEB-INF/springapp-servlet.xml, like below.

<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.5.xsd">
<!-- the application context definition for the springapp DispatcherServlet -->
<bean name="/hello.htm" class="springapp.web.HelloController">
</bean></beans>
7.Create the Controller, HelloController.
8.Write a test for the Controller, HelloControllerTests. To test the Controller, HelloController.
9.Create the View, hello.jsp.
10.Click Add and Remove Projects, add EAR to WAS server.
11.Open Browser, http://localhost:9080/Spring/hello.htm. You will see the hello.jsp content.

No TrackBacks

TrackBack URL: http://server.everfine.com.tw/blog/mt-tb.cgi/224

February 2012

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

Archives

Powered by Movable Type 4.34-en

About this Entry

This page contains a single entry by philipz published on November 16, 2008 12:03 AM.

線上英漢字典 Bookmarklet was the previous entry in this blog.

How to backup virtural machine on VMware server 2 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.