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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:36:05+00:00 2026-05-16T05:36:05+00:00

I ran into something that I never thought of before and it stumped me.

  • 0

I ran into something that I never thought of before and it stumped me.

I have a site done using servlets and JSPs. There is an auth mechanism that works well and is much liked. There is now the need to add a static directory containing static HTML pages under the same umbrella. The requirement is that these pages should not be converted to JSPs and I should also use the same auth session as the JSPs do. In other words people should not be able to access the static pages without authenticating using the same credentials as the JSP site.

I am not sure quite how to do this as Filters only come into the picture if its a JSP or servlet isn’t it? I also do not want a special configuration in the WebServer for this directory as that would make it go outside the realm of the original auth session I am trying to use.

Any pointers on how to achieve this?

Thanks,
– Pav

  • 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-16T05:36:06+00:00Added an answer on May 16, 2026 at 5:36 am

    I am not sure quite how to do this as Filters only come into the picture if its a JSP or servlet isn’t it?

    This is not true. If the files are served by the same webapp/servletcontainer, then you can perfectly use a Filter for this. They intercepts on all kinds of requests matching the specified url-pattern regardless of the target type. Just let it as well listen on an url-pattern matching the static content. E.g. /static/* whereby you drop all the static content in a folder called /static. Or if you already have a Filter listening on /*, it will be invoked as well.

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

Sidebar

Related Questions

This is something that I never ran into before. Say I have a class
I'm learning about interface properties and ran into something that I thought should work
I ran into something odd today that maybe someone knows something about. I have
I was doing some performance metrics and I ran into something that seems quite
I just started playing around with threading today and I ran into something that
I just ran into something in Visual Studio 2010 RC that wasn't previously happening
I ran into something a little odd this morning and thought I'd submit it
So I ran into something interesting that I didn't realize about the ternary operator
Im learning C++ and I ran into something strange that I couldn't find any
I just ran into something weird. I have two JSON arrays which holds different

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.