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

  • SEARCH
  • Home
  • 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 8804799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:41:57+00:00 2026-06-14T01:41:57+00:00

As I am new to Spring MVC framework and trying to learn, but an

  • 0

As I am new to Spring MVC framework and trying to learn, but an exception is thrown. What could be the cause?

It seems like I have an error in my dispatcher-servlet.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc     http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
  <annotation-driven />
  <context:component-scan base-package="kz.controller" />
  <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
    <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
    <property name="prefix" value="/WEB-INF/jsp/"/>
    <property name="suffix" value=".jsp"/>
  </bean>
</beans:beans>

My controller classes are annotation driven, but it is throwing this error:

HTTP Status 500 – Servlet.init() for servlet dispatcher threw exception

type Exception report

message Servlet.init() for servlet dispatcher threw exception

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet dispatcher threw exception
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 23 in XML document from ServletContext resource [/WEB-INF/dispatcher-servlet.xml] is invalid;

  • 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-14T01:41:58+00:00Added an answer on June 14, 2026 at 1:41 am

    Your XML is incorrect. You defined the bean namespace under the beans namespace. The correct XML is like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans:beans xmlns="http://www.springframework.org/schema/mvc"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
        xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="http://www.springframework.org/schema/mvc     http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
    
    
    
        <annotation-driven />
        <context:component-scan base-package="kz.controller" />
        <beans:bean id="viewResolver"
            class="org.springframework.web.servlet.view.UrlBasedViewResolver">
            <beans:property name="viewClass"
                value="org.springframework.web.servlet.view.JstlView" />
            <beans:property name="prefix" value="/WEB-INF/jsp/" />
            <beans:property name="suffix" value=".jsp" />
        </beans:bean>
    </beans:beans>
    

    Usually in spring applications the beans schema is the default so it would be even better if you would change the beans schema to be the default then you can delete all the “beans:” and add “mvc:” to the other tags.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying out the new Spring MVC 3.0 Type Conversion Framework. I
I'm new to ASP.NET, C# and the MVC framework but have managed to build
I am new to Spring MVC . I have a web application. I have
I am new to spring MVC. i have below project structure. Below are classes:
Im quite new to spring mvc. What I'm trying to achive is separating static
I am new to Spring MVC. But I had certain experience in working with
New to spring. I'm getting the following exception being caught: 2012-06-14 16:20:57,719 [http-8080-6] ERROR
I am new at Spring framework. I have Spring Tool Suite Version 3.1.0 installed
I'm trying out the new scaffolding features in MVC 3, using Entity Framework Code
I am attempting to write validators under the Spring MVC framework, but there is

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.