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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:34:05+00:00 2026-06-04T21:34:05+00:00

Good day. I’ve implemented JAAS authorization with FORMS authentication using Tomcat 7.0. When I

  • 0

Good day. I’ve implemented JAAS authorization with FORMS authentication using Tomcat 7.0. When I try to access localhost:8080/Guestbook/secure/123.html I’m redirected to the authorization page. I authenticate and the I’m redirected to localhost:8080/Guestbook/secure/css/style.css getting HTTP Status 404 – /Guestbook/secure/css/style.css. If I try to access the localhost:8080/Guestbook/secure/123.html resource again I can get it without being redirected to authentication page. As I understand I get authorized but I’m not redirected to the resource from the first try. What happens indeed and what could be done to prevent such behavior? In my web.xml I have the following pieces of code.

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Security test</web-resource-name>
            <url-pattern>/secure/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>Admin</role-name>
        </auth-constraint>
    </security-constraint>

    <servlet-mapping>
        <servlet-name>FrontControllerServlet</servlet-name>
        <url-pattern>*.html</url-pattern>
    </servlet-mapping>

    <login-config>
        <auth-method>FORM</auth-method>
        <form-login-config>
            <form-login-page>/login.jsp</form-login-page>
            <form-error-page>/error.html</form-error-page>
        </form-login-config>
    </login-config>
  • 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-04T21:34:07+00:00Added an answer on June 4, 2026 at 9:34 pm

    I think when you are accessing localhost:8080/Guestbook/secure/123.html the browser is serving the html from the cache. And the html is using localhost:8080/Guestbook/secure/css/style.css, for which the request is made to the server. And you that behaviour.

    I do not understand the necessity of securing static pages. But, if you really want to secure send cache headers to the browser such that the browser does not cache the html and makes request to the server always.

    To disable caching static pages in browser send the following headers:

    Pragma: no-cache
    Cache-Control: no-cache,no-store
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day everyone, I am building a page in ASP.NET, and using Master Pages
Good day, I am using CacheFilter to filter a certain path to my server
Good day everyone. I have a question about making and using derived classes of
Good day! I am using Xcode 3.1.4 and iPhone SDK 2.2.1. I am creating
Good day everyone! I am using the T-SQL ISDATE() function with a date column
good day, I am using Joomla 1.5 and wanted to make a real estate
Good day! I am trying to disable access on pages that are not part
Good day! I tried using JSTL in java but there's an error: exception javax.servlet.ServletException:
Good day :) I am using jQuery's animate() on both opacity and height, on
Good day. I just want to consult about using websphere as san application server

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.