清单 2. 使用“Include”指令

<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>
© . All rights reserved.