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 6605945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:20:36+00:00 2026-05-25T19:20:36+00:00

Currently Running Tomcat: v6 Spring Tools Suite: v2.7.2 Spring Framework: spring-webmvc-3.0.5 Servlet XML <?xml

  • 0

Currently Running

Tomcat: v6

Spring Tools Suite: v2.7.2

Spring Framework: spring-webmvc-3.0.5

Servlet XML

 <?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:mvc="http://www.springframework.org/schema/mvc"
        xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="
          http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
          http://www.springframework.org/schema/mvc/spring-mvc
          http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
          http://www.springframework.org/schema/context
          http://www.springframework.org/schema/context/spring-context-3.0.xsd">

      <mvc:annotation-driven />

      <mvc:resources mapping="/resources/**" location="/resources" />

      <context:component-scan base-package="com.app.mvc" />

 </beans>

web.xml partial code

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

Servlet Purpose

web.xml maps all urls to the servlet with the exception of mvc:resources mapping static files.

Bugs

  • cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element ‘mvc:annotation-driven’. app-servlet.xml /app/www/WEB-INF

  • cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element ‘mvc:resources’. app-servlet.xml /app/www/WEB-INF

Known Issues

  • http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd doesn’t contain the element resource

  • If replaced by http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd still doesn’t work and may not be working according to jar files of spring 3.05

  • mvc:resources appeared in spring v3.0.4, but has no new xsd

Question

How can I fix the compile errors to get mvc:resources working correctly?

I’ve been digging around 2 hours for this, no solid answer yet…

  • 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-05-25T19:20:38+00:00Added an answer on May 25, 2026 at 7:20 pm

    In your spring context xml mvc namespace url should match url in schemaLocation. Something like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:mvc="http://www.springframework.org/schema/mvc"
           xsi:schemaLocation="
             http://www.springframework.org/schema/mvc
             http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
    

    This is a standard XML namespace declaration. The namespace url is sort of an unique id, which is then mapped to the actual schema location in xsi:schemaLocation.

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

Sidebar

Related Questions

I currently have a tomcat servlet 1 running under the ROOT: api1.myhost.com:8080/ I'm using
I currently have a tomcat container -- servlet running on it listening for requests.
Currently to access my dynamic web project (running in a tomcat servlet container) I
I have a J2EE-based system which is running currently on Apache Tomcat. We are
I have two web applications running in same Servlet container ( Tomcat ), A
I have a servlet based webapp running on Tomcat 6 server. The URL scheme
I have a web application that's currently running under Tomcat 5.5.25. I'm attempting to
I'm currently trying to get a Tomcat server I have running in Eclipse on
I currently have one .war running on tomcat, I wonder if I put another
Currently I have 2 web applications app1 and app2 running on Tomcat 6: app1

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.