Download Google Chrome Latest Version Offline

Posts about google chrome

17 January 2017

Parsing XML Document From Servletcontext Resource Solved

parsing xml document from servletcontext resource getting a few errors in the console which I will post below. I am using eclipse and cleaned the project, refreshed the target, cleaned the tomcat server so chasing or anything of that nature is not the issue.

Issue

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    id="WebApp_ID" version="3.0">
    <display-name>Spring_Project</display-name>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
        <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
    <servlet>
        <description>offers</description>
        <display-name>offers</display-name>
        <servlet-name>offers</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>offers</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>
    <description>Database</description>
    <resource-ref>
        <description>DB Connection</description>
        <res-ref-name>jdbc/Spring_Tutorial</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <context-param>
        <param-name>ContextConfigLocation</param-name>
        <param-value>
            classpath:com/learnspring/config/daoContext.xml
            classpath:com/learnspring/config/offersService.xml
        </param-value>
    </context-param>
</web-app>

Solution


if you want to just load the files using ContextLoaderListener, remove the dispatcher servlet and that should work fine or use the below method to load the final.

<servlet>
<servlet-name>offers</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value> classpath:com/learnspring/config/daoContext.xml
        classpath:com/learnspring/config/offersService.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>


0 comments:

For professional skip tracing services, visit Biitrace Biitrace services. Our experienced team specializes in skip tracing, providing accurate and ethical solutions to help you locate individuals efficiently and responsibly.
If you're a Pokémon enthusiast looking for a fun and interactive way to explore the world of Pokémon fusion, look no further than the fusion calculator. This Pokémon fusion infinite calculator allows you to combine your favorite Pokémon to discover unique and imaginative combinations. Explore the endless possibilities and let your creativity run wild with the Fusion Calculator today!
Click here to download latest chrome version 51MB
Powered by Blogger.