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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:46:43+00:00 2026-05-10T17:46:43+00:00

We are hosting a site for a client and they want us to include

  • 0

We are hosting a site for a client and they want us to include the header they have on their server into the pages we are hosting. So whenever they change it, it will automatically change on our site.

We are attempting to use the ‘include’ tag in our JSP code. The code we are using is as follows:

<%@ include file='www.CLIENT.com/CLIENT2/MiddlePageFiles/Vendor_header.html' %>

We also tried

<%@ include file='**http://**www.CLIENT.com/CLIENT2/MiddlePageFiles/Vendor_header.html' %>

Unfortunately these aren’t working for us. What seems to be happening is that the code is ONLY looking locally for this file and never seems to go ‘outside’ to look for it.

We are able to pull the header into our page when we use an iframe but because of the way the header is constructed/coded the mouse over drop-down menus aren’t working as they should when we use the iframe. The drop-down menus are ‘cascading’ underneath the rest of the content on the page and we weren’t able to bring them to the ‘top’.

As a temporary work around, were are hosting the HTML on our own servers.

Any ideas?

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-10T17:46:43+00:00Added an answer on May 10, 2026 at 5:46 pm

    If you choose to do this in Java, it’s nice and easy using the HttpClient from Apache Commons.

    public static String fetchSourceHtml( String urlString ) {    try {     HttpClient httpClient = new HttpClient();     GetMethod getMethod = new GetMethod( urlString );     getMethod.setFollowRedirects( true );      int httpStatus = httpClient.executeMethod( getMethod );      if (httpStatus >= 400) {       return '';     }      String sourceHtml = getMethod.getResponseBodyAsString();     return sourceHtml;   }   catch (IOException e) {     return '';   } } 

    For a quick and dirty solution, your JSP you can call this method directly. You could, of course, create a taglib tag to call the method if you prefer.

    You may want to change the time-out and retry mechanism for HttpClient. By default it will automatically try up to a maximum of 3 times with each attempt timing out after 30s.

    However, you probably want to look into caching the strings for a suitable period of time. You really don’t want to make 2 blocking external http requests for each page access to your site.

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

Sidebar

Related Questions

I am hosting a client's site while they are running an exchange server at
I have a file hosting site that's using this script MFHS . I want
I'm hosting a client site on heroku. The client is pointing their custom-domain-name (A-record)
Im making a site for a client so they will be switching to my
I have a hosting account for my site. I want to install SVN along
I have a Clustered Windows Hosting site which currently hosts an MVC Web Application
I have a system for a file hosting site which requires a PHP script
we deliver micro-site content for our client. Our content is injected into a wrapper
I have a client that would like to add a feature to their application
I'm hosting images for client websites. I want them to be able to link

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.