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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:19:58+00:00 2026-06-16T20:19:58+00:00

When I specify a security login system via FORM within web.xml (Tomcat), is there

  • 0

When I specify a security login system via FORM within web.xml (Tomcat), is there a way to capture an Error or Exception through the informed form-error-page jsp using EL if the authentication isn’t succeed?

I’m asking this because I’m wondering to use the same JSP form specified within form-login-page to serve as the form-error-page jsp, thus the JSTL Core c:if would be useful to capture an eventual Exception through ${not empty pageContext.exception}.

Thanks.

  • 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-06-16T20:19:59+00:00Added an answer on June 16, 2026 at 8:19 pm

    Just check if it’s forwarding to itself (which thus implies that there’s an error) on postback. You can check that by checking if the javax.servlet.forward.request_uri request attribute (which indicates the request URI as the enduser sees in browser’s address bar) doesn’t end with /j_security_check while HttpServletRequest#getMethod() equals to POST.

    <c:if test="${pageContext.request.method == 'POST' && fn:endsWith(requestScope['javax.servlet.forward.request_uri'], '/j_security_check')}">
        <span class="error">Unknown login, please try again.</span>
    </c:if>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to implement security for the following architecture: Web tier: Tomcat 7
I'm trying to implement a simple form-based login for my web application deployed with
Why does the recent ASP.NET security vurnerability specify an html error page to redirect
How do i specify the class of a custom web2py form? for e.g. {{=form.custom.begin}}
I'm creating a user system for Rails, and login, sign up etc... all works.
How do you specify a different subdomain for secure content: i.e. in the security.yml
I want to be able to specify a security level for my custom binding
I am using JSF2.1 and Glassfish 3.1.2. I specify a security constraint to block
I'm starting to set up the security for my web server. For this, I
Implementing a web service that uses Transport-level security with WCF over HTTP is pretty

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.