Java/JSTL/Import

Материал из Java эксперт
Перейти к: навигация, поиск

JSTL: Import a Page

   <source lang="java">

<%@ taglib uri="http://java.sun.ru/jstl/core" prefix="c" %><%@ taglib uri="http://java.sun.ru/jstl/fmt" prefix="fmt" %> <html>

 <head>
   <title>Import a Page</title>
 </head>
 <body>
   <form method="POST">

Import

Enter a site to import:
           <input type="text" name="url" size="20" 
             value="http://www.jexp.ru"/>

<input type="submit" value="Submit" name="submit" /> <input type="reset" value="Reset" name="reset" />

 

   </form>
   <c:if test="${pageContext.request.method=="POST"}">

     <c:import url="${param.url}"/>
   </c:if>
 </body>

</html>


      </source>