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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:10:07+00:00 2026-06-06T00:10:07+00:00

we have a Tiles layout page having Header, Menu, Body and Footer. In this

  • 0

we have a Tiles layout page having Header, Menu, Body and Footer. In this layout whenever user does some action in the Menu lists, the whole Layout (Incl Header, menu and footer) is refreshing. I want header,menu, footer to be static, and only body part should get updated.

Is there any way to prevent the refresh of the Header, menu and Footer and update only Body content on the menu click which can be implemented using Tiles?

  • 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-06T00:10:08+00:00Added an answer on June 6, 2026 at 12:10 am

    To do this you need to use ajax calls. The general procedure would be:

    1.- Create and define a tile which will be your base, composed with your header, body and footer, which will look like this:

    <div id='headerTile'>whatever goes here...</div> <!--this is baseHeader.jsp-->
    <div id='bodyTile'>whatever goes here....</div>  <!--this is baseBody.jsp-->
    <div id='footerTile'>whatever goes here...</div>  <!--this is baseFooter.jsp-->
    

    let’s consider each of those divs to be one tile in your definition:

    <definition name="layoutBase" path="/whateverPathItIs/layoutBase.jsp">
        <put name="header" value="/whateverPathItIs/baseHeader.jsp"/>
    <put name="body" value="/whateverPathItIs/baseBody.jsp" />
    <put name="footer" value="/whateverPathItIs/baseFooter.jsp" />         
    </definition>
    

    2.- Create and define all the different jsp which will replace your body content, please remember that this jsp must contain only the body elements. Let’s say you have 2 other body contents ready to be shown in your page, each one will be a tile:

    <div id='bodyContent1'>whatever goes here again...</div> <!--this is content1.jsp-->
    
    <div id='bodyContent2'>whatever goes here again 2</div> <!--this is content2.jsp-->
    

    3.- At this point you have both the base jsp tile and 2 other jsp which contain the body content. Now we need a struts action which will act as a service, returning the corresponding body depending on the ajax request. Do this as a normal action, and at the mapping.findForward method in the end, return the jsp which contains your body. You can either create one action for each body content or a single DispatchAction which contains a method for each body.Second option is cleaner, and the action would be defined like this:

    <action path="/bodySwitcher" 
            type="BodySwitcherAction"
            parameter="method"
            scope="request"
            >
        <forward name="content1" path="/pathToJsp/content1.jsp"/>
        <forward name="content2" path="/pathToJsp/content2.jsp"/>
    </action>
    

    4.- To switch content, use javascript or jquery to make an ajax call and load the returned jsp into your body. This is an example of the method which would switch the content in jQuery, using .load() as an ajax call:

    function switchContent(whichContent){
         $('#bodyTile').children().remove();
         $('#bodyTile').load("/pathToYourApp/bodySwitcher.do?method="+whichContent);
    }
    

    Don’t get discouraged by how long the answer is, I’m just trying to explain cleanly. This is actually pretty easy to do, and question is more jquery/javascript related than anything else, the only detail is how to use a struts action as a service. Good luck.

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

Sidebar

Related Questions

I am using Struts Tiles with JSF to have one header, menu and footer
I am trying to design a user profile page layout with HTML, I have
I have to do application for tilling in C#. The tiles will have some
I have a tiled background graphic with a header and footer part. Something like
I have a little problem with jquery mobile. always my page is called this
I have been having this issue for a while now and I cannot seem
I am using Tiles within my web-application. I have a standard-layout (standard.jsp) within the
First of all, have a look at this example of the layout I'm trying
I have a JQuery Mobile Multi-Page layout and I want to trigger a function
I have a pretty basic tiles1 setup with header, menu, and content as so:

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.