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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:10:47+00:00 2026-05-19T10:10:47+00:00

I am working on a MIS project and currently i am creating a login

  • 0

I am working on a MIS project and currently i am creating a login system for that.
I am using servlet on server side and jquery on client side for ajax calls.

their is a login page which first checks the login status through an ajax call and if user is already logged in then it changes the page location to ‘services.html’.

when services.html loads i am again checking the login status and if user is not logged in
then i am changing the page location to ‘Login.html’ using
document.location='Login.html';

The code looks like this

$(document).ready(function() {
$("#login").hide();
    $.post("checkLogin",function(xml) {
    var status = $(xml).find("result").text();
    if (status == "yes") {
       document.location='Login.html';
    }
    else{
        // Do Nothing.
    }
});

Now the problem with the services.html page is that it checks the login status after the full page is loaded into the browser.

I don’t know any other good way to restrict Non Logged-In users to access ‘services.html’ page . As this project is quite big , i have to create a large number of private pages similar to ‘services.html’ Like ‘stuInfo.html’ For accessing Student Information etc.

Anyone please tell me any good way for 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-19T10:10:48+00:00Added an answer on May 19, 2026 at 10:10 am

    You should check this in the server side, not in the client side. JavaScript runs at client side and is disableable, hackable and spoofable. You don’t want your application to be that weak.

    Put all the restricted pages in some folder, e.g. /secured and then create a Filter which is mapped on an <url-pattern> of /secured/* and checks the presence of the logged-in user in the doFilter() method.

    An example can be found in the servlet-filters tag info page.

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

Sidebar

Related Questions

Working on a project that parses a log of events, and then updates a
Working in Eclipse on a Dynamic Web Project (using Tomcat (v5.5) as the app
I am working on a project using the Torque Engine 1.2 (mostly irrelevant but
Working against jQuery 1.3.2 I'm looking for best practices that implement the typical '
I'm working on a Django 1.2.3 project, and I'm finding that the admin session
Working with a SqlCommand in C# I've created a query that contains a IN
Working on a project at the moment and we have to implement soft deletion
Working with an Oracle 9i database from an ASP.NET 2.0 (VB) application using OLEDB.
Working on a project where a sequential set of methods must be run every
I am feeling that I have terribly wrong somewhere. I was working on a

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.