This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes Servlets and the fly likes How can I include a file(.html) in jsp dynamically. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How can I include a file(.html) in jsp dynamically." Watch "How can I include a file(.html) in jsp dynamically." New topic
Author

How can I include a file(.html) in jsp dynamically.

Maghvendra Singh
Greenhorn

Joined: Jun 19, 2001
Posts: 4
<BODY>
<%
String replyPage = request.getParameter("replyPage");
%>
<%@ include file = "replyPage" %>
<FORM METHOD=POST ACTION="submitReply.jsp">
<CENTER><TEXTAREA NAME="reply" ROWS="10" COLS="50"></TEXTAREA></CENTER>
<INPUT TYPE="submit">
</FORM>
</BODY>
In line no. 5 I wish to include .html file dynamically.
I m getting the name of the file as part of query string.
In our case I m holding the file name in variable "replyPage".
Maghvendra.
------------------
Harish Kashyap
Ranch Hand

Joined: Jun 14, 2000
Posts: 118
use :

<jsp:include file="include.htm" flush="true" />
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: How can I include a file(.html) in jsp dynamically.