Utilities Blog by JuCa Cruz
If it happened to me before, maybe what I've posted here will help you.
Sunday, June 27, 2010
WebServices with CXF - Configuration files - web.xml
<web-app 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>Archetype Created Web Application</display-name> <context-param> <param-name>webAppRootKey</param-name> <param-value>my-web-app</param-value> </context-param> <!--Log4J Configuration --> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/conf/log4j/log4j-config.xml</param-value> </context-param> <!--Spring Context Configuration --> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/conf/spring/daoApplicationContext.xml, /WEB-INF/conf/spring/serviceApplicationContext.xml, /WEB-INF/conf/cxf/cxf-services.xml </param-value> </context-param> <!--Log4J Listener --> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <!--Spring Context Listener --> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!--Another Context Listener --> <listener> <listener-class>mx.com.mylibrary.web.listener.ContextListener</listener-class> </listener> <!--Servlet Declarations --> <servlet> <servlet-name>webApplicationServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/conf/spring/webApplicationContext.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet> <display-name>CXF Servlet</display-name> <servlet-name>CXFServlet</servlet-name> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>CXFServlet</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping> <!--Servlet Mappings --> <servlet-mapping> <servlet-name>webApplicationServlet</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <!--Session Time-out in minutes --> <session-config> <session-timeout>30</session-timeout> </session-config> <!--Welcome file --> <welcome-file-list> <welcome-file>/index.jsp</welcome-file> </welcome-file-list> <!--Reference to a DB Conection --> <resource-ref> <description>DB Connection</description> <res-ref-name>jdbc/bookStoreDS</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref> </web-app>
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment