displaying a physical webpage with frames in iframe
i have iframe in my webpage, i have done the coding part for browsing the folders and viewing files in iframe.each folder has a index.html.now i need to display the index.html in iframe.index.html page contains frames divided into 2,each from different sources.i tried to display a sample webpage without frames and it was a success,page with frames spoils the party.
my code for getting the html file
<%
String path=request.getParameter("name");
File directory = new File(path);
FileFilter fileFilter=new FileFilter() {
@Override
public boolean accept(File file) {
return file.getName().endsWith("html");
}
};
File[] files = directory.listFiles(fileFilter);
for (int index = 0; index < files.length; index++)
{
String s= files[index].getName();
String s1=files[index].getAbsolutePath();
%>
<a href="fileview?name=<%=s1%>" target="sss"><%=s%></a>
<%
}
%>
mycode for displaying the page in iframe.
public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
{
res.setContentType("text/html");
PrintWriter out=res.getWriter();
String name=req.getParameter("name");
res.setHeader("Content-Disposition", "inline; filename=\""+name+"\"");
java.io.FileInputStream fis=new java.io.FileInputStream(name);
int i;
while((i=fis.read())!=-1)
{
out.write(i);
}
fis.close();
out.close();
}
View Answers
Ads
Related Tutorials/Questions & Answers:
displaying a physical webpage with frames in iframe
displaying a
physical webpage with
frames in iframe i have
iframe in my
webpage, i have done the coding part for browsing the folders and viewing... sources.i tried to display a sample
webpage without
frames and it was a success
JSP - Problem of displaying result at webpage
JSP - Problem of
displaying result at webpage Can anyone please help to solve my problem below. My
webpage has problem in
displaying result position. The result should be display below my title. How do i solve it? Thank you so
Advertisements
webpage
webpage design a
webpage student database using forms and frameset
Regarding frames in HTML
Regarding
frames in HTML I have created a html page including two
frames in it,one frame consists "search bar" and the other frame consists login page,when i click on "Sign In" button in login frame,it is
displaying the results
webpage capture
webpage capture
webpage capture source code using jsps and servlets
html5 iframe
html5
iframe
We are going to describe html5 iframe.We have created html5
iframe and
implemented
iframe tag. We have created a inline frame. A inline frame...
Inline
frames or <iframe> is generally used in online advertising
ModuleNotFoundError: No module named 'frames'
ModuleNotFoundError: No module named '
frames' Hi,
My Python... '
frames'
How to remove the ModuleNotFoundError: No module named '
frames'... to install padas library.
You can install
frames python with following command
make a webpage
make a
webpage I will provide you some basic requirements that you will be implementing over a small web page...
Requirements:
A web page having...
webpage in a different way
Try to use features of HTML5, CSS3 and JavaScript
HTML Frames Example
HTML
Frames Example Hi,
Can anyone provide me HTML
Frames Example code? I have to one a web page say http://www.roseindia.net in Frame?
Thanks...;frame src="frame1.html"> tags for creating
frames in HTML.
Read at
Frames
ModuleNotFoundError: No module named 'webpage'
ModuleNotFoundError: No module named '
webpage' Hi,
My Python... '
webpage'
How to remove the ModuleNotFoundError: No module named '
webpage... to install padas library.
You can install
webpage python with following command
ModuleNotFoundError: No module named 'webpage'
ModuleNotFoundError: No module named '
webpage' Hi,
My Python... '
webpage'
How to remove the ModuleNotFoundError: No module named '
webpage... to install padas library.
You can install
webpage python with following command
displaying data
displaying data how to display data from database on jsp using struts2
ModuleNotFoundError: No module named 'gif-frames'
ModuleNotFoundError: No module named 'gif-
frames' Hi,
My Python... 'gif-
frames'
How to remove the ModuleNotFoundError: No module named 'gif-
frames' error?
Thanks
Hi,
In your python environment you
ModuleNotFoundError: No module named 'gif-frames'
ModuleNotFoundError: No module named 'gif-
frames' Hi,
My Python... 'gif-
frames'
How to remove the ModuleNotFoundError: No module named 'gif-
frames' error?
Thanks
Hi,
In your python environment you
ModuleNotFoundError: No module named 'gif-frames'
ModuleNotFoundError: No module named 'gif-
frames' Hi,
My Python... 'gif-
frames'
How to remove the ModuleNotFoundError: No module named 'gif-
frames' error?
Thanks
Hi,
In your python environment you
JavaScript write to IFrame
JavaScript write to
IFrame...;
This section illustrates you how to write to
IFrame using JavaScript...
iframe element. The variable div grabs the id of the div element which is added