What is jqteee?
jqtree is Java program helps to
display the local directory structure on webpage. Webpage will be generated in
form that you apply .jsp,.html is mostly focused.
How to use jqtree?
Downloaded zip file contains the .jar
file. jqtree is an API for tree view of folder on web page.
jqtree jq = new jqtree();
jq.main(dir_path,c:\jqtree.html)
<%
// Create object of jqtree
jqtree jq = new jqtree();
// Apply the directory path of which you want to display in your output webpage.
String dir = "D:\\javaquery";
// Output JSP you need to be run on browser so i'm using the build path of Apache tomcat.
// set path as per your requirement
String output_jsp =
"C:\\Users\\engcol\\Documents\\NetBeansProjects\\jqtreedemo\\build\\web\\jqtree.jsp";
try {
jq.main(dir, output_jsp);
} catch (Exception e) {
e.printStackTrace();
}
%>
Above code is used in JSP page you can generate the output webpage through simple class file,servlet,struts,etc...
You must have the images in folder images/jqtree/ images are give in the
zip file. for example you have your jqtree.html page at
C:\jqtree.html images must be in
C:\images\jqtree\
That you must follow
Some of you try to use it in the
first page that your web project run. Its not possible to do so because we are
generating the file at run time so on run of first page the file is not
generated. It'll give you error file not found. You must process the file before
displaying it. So go through the class file,servlet,struts,etc... and process
page in servlet,struts,etc... now you'll have your output page.
Help?
Comment the problem that you have
using the jqtree. on
http://www.javaquery.com/2011/04/jqtree.html
Created By Vicky Thakor (vkijust4u@javaquery.com)
Visit www.javaquery.com
Example screenshot