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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:32:38+00:00 2026-05-23T16:32:38+00:00

For web MVC I need at least two configs: dispatcher-servlet.xml and applicationContext.xml . I

  • 0

For web MVC I need at least two configs: dispatcher-servlet.xml and applicationContext.xml. I use the following filter for security:

<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>

This filter needs springSecurityFilterChain, defined in applicationContext.xml with <security:http />

However, I want to use @Secured annotation on a @Controller, defined in dispatcher-servlet.xml. Again, this needs <security:http /> – in another context file!

All I’m trying to achieve is security on @Controller level. I don’t care about securing deeper layers (@Service etc.) at all since this is the only entry point.

What is my way out of this mess? What am I doing wrong?

  • 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-23T16:32:39+00:00Added an answer on May 23, 2026 at 4:32 pm

    To enable security annotations for controllers you only need to add <security:global-method-security ... /> to dispatcher-servlet.xml. Other security-related stuff stays in applicationContext.xml.

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

Sidebar

Related Questions

I'm, using MVC to develop a Web application, and I need to use nested
I need to provide a window on an ASP.NET MVC web page where registered
I need to create a web application using ASP.NET MVC, jQuery and web standards
in my view Inherits=System.Web.Mvc.ViewUSerControl<Model.Person> How can I use an interface to restrict what the
I am using spring web mvc for my app's UI part.. By using following
I am developing an application in Spring Web MVC where i need to execute
I am going to use Spring Web MVC Framework on Netbeans. Writing Web user
This is my goal: I need to two (or more) Areas for my MVC
I want to use the Request , Response properties of System.Web.Mvc.Controller class to set
I need to take GET fields from my asp.net web app (first name and

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.