%@ page import="java.util.*;" %> <%-- //################################ //#FILE: popcorn_basic.jsp - Version 1.2 //# //#REVISION HISTORY: //# 05/29/04 Version 1.2 Original release //# //#CONTACT INFORMATION: //# http://www.davelozinski.com/cgi-bin/email_lozinski.pl //# //#UPGRADE TO THE ADVANCED VERSION: //# http://www.davelozinski.com/scripts/popcorn_trail/ //# //# This jsp script generates a "popcorn" trail on your web page. --%> <% //################################ //# Just insert this code once at the top of the web page you'd like the //# "popcorn" trail displayed in StringTokenizer currentPath = new StringTokenizer(request.getRequestURI(),"/"); int UpperBound = currentPath.countTokens(); String[] trail = new String[UpperBound]; String path = ""; int x = 0; while (currentPath.hasMoreTokens()) { trail[x] = currentPath.nextToken(); x += 1; } //################################ %>
-> " + trail[x] + "");
}
//################################
%>
-> Home -> Scripts -> Popcorn Trail -> Popcorn Code -> / -> php_scripts -> popcorn -> popcorn_code.php -> Home -> Scripts -> Popcorn Trail -> Popcorn Code Home | Scripts | Popcorn Trail | Popcorn Code / -> php_scripts -> popcorn -> popcorn_code.php / -> php_scripts -> popcorn ->", or specify your own! And you can have a different
separator for each trail on your page! Home -> Scripts -> Popcorn Trail -> Popcorn Code Home | Scripts | Popcorn Trail | Popcorn Code -> Home -> Scripts -> Popcorn Trail -> Popcorn Code Home -> Scripts -> Popcorn Trail -> Popcorn Code