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

  • Home
  • SEARCH
  • 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 6806935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:46:15+00:00 2026-05-26T19:46:15+00:00

Ok, so basically I have a jspf template file with a backing FragmentBean that

  • 0

Ok, so basically I have a jspf template file with a backing FragmentBean that I want to include multiple times in the same request page scope. When I include this template I pass it a different parameter value so I can identify which instance I’m dealing with inside the template and store the data correctly in a session map. The problem I’m having is any action I perform on one included instance of this template applies to all the other ones. So for example when I click a button to hide or unhide panels inside the template all of the included instances also hide and unhide their corresponding hidden panels. This lead me to realize that it is not creating new backing bean instances. It seems like I’m probably misusing jsp:include but how do I get the desired code-reuse of including a single jsp file multiple times?

I’m limited to JSF 1.2, JSTL 1.1 and JBoss 4.0.4. So no RichFaces ajax trickery. And yes I realize we need to upgrade. Another battle for another time.

  • 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-26T19:46:16+00:00Added an answer on May 26, 2026 at 7:46 pm

    You are right, in that it is using the same instance multiple times, so any event or action updates that specific managed bean and the same information is reflected everywhere you have included your page.

    When you include multiple times, it does not mean a new instance every time.

    What you can do is pass parameters to identify from where you are including and then do some functionality.

    Another trick, is to declare multiple declarations with a different session variable.

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

Sidebar

Related Questions

I basically have a div on my site that always has the same stuff.
I have 2 Databases that basically have the same structure, but different data. (The
I basically have a page which shows a processing screen which has been flushed
I basically have 7 select statements that I need to have the results output
basically have two questions. 1. Is there a c++ library that would do full
I basically have the exact same problem as here: http://stackoverflow.com/questions/2416155/issue-in-executing-spring-web-project-in-eclipse-on-tomcat-server but the fix for
I basically have the same problem in this questions: Flash Video still playing in
I basically have a lot of poorly designed code to do something that, I'm
I basically have the same question as bder on the actionscript.org forums , namely
I basically have a table with headers that I read in from a DB

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.