Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8896153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:58:02+00:00 2026-06-14T23:58:02+00:00

I am new to Spring MVC, trying to implement Spring Security features. When I

  • 0

I am new to Spring MVC, trying to implement Spring Security features. When I modify the web.xml file I get this kind of error in Catalina log:

27.11.2012 9:49:21 org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart

The web.xml file is:

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/spring/root-context.xml /WEB-INF/spring/appServlet/security-context.xml
        </param-value>
    </context-param>
    <filter>
        <filter-name>springSecurityFilterChain</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>springSecurityFilterChain</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <!-- Creates the Spring Container shared by all Servlets and Filters -->
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

    </listener>

    <!-- Processes application requests -->
    <servlet>
        <servlet-name>app</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/spring/appServlet/app-servlet.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>app</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>


    <servlet-mapping>
        <servlet-name>default</servlet-name>
        <url-pattern>*.gif</url-pattern>
        <url-pattern>*.png</url-pattern>
        <url-pattern>*.js</url-pattern>
        <url-pattern>*.css</url-pattern>
    </servlet-mapping>

    <!--CharsetFilter start-->
    <filter>
        <filter-name>CharsetFilter</filter-name>
        <filter-class>kz.bimash.FoodSec.filters.CharsetFilter</filter-class>
        <init-param>
            <param-name>requestEncoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
    </filter>

    <filter-mapping>
        <filter-name>CharsetFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <welcome-file-list>
        <welcome-file>redirect.jsp</welcome-file>
    </welcome-file-list>
</web-app>

This code gives me an error, but when I tried to remove the Spring Security configuration part, it started to work fine. Could you correct my errors in web.xml?

Here is the Apache log file:

27.11.2012 10:57:37 org.apache.catalina.util.LifecycleBase stop
INFO: The stop() method was called on component    [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/foodsec]] after stop() had already been called. The second call will be ignored.
27.11.2012 10:57:38 org.apache.catalina.startup.HostConfig deleteRedeployResources
INFO: Undeploying context [/foodsec]
27.11.2012 10:57:38 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor C:\Program Files\Apache Software  Foundation\tomcat7\conf\Catalina\localhost\foodsec.xml
27.11.2012 10:57:45 org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
27.11.2012 10:57:45 org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/foodsec] startup failed due to previous errors
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:58:04+00:00Added an answer on June 14, 2026 at 11:58 pm

    Could be a problem with your multiple configs:

        <param-value>/WEB-INF/spring/root-context.xml /WEB-INF/spring/appServlet/security-context.xml
    

    Try using a comma instead:

        <param-value>/WEB-INF/spring/root-context.xml,/WEB-INF/spring/appServlet/security-context.xml
    

    Best practice is to use wildcards, like this:

        <param-value>classpath*:META-INF/spring/applicationContext*.xml</param-value>
    

    And then have your context files named as:

    src/main/resources/META-INF/spring/applicationContext.xml
    src/main/resources/META-INF/spring/applicationContext-security.xml
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Spring and Spring MVC. I'm trying to implement a basic web-application
I am brand new to Spring web MVC. I am trying to create a
Im quite new to spring mvc. What I'm trying to achive is separating static
I am new to Spring MVC . I have a web application. I have
I'm really new to Spring and Spring MVC and I'm working on a kind
I'm trying to implement RedirectAttributes feature in Spring MVC 3.1-Release I'm sending simple form
Trying to implement clean URLs (without .form, .do, etc.) with Spring MVC 3.0 (actually
I´m new in spring-mvc. So, i´m trying to use RESTFull urls ( i think
I am new to spring. I am trying to use spring mvc to build
I am using spring 3.1.2 MVC. I am trying to configure web application by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.