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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:01:04+00:00 2026-06-15T01:01:04+00:00

Good day, I’m a beginner learning Jave EE. I created a servlet (controller) VersionOverview.java

  • 0

Good day, I’m a beginner learning Jave EE. I created a servlet (controller) VersionOverview.java that contains following code in the doGet method:

RequestDispatcher view = request.getRequestDispatcher("WEB-INF/jsp/versions.jsp");
view.forward(request, response);

File WEB-INF/jsp/versions.jsp contains these lines:

<div id="content">
  <jsp:include page="/WEB-INF/jspf/organization-filter.jspf" />
  ...
</div>

File /WEB-INF/jspf/organization-filter.jspf contains these lines:

<form name="organization-filter" action="versions">
  <input type="text" id="org_name" name="org_name" value="<%= request.getAttribute("org_name") %>">
  <br>
  <input type="hidden" id="org_id" name="org_id" value="<%= request.getAttribute("org_id") %>">
  <br>
  <input type="submit" name="submit" value="Submit"/>
</form>

When I open page /versions (mapped to the servlet above) it seems that organization-filter.jspf is not compiled because instead of blank input field named org_name I can see this text inside it:

<%= request.getAttribute(

If I change include directive in the versions.jsp like shown below it starts working:

<div id="content">
  <%@include file="/WEB-INF/jspf/organization-filter.jspf" %>
  ...
</div>

Please advise why it doesn’t work when I use jsp:include. Thank you in advance. Vojtech

  • 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-15T01:01:05+00:00Added an answer on June 15, 2026 at 1:01 am

    A jspf file is a file that is supposed to be statically included, using an include directive:

    <%@ include file="someFile.jspf" %>
    

    That’s just what a JSP fragment segment is, and since it’s supposed tobe statically included, there is no point in compiling it.

    Here’s what the spec says:

    By default the extension .jsp means a top-level JSP file. We
    recommend, but do not mandate, to differentiate between top-level JSP
    files (invoked directly by the client or dynamically included by
    another page or servlet) and statically included segments so that:

    • The .jsp
      extension is used only for files corresponding to top level JSP files,
      forming a JSP page when processed.
    • Statically included segments use
      any other extension. As included segments were called ‘JSP fragments’
      in past versions of this specification, the extension .jspf was
      offered as a suggestion. This extension is still suggested for
      consistency reasons, despite that they are now called ‘jsp segments’.

    If you want to dynamically include it, then it must have the .jsp extension. But in this case, I don’t see why you wouldn’t use a static include.

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

Sidebar

Related Questions

Good day everybody! Having the following code: template<typename T, typename OutStream = std::ostream> struct
Good day! I encountered the following error upon running my JSP program. java.lang.IllegalStateException: PWC3991:
Good day! I tried using JSTL in java but there's an error: exception javax.servlet.ServletException:
Good day, I have a class that implements the LoaderCallbacks, and hence have the
Good day I have a custom TextBox that has a IndicatorTextBox.ui.xml file as well
Good day, all. I know that this is a pretty basic question in terms
Good Day, I have a simple working routine in Perl that swaps two words:
Good Day! I am tying to add keyevent listener to jTextField so that if
Good day! I've a model that is binded from JSON request, say like this:
Good Day, I have created an asp.net web service on my local machine, and

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.