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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:45:24+00:00 2026-06-07T23:45:24+00:00

Im using Mojarra 2.1.3, NetBeans 7.0.1, Primefaces 3.2. I have a few dynamic xhtml

  • 0

Im using Mojarra 2.1.3, NetBeans 7.0.1, Primefaces 3.2.

I have a few dynamic xhtml pages backed by ViewScoped backing beans in my application. Each of the pages has p:dataTable which display List<> from the backing bean. The problem occurs when a user navigate to a different page with the details of each item in the datatable. Upon browing the detail information, a user will most likely hit on the browser back button to return to the list. And so I implemented a filter like this in my application.

    @Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
        throws IOException, ServletException {
    HttpServletRequest httpReq = (HttpServletRequest) request;
    HttpServletResponse httpRes = (HttpServletResponse) response;
    if (!httpReq.getRequestURI().startsWith(httpReq.getContextPath() + ResourceHandler.RESOURCE_IDENTIFIER)) { // Skip JSF resources (CSS/JS/Images/etc) 
        httpRes.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1. 
        httpRes.setHeader("Pragma", "no-cache"); // HTTP 1.0. 
        httpRes.setDateHeader("Expires", 0); // Proxies. 
    }
    chain.doFilter(request, response);
}

But I have one problem, as explained here: How to move user to timeout page when session expires, if user click on browser back button the browser should instead send a fullworthy fresh HTTP request to the server.

But in my case it didn’t. I see instead the ubiquituous Webpage has expired page which is in my opinion not a user friendly experience. What I want is NOT for it to load from browser cache but instead create a fresh request to the server and display the right page (Not the Webpage has Expired Page). Is it possible.

Please help. Thanks a lot.

  • 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-07T23:45:28+00:00Added an answer on June 7, 2026 at 11:45 pm

    This can happen if the navigation has taken place by a POST request instead of a GET request.

    You should make sure that page-to-page navigation always take place by a GET request. E.g.

    <p:dataTable value="#{bean.items}" var="item">
        <p:column>
            <h:link value="detail" outcome="detail">
                <f:param name="id" value="#{item.id}" />
            </h:link>
        </p:column>
    </p:dataTable>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a JSF 2.0 Mojarra application using Primefaces 3.3.1 on Tomcat 6.
I am writing a web application using JSF 2. I have downloaded mojarra-2.1.3-FCS-binary.zip and
I'm developing a web application using JSF 2.0, NetBeans 6.9.1, GlassFish Server 3.1, mojarra
Im using mojarra 2.1.3, primefaces 3.2, netbeans 7.0.1. When we navigate to the outcome
Im using Mojarra 2.1.3, Netbeans 7.0.1, primefaces 3.2. I am currently in a quandary
i have a problem with rendering #{} inside JSF page. I'm using Mojarra 2.1.5
I am using JSF2.0 Mojarra 2.0.2. I have a method that logs out a
i'm making a JSF2.0 project using mojarra primefaces tomcat6.x. I made a select list
I'm working on a JSF 2.0 project using Mojarra, PrimeFaces and Tomcat 6.x, but
I have a problem when using h:head tag. I am using JSF 2.0 Mojarra's

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.