Step-by-step:
- We copy all Spring framework JAR files and commons-logging JAR file to WebContent/WEB-INF/lib/ directory.
- We copy applicationContext.xml to WebContent/WEB-INF/directory.
- Provide web.xml in WebContent/WEB-INF/directory.
<?xml version="1.0" encoding="UTF-8"?> <web-app 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" version="2.4"> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>EchoService</servlet-name> <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>EchoService</servlet-name> <url-pattern>/EchoService</url-pattern> </servlet-mapping> </web-app>
- Export a WAR file. (May see this post.)
沒有留言:
張貼留言