Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need show pdf files in separate frame

 
venu v gopal v
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic