pls help me the coding..

Recommended Answers

All 3 Replies

<%@ page session="false" %>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<jsp:useBean id="documentationList" class="epbeans.common.DocumentationList" />

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title> </title>

    <style type="text/css">

        #frameContentDoc {
            margin: 0;
        }
    </style>

</head>

<body style="font-family: Lucida Grande, Trebuchet MS; color: navy; margin: 0; padding: 10px;">
    <table border="0" cellspacing="0" cellpadding="0" width="100%" style="font-size: 125%; font-weight: bold; padding: 0; margin: 0;">
        <tr>
            <td align="left">Documentation</td>
        </tr>
    </table>
    <ul style="padding: 0 20px; list-style-type: none;">
        <li style="font-size: 115%">Contents
            <ul style="font-size: 80%; list-style-type: disc;">

                                    <c:forEach var="opt" items="${documentationList.docsList}">
                                        <li style="margin:0; padding: 8px 0 0 10px;"><a href="#"><u><c:out value="${opt}" /></u></a></li>
                                    </c:forEach>
            </ul>
        </li>
    </ul>
</body>
</html>

You can use html , jquery to display your folder structure in a treeview format

For dynamic conntent you can use any scripting language like php or jsp

The html goes as follows

The Jquery plugin is at http://docs.jquery.com/Plugins/Treeview/treeview

<ul id="folder" class="filetree">
        <li><span class="folder">Folder 1</span>
            <ul>
                <li><span class="file">Item 1.1</span></li>
            </ul>
        </li>
        <li><span class="folder">Folder 2</span>
            <ul>
                <li><span class="folder">Subfolder 2.1</span>
                    <ul id="folder21">
                        <li><span class="file">File 2.1.1</span></li>
                        <li><span class="file">File 2.1.2</span></li>
                    </ul>
                </li>
                <li><span class="file">File 2.2</span></li>
            </ul>
        </li>
        <li class="closed"><span class="folder">Folder 3 (closed at start)</span>
            <ul>
                <li><span class="file">File 3.1</span></li>
            </ul>
        </li>
        <li><span class="file">File 4</span></li>
    </ul>

The Jquery

$(document).ready(function(){

    // first example
    $("#folder").treeview();

});

thanks for the reply, the floder and the subfloder name also should be dynamic, i cant hard code it..
is der anyway that i can pass the jquery variable to jsp so that i can get the path name easily when i click on the subfolder , because i have files in the subfolder, those names also should populate dynamically..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.