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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:28:39+00:00 2026-05-26T22:28:39+00:00

I’m currently doing this tutorial , but the tutorial uses Glassfish as the server

  • 0

I’m currently doing this tutorial, but the tutorial uses Glassfish as the server and I’m using Tomcat 7.0.22 as the server. I’m trying to include a header and a footer as .jspf files I only get this:

When it’s supposed to look like this:

It only renders the page without including the header and the footer, also when I go to the category page (http://localhost:8080/AffableBean/category) it renders the page like this:

When it’s supposed to look like this:

My webxml file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" 
    xmlns="http://java.sun.com/xml/ns/javaee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   
    http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <jsp-config>
        <jsp-property-group>
            <url-pattern>/index.jsp</url-pattern>
            <url-pattern>/WEB-INF/view/*</url-pattern>
            <include-prelude>/WEB-INF/jspf/header.jspf</include-prelude>
            <include-coda>/WEB-INF/jspf/footer.jspf</include-coda>
        </jsp-property-group>
    </jsp-config>
</web-app>

If I try to use a differente web-app tag like this one:

    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org    
    /TR/xmlschema-1/" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-
    app_2_4.xsd" version="2.4">

Only the index page will get rendered correctly but when I want to go to another page like

http://localhost:8080/AffableBean/category

I get a 404 error

Is it because I’m using Tomcat instead of Glassfish?

  • 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-26T22:28:39+00:00Added an answer on May 26, 2026 at 10:28 pm

    Something went wrong with your properties of your netbeans project. Everything looks fine to me. You can find an image here:

    enter image description here

    Please take the following steps and let me know if it provides a solution:

    • Create a new netbeans project
    • Copy the map ‘view’ from your old project directly under the directory ‘Web pages’.
    • Delete the file ‘category.jsp’ and replace it with the original file from (solution 2, at the end of the page) http://netbeans.org/kb/docs/javaee/ecommerce/page-views-controller.html
    • Copy the map css from your old project and paste it directly under the directory ‘Web pages’.
    • Copy ‘header.jspf’ and footer.jspf from your old project and paste it to the ‘view’ map.
    • Open your ‘header.jspf and change the css include line to: < link rel=”stylesheet” type=”text/css” href=”../css/affablebean.css” >
    • Open the clean ‘web.xml’ under ‘WEB-INF’, click on the ‘XML’ tab and paste http://pastebin.com/89nz4uLP.

    Alternate solution:
    Example header.jsp

    <%@page contentType="text/html" pageEncoding="UTF-8"%>
        <div id="header"> <span class="something">text here</span>
                    <div id="banner">
    
                        <h1><a># Android</a></h1><br/>
                    </div><br/>
        </div>
                <div id="menu">
                        <a href="index.jsp">Welcome</a>
                        <a href="#" class="none">|</a>
                        <a href="Register.do">Register</a>
                        <a href="#" class="none">|</a>
                        <a href="Newsflash.jsp">Newsflash</a>
                </div>
    

    Include it where you need it in your webpage (jsp), by using

    <jsp:include flush="true" page="header.jsp"></jsp:include>
    

    As you see you don’t need to re-add all the html in the header.jsp, just the part of the header.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the

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.