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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:36:48+00:00 2026-05-26T13:36:48+00:00

I want to provide security one way or another for Sending and Getting JSON

  • 0

I want to provide security one way or another for Sending and Getting JSON Data,but I don’t know how to do this.

Our System has roles of users (System admin, General Members, etc.)

We decided send data as JSON using the Spring MVC URL pattern. I don’t want everybody that outside from system to use this URL, only users can use the URL.

Example

www.example.com/services/"hereUserPass"/"hereUserName"/category/3

Each request time for different URLs, Should I control the username and password whether registered before? or What should I do for Security?

  • 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-26T13:36:48+00:00Added an answer on May 26, 2026 at 1:36 pm

    You want to implement security into your Spring Web application. You can do this at two ways:

    • Url Based Security
    • Method Based Security

    Try to make another xml file as like applicationContext-security.xml Here is an example:

    <http use-expressions="true">
        <intercept-url pattern="/" access="permitAll"/>
        <intercept-url pattern="/static/**" filters="none" />
        <intercept-url pattern="/**" access="isAuthenticated()" />
        <form-login />
        <logout />
    </http>
    

    Here we see that permitAll means permit everybody who wants to reach that URL. filters = none has the same effect but it means that user will not go over Spring Security(Previous one goes over Spring Security but has access, filtering doesn’t applied). isAuthenticated means that user can reach there if authenticated. You can also apply role based acces to urls.

    Other security implementation base on middle tier security. You should add this line at your application context security file:

    <global-method-security pre-post-annotations="enabled" />
    

    so you can use method based security as like:

    @PreAuthorize("hasRole('ROLE_SUPERVISOR')")
    void storeVisit(Visit visit) throws DataAccessException;
    

    You can start to reading with Spring Security implementation of Spring’s Pet Clinic example: http://static.springsource.org/spring-security/site/petclinic-tutorial.html

    Also I recommend you read here: http://www.mularien.com/blog/2008/07/07/5-minute-guide-to-spring-security/

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

Sidebar

Related Questions

I am developing one PHP web application, I want to provide more security to
I have a form that I want to provide some security on, but up
I want to provide the ability to save some rendered data/charts (with the titles
I want to provide a custom Batcher for Hibernate to use (for this reason:
My question is similar to this one , but I can simplify it some.
I want sell some .NET library and I want provide edition with full source
I want to provide silverlight app to my customer while hosting the app at
I want to provide a piece of Javascript code that will work on any
I want to provide dynamic download of files. These files can be generated on-the-fly
I want to provide my user with some meaningful error messages when network requests

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.