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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:57:16+00:00 2026-05-15T20:57:16+00:00

Say a logged in user hits the url: www.example.com/forum/234 Before the spring mvc action

  • 0

Say a logged in user hits the url:

www.example.com/forum/234

Before the spring mvc action fires, I want to load the User Object, the user’s permission, the Forum object.

Now I want to share these objects accross this request. So other classes can look to see, in the current request, for a User, Permission and Forum object.

Potentially it would be cool if a custom freemarker module could also reference these objects if they are available.

is this possible?

  • 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-15T20:57:16+00:00Added an answer on May 15, 2026 at 8:57 pm

    First, consider using spring-security, whose filters do everything you need.

    If you want to do all by hand, then you have at least two options:
    – use servlet filters
    – use spring handler interceptor (http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/mvc.html#mvc-handlermapping-interceptor).

    In both cases store this data in request attributes.

    Another option is to create bean with request scope which will store your data.

    As for Freemarker, you must provide own subclass of FreemarkerViewResolver, which will return subclass of FreeMarkerView in requiredViewClass() method. Add your objects in exposeHelpers() method in this FreeMarkerView subclass.

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

Sidebar

Related Questions

I want to capture Liferay Logged In User details in JSP (Say email-ID ,
In GAE, you can say users.get_current_user() to get the currently logged-in user implicit to
Let's say we want to keep user information after user logged in to application
I have a domain say http://www.testexample.com . When I login to http://www.testexample.com and come
Say I have a Telerik MVC Grid, AJAX bound and I want to put
i have somthing like this: (if this page needs the user to be logged)
Let's say I have an facebook application running using the JS SDK. First user
Let's say I have 3 logged on users. I have a test application which
In a written django test, how can I get the current logged in user?
Say I have an appengine app called foo at foo.appspot.com and my email i.e.

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.