Hi
The program is what im currently doing. I write the program into a jsp file then i redirect it to the jsp file to display. Can anybody tell me how do i noe whether the user has click which node, and i need to display things that are related to the nodes that the user has juz click??
fos = new FileOutputStream("C:\\Tomcat 4.1\\webapps\\SDC1\\myfile.jsp");
// Connect print stream to the output stream
p = new PrintStream(fos);
p.println("<html>");
p.println("<head>");
p.println("<title>Files</title>");
p.println("</head>");
p.println("<body bgcolor=\"#ECDFCE\" link=\"blue\" vlink=\"purple\" alink=\"red\" style=\"scrollbar-face-color:#F5DEB3; scrollbar-arrow-color:indianred; scrollbar-track-color : papayawhip; scrollbar-shadow-color:black; scrollbar-highlight-color:''; scrollbar-3dlight-color:#BC7E41; scrollbar-darkshadow-Color:maroon;\" >");
p.println("<table width=\"100%\">");
p.println("<tr>");
p.println("<td width=\"50%\">");
File parentNode = new File(dirName + "\\" + user);
if (parentNode.isDirectory())
{
File[] childNode = parentNode.listFiles();
String parentName = parentNode.getName();
p.println("<%@ taglib uri=\"taglib.tld\" prefix=\"tree\" %>");
p.println("<tree:createTree treePicture=\"images/folder_idle.gif\" nodePicture=\"images/item_doc.gif\" openPicture=\"images/folder_open.gif\" dhtml=\"true\">");
p.println("<tree:addNode code=\"<b>" + parentName + "</b>\">");
for (int i = 0; i < childNode.length; i++)
{
String fileInDir = childNode[i].getName();
addnode.setCode(fileInDir);
String node = addnode.getCode();
if (childNode[i].isDirectory())
{
expandFiles(childNode[i].getAbsoluteFile());
}
}
p.println("</tree:addNode>");
p.println("</tree:createTree>");
}
thanx in advance...
[ October 15, 2003: Message edited by: Ann Toh ]