File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Android Security Essentials Live Lessons this week in the Android 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" />
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I include a file(.html) in jsp dynamically.
 
Similar Threads
Problem with my jsp compilation/Java mail
JavaScript to Java Applet Comm W/O Plug-in
Resetting Values in JSP Page
would u like to open the file or save it to your system
jsp+javamail. how to get the same session with url connection?