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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:30:09+00:00 2026-05-27T00:30:09+00:00

All of a sudden my JSF 2 is rendering every page twice (with Eclipse

  • 0

All of a sudden my JSF 2 is rendering every page twice (with Eclipse and Tomcat.) No matter how simple it is. For example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:p="http://primefaces.prime.com.tr/ui">

<h:body>
   <h:outputText value="What's going on?"></h:outputText>
</h:body>

is generating a result that looks like this:

What’s going on? What’s going on?

If I put more complex stuff in there they also show up on the page twice. I tried restarting and all but no luck. So, what’s going on?

Edit:

Thanks for your answer everyone. r0ast3d I did change my web.xml to add a filter, and when I removed the entries the double vision disappeared. But I want the filter… The entries I had are like this:

  <filter>
    <filter-name>dontCache</filter-name>
    <filter-class>com.company.auctions.ui.DisableCacheFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>dontCache</filter-name>
    <url-pattern>*.jsf</url-pattern>
  </filter-mapping>

This is the doFilter method:

public void doFilter(ServletRequest request, ServletResponse res, FilterChain chain) throws IOException, ServletException {
    // TODO Auto-generated method stub
    // place your code here

    System.out.println("DisableCacheFilter.doFilter CALLED");

    HttpServletResponse response = (HttpServletResponse) res;
    response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
    response.setHeader("Pragma", "no-cache"); // HTTP 1.0.
    response.setDateHeader("Expires", 0); // Proxies.
    chain.doFilter(request, response);

    // pass the request along the filter chain
    chain.doFilter(request, response);
}

What am I doing wrong?

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

    The answer is right there in your doFilter method. You are calling chain.doFilter(request, response) twice.

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

Sidebar

Related Questions

I'm using Eclipse Galileo (v3.51). All of a sudden, after weeks of it starting
All of a sudden my eclipse has stopped working. I have restarted it multiple
I have a JSF/ICEFaces application that was working fine but all of the sudden
Does Eclipse have any persistent settings (that can get corrupted). All of sudden my
All of a sudden I start getting this error while trying to open 2
All of a sudden in this MVC site I have no views that can
Why does SQL 2008 all of a sudden want to drop my tables when
My web service (wcf) stopped working all of a sudden. I compared my web.config
I periodically get this problem where all of a sudden mako is using old
My database server is using 100% of the processing all of a sudden 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.