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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:54:09+00:00 2026-05-20T22:54:09+00:00

How to use User Expired Password in JDBCRealm ? Is it able to do

  • 0

How to use “User Expired Password” in JDBCRealm ?

Is it able to do this ?

  • 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-20T22:54:10+00:00Added an answer on May 20, 2026 at 10:54 pm

    JDBCRealm does not provide this sort of feature. You need to write one up yourself. I just written one for my webb app. Mine uses hibernate, but it’s not essential, as the steps are pretty generic.

    1. First set a session attribute ‘checkExpired’ in your login.jsp (or whatever you called it).
    <c:set var="checkExpired" value="true" scope="session" />
    
    1. Then in your index.jsp add a bit of code to read the checkExpired and if it’s set to true – perform the dates check and set the value of checkExpired to false! Obtain the last date when the pass was changed (stored in the database) and compare it with the current date. If it’s say 90 days older (or more) redirect the user to change password jsp page.

    2. My changepass.jsp includes a form where the user types in the new password. The action of the form is to call the servlet that handles passwords changing.

    3. The pass changing servlet validates the password, writes it to the database and updates the last_pass_change field in the databasse to the current date. Finally, it redirects to index.jsp.

    Now, this is not elegant at all (IMHO at least), but that’s the price you pay when using JDBCRealm for authentication. If you want to you can read around extending your server’s functionality or providing your own realm. However, this seems like a lot of work for something so trivial.

    Good luck,

    Damo

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

Sidebar

Related Questions

I am currently stuck on the part where user use his username and password
Is there a way to use user's culture to localize the Range Validator for
Could someone post a link to simple tutorial, which describe how to use User
Use case: user clicks the link on a webpage - boom! load of files
I want to use a user inputed name in the form of an NSString
How to use the user defined variable in a way that the value of
I am trying to use net user with c# System.Diagnostics.ProcessStartInfo proccessStartInfo = new System.Diagnostics.ProcessStartInfo(net
I am looking for a solution for user use the browser's back button to
I use cookies to manage user sessions in my Rails app. I recently found
I have a password protected area of a site that I use Sessions to

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.