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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:33:32+00:00 2026-05-31T12:33:32+00:00

here is the description of problem. I am develepping a web application with GWT.

  • 0

here is the description of problem. I am develepping a web application with GWT. I have successfullly integrate spring security with gwt for the authentication feature with the following code. Now I want to use the spring “method security” in my web application. So I did what it says in http://static.springsource.org/spring-security/site/docs/3.1.x/reference/ns-config.html,

  • just adding <global-method-security secured-annotations="enabled"/> in the above mentionned application context file.

     <http>
      <http-basic/>
    
      <intercept-url pattern="/**" access=""/>
    
      <form-login />
      <logout />
     </http> 
    
      <authentication-manager>
        <authentication-provider>
          <user-service>
            <user name="jimis" password="jimispassword" authorities="ROLE_USER,ROLE_ADMIN" />
            <user name="bob" password="bobspassword" authorities="ROLE_ADMIN" />
          </user-service>
        </authentication-provider>
      </authentication-manager>
    
      **<global-method-security secured-annotations="enabled"/>** 
    
  • then adding the annotation @Secured(“ROLE_ADMIN”) above the function that I what to controle the access

Then I add the declaration of application context in the web.xml as following:

    <?xml version="1.0" encoding="UTF-8"?>
<web-app 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_2_5.xsd"
         version="2.5"
         xmlns="http://java.sun.com/xml/ns/javaee">

 <!-- Default page to serve -->

  <welcome-file-list>
    <welcome-file>App.html</welcome-file>
  </welcome-file-list>
  <session-config>
    <session-timeout>10</session-timeout> <!-- in minutes -->
  </session-config>
<context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>
      /WEB-INF/applicationContext-security.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>

  <listener>
      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
  <servlet>
    <servlet-name>appService</servlet-name>
    <servlet-class>com.google.gwt.app.example.server.AppServiceImpl</servlet-class>
  </servlet>
  <servlet-mapping>
     <servlet-name>appService</servlet-name>
     <url-pattern>/app/appService.rpc</url-pattern>
  </servlet-mapping>

</web-app>

Note that I’ve just declared the gwt-servlet not the spring dispatcher servlet.

However it seems that this configuration doesn’t work. In fact, whatever role can have the authority to access the function.
Very Strange.
Hope your answers!

  • 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-31T12:33:34+00:00Added an answer on May 31, 2026 at 12:33 pm

    Use a single global-method-security element containing both attributes.

    Also read the relevant section of the Spring Security FAQ on issues with using method security and web controllers, if that’s what you are doing (you will also find the same issue discussed here).

    The log message you report is not an error and is unimportant unless you are using hasPermission() within your expressions.

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

Sidebar

Related Questions

I am facing a problem on developing my web app, here is the description:
Here is the description of problem . I have parent div(allcomments_4) and than inside
Here is my problem description. I have 2 Objects A and B.A has a
Here is a description of my problem: I have got TabActivity consists of three
Problem description: In my application, I have to present the contents of data packets
Ok, so here's the full description of the problem I'm having: I am trying
Ok here is my problem : Before i start the description, let me to
I am working with sockets. Here are my codes (the description of problem is
I have a self-hosted WCF service and I'm having the following problem: 15 minutes
Here's a problem description. CONDITIONS: General idea is to read a lot of real

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.