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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:30:36+00:00 2026-05-31T22:30:36+00:00

I am using my own MVC implementation and I am not sure, whether the

  • 0
  1. I am using my own MVC implementation and I am not sure, whether the Spring Security isn’t designed specifically for the Spring MVC implementation. Is it still okay to use it?

  2. It is not clear to me, which parts of Spring Security I should use and which I don’t need to. I suppose I don’t need the URL filters as I need to validate the access specifically on the URL parameters in my controllers (for instance to check whether User is the owner of the Article). Something like:

    if (request.getUser().isAllowedTo("EditArticle", 27)) {...}
    if (request.getUser().isAllowedTo("CategoryManager", 123)) {...}
    if (request.getUser().isInRole("Admin")) {...}
    
  3. I could not find some clear way of users logging in/out programmatically. I’ve implemented my UserDetails and UserDetailsService classes to handle the users with JPA, but I don’t see a way, how I can proceed with login and logout in my controllers.

EDIT:

I don’t see a way how to put the <form> in my Freemarker templates – the only way of creating the form I found is with:

<http pattern="/login.htm*" security="none"/>
    <form-login login-page="/login.htm" default-target-url="/home.htm"/>
</http>

How can I configure the structure of the login form? Can I create it by myself?

What I would like the most is to be able to handle the login by myself (for example with DWR) and not to use the magic j_security_checks…

It would be great, if I could handle the login request by myself and ask the auth service to login the user by myself (so I could easily use Direct Web Remoting (DWR)):

 if (user.username.ok() and user.password.ok()) {
     authService.setUser(user);
     authService.setLoggedIn(true);
 }
  • 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-31T22:30:37+00:00Added an answer on May 31, 2026 at 10:30 pm
    1. Spring security is not limited to spring mvc and can be used with your own framework implementation. It provides handy services for authentication and session management.

    2. Spring is very convenient to use to leverage access by certain URLs but not limited to. You will be able to get which roles the current user has at the moment from the spring context and all the custom info you would include in your UserDetails object. There are number of ways to restrict access to certain actions by certain roles. However the code like if (request.getUser().isAllowedTo("EditArticle", 27)) {...} I think it will be simplier to check by yourself.

    3. Login and logout are done by calling specific urls. For login: /j_spring_security_check. For logout: /j_spring_security_logout.

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

Sidebar

Related Questions

I am using spring security 3.0.5 in my web application based on Spring MVC.
I currently using my own membership implementation on a ASP.MVC project. I've got an
I'm creating my own script using the CodeIgniter MVC framework. Now, i want users
I am using my own implementation of the UserDetailsService interface to load a User
I traverse a 16x16 maze using my own A* implementation. All is well. However,
I am using my own controller factory in an MVC 2 app, and this
I am using ASP.NET MVC 3 and the YUI library. I created my own
i am using my own mvc framework and i want to filter and escape
I'm new to using an MVC structure, and am developing my own MVC framework
after using own custom cms for over 6 years, I decided to go for

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.