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

  • Home
  • SEARCH
  • 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 6656429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:38:30+00:00 2026-05-26T01:38:30+00:00

I am creating a website using Java EE. I have created a table in

  • 0

I am creating a website using Java EE.

I have created a table in a PostgreSQL database for the user data(username, password, role). I want to make a security realm or something like that in which to put some of the servlets. If a user sends a request to one of the servlets in the security realm and is not loged in, I want to redirect them to the login page.

The problem that I am having is that I don’t know how to verify if the user is loged in or not when the request is received on the server. Should I use a session id or cookie? I’ve also searched a lot on form based authentication but I haven’t found a way to compare the received data with the data stored in my database.

  • 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-26T01:38:31+00:00Added an answer on May 26, 2026 at 1:38 am

    I highly recommend using a framework to do this, as opposed to rolling your own. Security is a tricky thing to get right and you’re going to end up rewriting a bunch of the code that is already in existence. I have been recommending the excellent Shiro framework for awhile now, but in your case I believe Spring Security would be a better fit. Take a look at their tutorials and then download the sample application. All told it shouldn’t take you more than a day to stand up and become familiar with the basics.

    Good luck.

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

Sidebar

Related Questions

I'm creating a website and I don't want to have user/membership. However, people using
I am creating a website using Java servlets, and I have a page called
I am considering creating my own website using Java and am trying to decide
I am creating a website and using Linq to SQl as a data access
I'm currently creating an auction website using asp and vb.net. I want to manipulate
I am creating an e-commerce website using OpenCart and hostgator for hosting. I want
I am creating a website using LINQ database on Visual studio 2010 i am
i'm creating a shopping website using c# and asp.net and i want to use
When creating a website using Asp.Net and using controls such as the ListView is
I am creating an installer for an ASP.Net website using WiX. How do you

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.