File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Need show pdf files in separate frame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Need show pdf files in separate frame" Watch "Need show pdf files in separate frame" New topic
Author

Need show pdf files in separate frame

venu v gopal v
Greenhorn

Joined: Apr 26, 2010
Posts: 6
Hi,

I got the pdf links from the specific folder using my java code to my jsp and i need to show these links as tree view and display in a separate frame.
could you please help me in getting this code.

and my code is
<%@ page language="java" import="java.util.*" %>
<%@ page language="java" import="java.io.*" %>
<html>
<head>
</head>
<body>
<%
String s2=null;
ArrayList al = new ArrayList();
ArrayList al2 = new ArrayList();
File folder = new File(
"C:\\Program Files\\Apache Software Foundation\\Tomcat 5.5\\webapps\\Smplepdf");
File[] listOfFiles = folder.listFiles();
for (int i = 0; i < listOfFiles.length; i++) {
if ((listOfFiles[i].getName()).endsWith(".pdf"))
System.out.println("forloop");
s2 = listOfFiles[i].getName();
System.out.println(listOfFiles[i].getPath());
al2.add(listOfFiles[i].getPath());
al.add(listOfFiles[i].getName());

}
//String s1=list.getPath();

for(int i=0;i<al.size(); i++)
{
System.out.println("Loop");
out.println("<a href='"+al.get(i)+"'>"+ al.get(i)+"</a>");
out.println("<br>");
// <a href="+a1.get[i] +" target="_blank" onlcik="openMyModal('a1.get{i]); return false;"> click to open</a>

}



%>
</body>
</html>.

Thanks..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need show pdf files in separate frame
 
Similar Threads
Java directory
exe file to get the property of the files in a folder
ArrayList does not print to terminal window after if statement inclusion, help?
Show HashMap in Datatable. UIColumn with embedded Datatable. Help Needed
How to get all files in a subdirectory of a webpage