📄 breadcrumbs.jsp
字号:
<%/** * $RCSfile: breadcrumbs.jsp,v $ * $Revision: 1.2 $ * $Date: 2002/09/16 12:04:54 $ */%><%@ page import="java.util.*, com.jivesoftware.util.*, com.jivesoftware.forum.*, com.jivesoftware.forum.util.*, com.jivesoftware.base.*" errorPage="error.jsp"%><% // Page Description: // //%><%@ include file="global.jsp" %><% // Get paramters for this page: long forumID = ParamUtils.getLongParameter(request,"forum",-1L); long threadID = ParamUtils.getLongParameter(request,"thread",-1L); long messageID = ParamUtils.getLongParameter(request,"message",-1L); // Load objects - the forum, thread, etc parameters may not have been passed // in so load each object in a try/catch block. We do this so the page will // continue to load even if the objects fail to load (btw, if we did not // catch the exception, control would be passed to this JSP page's error // page - error.jsp. We don't catch exceptions on other pages because in // the event that a forum can't be loaded, the appropriate action would be // to rediect to an error page and display an error message. Forum forum = null; try { forum = forumFactory.getForum(forumID); } catch (ForumNotFoundException fnfe) {} ForumThread thread = null; if (forum != null) { try { thread = forum.getThread(threadID); } catch (ForumThreadNotFoundException ftnfe) {} } ForumMessage message = null; if (thread != null) { try { message = thread.getMessage(messageID); } catch (ForumMessageNotFoundException fmnfe) {} }%><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr valign="top"> <td width="99%"> <!-- Breadcrumbs --> <span id="breadcrumbs"> <a href="index.jsp">Forums Home</a> <%-- Show the forum name if a forum was loaded: --%> <% if (forum != null) { %> » <a href="forum.jsp?forum=<%= forum.getID() %>"><%= forum.getName() %></a> <% } %> <%-- Show the thread name if a thread was loaded: --%> <% if (thread != null) { %> » <a href="thread.jsp?forum=<%= forum.getID() %>&thread=<%= thread.getID() %>" ><%= thread.getName() %></a> <% } %> </span> </td> <td width="1%" nowrap> <%-- Display a welcome messsage to the guest or registered user. --%> <%-- ("isGuest" and "pageUser" are defined in global.jsp) --%> <% // Display a welcome message to the guest or registered user, as // well as a login/logout link. 'isGuest' and 'pageUser' are // defined in global.jsp if (isGuest) { %> Welcome, <i>Guest</i>. [<a href="auth.jsp">Login</a>] <% } else { %> Welcome, <a href="profile.jsp?user=<%= pageUser.getID() %>"><%= pageUser.getUsername() %></a>. [<a href="auth.jsp?logout=true">Logout</a>] <% } %> </td></tr></table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -