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



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

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


aswinks
displaying a physical webpage with frames in iframe
0 Answer(s)      2 years and 7 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
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
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
update two frames at once
update two frames at once  How do I update two frames at once
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
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
Do search engines dislike frames?
Do search engines dislike frames?  Do search engines dislike frames
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
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
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
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
 

 

 

DMCA.com