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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:34:21+00:00 2026-05-27T20:34:21+00:00

I am new to java. Here I am making my first web project, i

  • 0

I am new to java. Here I am making my first web project, i have login.jsp and servlet(doPost) for authentication and then redirects to userhome if authenticated. But if not authenticated then a message is going like:

response.sendRedirect("login.jsp?msg=Invalid user id and password");

But this message is being displayed in browser header like :

login.jsp?msg=Invalid user id and password

which i do not want. In browser no message should be displayed and should only display the url of login page(login.jsp) when user is not authenticated that is:

login.jsp

Any help?

  • 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-27T20:34:22+00:00Added an answer on May 27, 2026 at 8:34 pm

    Edit: try this code. use session object.

    session.setAttribute("error","Invalid user id and password")
    response.sendRedirect("login.jsp");
    

    in login.jsp use this code

    session.getAttribute("error");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a new Java web project I thought about using: Eclipse as IDE Mercurial
Almost every new Java-web-project is using a modern MVC-framework such as Struts or Spring
I am starting a new Java web project that will be worked on by
We are starting a new Java EE project and am looking for suggestions regarding
When creating a new Java project in IntelliJ IDEA, the following directories and files
I'm working on my first Android project, and I'm starting off by making a
In last few months I have been making a transition from Java to Groovy
Here is my code currently. I'm making a java program that seaches Active Directory
General question here: If I'm making a new class, and it's only private field
thats my first question here and i hope someone can help me. I´m new

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.