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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:00:39+00:00 2026-05-31T00:00:39+00:00

To understand the question I will explain the situation: main.jsp – the main window

  • 0

To understand the question I will explain the situation:
main.jsp – the main window of the application
jsp_seacurity.jsp – JSP file which send redirect in case user has no access to given page (I created separate file to reuse it in different pages)
noaccess.jsp – access denied page

In my main.jsp, one of the first lines is:

<jsp:include page="jsp_security.jsp?bo_item=main&bo_permission=view"/>

In jsp_security.jsp I do some checks and if the user doesn’t have permission for specific part of application I have the following code:

<jsp:forward page="noaccess.jsp"/>

After signing in with user without permission for main.jsp, I have noticed, Glassfish was showing exception in log file, which was occurring in some line of main.jsp which is after my jsp:include. I have checked jsp:include documentation and that was what I found

When the include action is finished, the JSP container continues
processing the remainder of the JSP file.

And now the question is, does it continue processing main.jsp even after I perform jsp:forward in jsp_security.jsp? Is there any workaround for this? I’m not pro in security, maybe what I’m doing is completely wrong?

Thanks for help,
Serhiy.

  • 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-31T00:00:40+00:00Added an answer on May 31, 2026 at 12:00 am

    It does. What this line puts in the generated servlet file (a jsp is compiled to a servlet), is request.getRequestDispatcher("target.jsp").forward(req, resp).

    This does not mean the doGet() method returns – it will continue to execute.

    That’s why you should use a Filter to add security checks. If the condition is not met, you don’t call chain.doFilter() but redirect to a ‘forbidden’ page instead.

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

Sidebar

Related Questions

this question might sound a little bit weired... But I will try to explain:
My question is actually about starting an application with MVVM : My main screen
I will explain my situation. Our Social Media Manager (yay) suddenly wants something to
I will explain my question a little more. I have a ObservableCollection binded to
The main question: How many digits? Let me explain. I have a number in
The question is not enough clear, so I will explain more. My client has
sorry for asking this dumb question i will try to explain as good as
While I understand this question is fairly vague since I'm not giving you all
I understand that the question is rather hard to understand, I didn't know how
I understand that this question could be answered with a simple sentence and that

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.