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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:28:20+00:00 2026-06-05T16:28:20+00:00

I made myself a template for all JSPs in my webapp that keeps things

  • 0

I made myself a template for all JSPs in my webapp that keeps things very simple:

<%@ include file="header.jsp" %>

<!-- Put unique content here -->

<%@ include file="footer.jsp" %>

I decided to move my navigation menu out of header.jsp into its own file as it is getting larger. I put the code for the menu into menu.jsp. Here is how the include looks inside of my header.jsp:

<html>
<head>
    <title>My JSP</title>
</head>

    <body>

        <jsp:include page = "menu.jsp"/>

 ......

However, menu.jsp will not work unless I also put this line in it:

<%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core"%>

That is already in my header.jsp. I would like to only to have to put it there. However when I try using this sytax instead:

<%@ include file="menu.jsp" %>

I get an error message from WebLogic 11g stating that

<%@ include file="header.jsp" %> is self refrencing

How can I include menu.jsp in header.jsp without having to include the JSTL in menu.jsp?

  • 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-05T16:28:23+00:00Added an answer on June 5, 2026 at 4:28 pm

    A JSP page included dynamically (<jsp:include />) must have a taglib declaration if it uses the taglib because it is compiled separately.

    A JSP page included statically doesn’t have the same restriction because it’s compiled into the servlet itself.

    What’s the big deal about declaring a taglib in a JSP in which it’s used? That makes it a standalone “chunk” of functionality, dynamically includable anywhere, self-documenting, without worrying about the page it’s being included in: this is the goal of breaking up functionality.

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

Sidebar

Related Questions

I've made myself a simple event system in python, and I found that the
I am trying to teach myself Closure templates. I made a simple file simply.soy:
Yesterday I made myself a new my first App ID, all Certificates and downloaded
Hi all I've made myself quite a complicated (at least, for me) construction. I
So I made myself a little html/css template. And now I'm trying to actually
I made myself a TransparentButton style that makes the Button portion behave the way
Visual Studio 2010 Express, Windows Forms. Have made myself my first little application which
I have several libraries made by myself (a geometry library, a linked list library,
I am trying to teach myself a bit of Javascript and made this collection
I want to put a tooltip made myself with divs when the mouse is

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.