Listing 2. Using the “Include” Directive

<HTML>
   <Head>
     <Title>Mini-dynamic JSP Title</Title>
   </Head>
   <Body>
     <%@ include file="menubar.jsp" %>
     <P>You are connecting from the host
     <% if (request.getRemoteHost().equals("")) { %>
           <%= request.getRemoteHost() %>.</P>
     <% } else { %>
           <%= request.getRemoteAddr() %>.</P>
     <% }  %>
   </Body>
</HTML>