displaying a physical webpage with frames in iframe

Ads
 

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
displaying a calendar of only current month in jsp on webpage using javascript
displaying a calendar of only current month in jsp on webpage using javascript  how can we display a calendar of only current month in jsp on webpage using javascript
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
iframe application facebook login
iframe application facebook login  Create link to facebook from iFrame application
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
ModuleNotFoundError: No module named 'physical_dualism'
ModuleNotFoundError: No module named 'physical_dualism'  Hi, My... named 'physical_dualism' How to remove the ModuleNotFoundError: No module named 'physical_dualism' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'physical-validation'
ModuleNotFoundError: No module named 'physical-validation'  Hi, My... named 'physical-validation' How to remove the ModuleNotFoundError: No module named 'physical-validation' error? Thanks   Hi
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
Do search engines dislike frames?
Do search engines dislike frames?  Do search engines dislike frames
displaying data
displaying data   how to display data from database on jsp using struts2
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
Showing div at the center of the webpage
Showing div at the center of the webpage  Showing div at the center of the webpage
Extract frames from Video File
Extract frames from Video File  How to extact the frames from a particular video file and save them in .jpeg format
ModuleNotFoundError: No module named 'cmsplugin-iframe'
ModuleNotFoundError: No module named 'cmsplugin-iframe'  Hi, My... named 'cmsplugin-iframe' How to remove the ModuleNotFoundError: No module named 'cmsplugin-iframe' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'cmsplugin-iframe'
ModuleNotFoundError: No module named 'cmsplugin-iframe'  Hi, My... named 'cmsplugin-iframe' How to remove the ModuleNotFoundError: No module named 'cmsplugin-iframe' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'cmsplugin-iframe'
ModuleNotFoundError: No module named 'cmsplugin-iframe'  Hi, My... named 'cmsplugin-iframe' How to remove the ModuleNotFoundError: No module named 'cmsplugin-iframe' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'jupyterlab-iframe'
ModuleNotFoundError: No module named 'jupyterlab-iframe'  Hi, My... named 'jupyterlab-iframe' How to remove the ModuleNotFoundError: No module named 'jupyterlab-iframe' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'yt-iframe'
ModuleNotFoundError: No module named 'yt-iframe'  Hi, My Python...-iframe' How to remove the ModuleNotFoundError: No module named 'yt-iframe' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'PedalPi-Raspberry-Physical'
ModuleNotFoundError: No module named 'PedalPi-Raspberry-Physical'  Hi...: No module named 'PedalPi-Raspberry-Physical' How to remove the ModuleNotFoundError: No module named 'PedalPi-Raspberry-Physical' error? Thanks
ModuleNotFoundError: No module named 'physical-device-manager'
ModuleNotFoundError: No module named 'physical-device-manager'  Hi...: No module named 'physical-device-manager' How to remove the ModuleNotFoundError: No module named 'physical-device-manager' error? Thanks   
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 'markdown_frames'
ModuleNotFoundError: No module named 'markdown_frames'  Hi, My... named 'markdown_frames' How to remove the ModuleNotFoundError: No module named 'markdown_frames' error? Thanks   Hi, In your python
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

Ads