Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet displaying a physical webpage with frames in iframe

Have Programming Question? Ask it here!
 
 
 


aswinks
displaying a physical webpage with frames in iframe
0 Answer(s)      2 years and 2 months ago
Posted in : JSP-Servlet


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();
}

Advertisement
View Answers

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
Frames
Frames  using awt how i can link two frames? for example i just want that when i press on the button of frame "frame1" it takes me on another window "frame2" with desired output and hide the "frame1" please help me out
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
HTML frames
HTML frames  Are there any problems with using frames
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
HTML frames
HTML frames  Do search engines dislike frames
create frames
create frames  How do I create frames? What is a frameset
iframe application facebook login
iframe application facebook login  Create link to facebook from iFrame application
Iframe conetent - JSP-Servlet
Iframe conetent  Hi! i am loading web page in iframe in jsp page. when i am clicking on the link of iframe links it is loading in parent window that means in same window. i want to open the iframe content in new page
webpage capture
webpage capture   webpage capture source code using jsps and servlets
frames - Java3D
frames  how can i create multiple frames in java?  Hi Friend, You can use JInternalFrame class to create multiple frames in java as we...("Multiple Frames"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE
update two frames at once
update two frames at once  How do I update two frames at once
copy something from a webpage to my webpage
copy something from a webpage to my webpage  How can I copy something from a webpage to my webpage
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
check youtube iframe code
check youtube iframe code  I have a piece of code that checks the youtube embed code in this format: My PHP code looks like this now: //Check Embed Code $embedCode = $postData['embedCode
JavaScript getElementById Iframe
JavaScript getElementById IFrame...; We can also use document.getElementById() method with the IFrame. In this example we have created an html page into which we have one IFrame window which
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
border around frames
border around frames  How do I remove the border around frames
HTML combination of frames
HTML combination of frames  How do I specify a specific combination of frames instead of the default document
java Frames - Java Beginners
java Frames  Hi friend, Thanks for your reply. Can i use frames in socket program.  Hi anita, I am sending you a link. This link will help you. Please visit for more information. http
Do search engines dislike frames?
Do search engines dislike frames?  Do search engines dislike frames
Showing div at the center of the webpage
Showing div at the center of the webpage  Showing div at the center of the webpage
how to insert the physical path of an image in database - JDBC
how to insert the physical path of an image in database  hello I m working in a project where we have to capture an image using web cam. when... it physical path will get saved in a database.. I have table created
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
Last modified time of a webpage
Last modified time of a webpage  how can we get the last modified time of a webpage using java
Frames from a yuv video file
Frames from a yuv video file  hi, please help me with the java code for extracting frames of yuv video file. After extraction the images should be stored in jpeg format. Please help me
Frames from a yuv video file
Frames from a yuv video file  hi, please help me with the java code for extracting frames of yuv video file. After extraction the images should be stored in jpeg format. Please help me
Pass value from iframe to parent
Pass value from iframe to parent       iframe creates an inline frame in which we can put another page. We can pass values from iframe to the parent page with the use of java
Finding Lost Frames - Java tutorial
Finding Lost Frames 2001-05-10 The Java Specialists' Newsletter [Issue 019] - Finding Lost Frames Author: Dr. Heinz M. Kabutz If you are reading... Lost Frames Something that I have encountered in some almost-complete
GPS in Health Improvement & Physical Training
GPS in Health Improvement & Physical Training  ... of the most concerned topics in all over the world that advocates physical training. Today, there are numerous technologies available in the market as far as physical
how do i apply the javascript validation functions to the iframe content?
how do i apply the javascript validation functions to the iframe content? ...;script type="text/javascript"> function test() { iframe...() { iframe = document.getElementById('i'); iframe.src = 'http
how do i apply the javascript validation functions to the iframe content?
how do i apply the javascript validation functions to the iframe content? ...;script type="text/javascript"> function test() { iframe...() { iframe = document.getElementById('i'); iframe.src = 'http
displaying data
displaying data   how to display data from database on jsp using struts2
how to use iframe in jsp - JSP-Servlet
how to use iframe in jsp  Hi, i am using a jsp page in whic records from database are shown in a table in one of the column i am showing all error links which point to error. jsp an another jsp when i click the link a new page
Getting all frames in a JDesktopPane container
Getting all frames in a JDesktopPane container  ... the number of visible internal frames in a JDesktopPane container. The JDesktopPane... frames role like the child frame of the JDesktopPane container. Screen shots
should i reboot physical server to change the JDK path in linux server
should i reboot physical server to change the JDK path in linux server  Hi i need to change the JDK path in linux server. I set the JDK path export.... should i reboot physical server to reflect the change
how to set values from parent page to iframe in javascript
how to set values from parent page to iframe in javascript  how to set values from parent page to iframe in javascript pls reply me as possible as I am in great trouble
how to connect two swing frames
how to connect two swing frames  how to connect two swing frames   Hi Friend, Try this: 1)LoginDemo.java: import java.sql.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; class LoginDemo extends
Image is not displaying
Image is not displaying  Hii i am using spring javamail with html template to send mail,i am facing that image displaying prob when mail have to cm in gmail,in template just i am giving my current location of image which
How to print a webpage without url and date in jsp ?
How to print a webpage without url and date in jsp ?  How to print a webpage without url and date in jsp
displaying image
displaying image  how to upload image and retrieve it form database mysql in php?   Here is an example of uploading image using php. 1)form.html: <form method="post" enctype="multipart/form-data" action="upload.php
I need to display parts of my own website on another website in an iframe
I need to display parts of my own website on another website in an iframe  I need to display parts of my own website on another website in an iframe. please refer me how do i do
how to divide a web page into some frames.....
how to divide a web page into some frames.....  how to divide 1 web page into some parts. i know it using frames in html,bt how can we do it in jsp... page,bt m nt knowing how to divide that into frames in jsp.  Please go
PHP Displaying URL Content
PHP Displaying URL Content  In my PHP application form, on submitting the form details it always displaying url content. Can anyone tell me what is the reason and how to restrict it from displaying
codes for displaying in calendar
codes for displaying in calendar  can i get jsp codes for displaying comments, when the pointer is placed over the particular date in calendar
Login Box appears when a button on the webpage is clicked
Login Box appears when a button on the webpage is clicked  How to create a Login Box on a web page that appears only when a button that is already present on the page is clicked
Advertisements
 

 

 

DMCA.com