⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 friendlist.jsp

📁 使用JAVA编写的博客
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=gb2312"%>
<%@ page import="java.util.List" %>
<%@ page import="com.yxq.valuebean.FriendBean" %>
<html>
<head>
	<title>聆音博客-所有好友</title>
</head>
<body>
    <center>
        <table width="778" height="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#F0EAED">
            <tr height="281"><td colspan="2"><jsp:include page="../view/FrontTop.jsp" /></td></tr>
            <tr>
                <td width="230" valign="top"><jsp:include page="../view/FrontLeft.jsp"/></td>
                <td width="548" align="center" valign="top">
	                <table border="0" width="95%" style="margin-top:10" >
						<tr height="60"><td colspan="4">【我的好友】</td></tr>                
                		<% 
					       	List friendlist=(List)request.getAttribute("friendList"); 
        		    		if(friendlist==null||friendlist.size()==0)
			    		       	out.print("<tr height='60'><td align='center'>博主目前还未添加任何好友!</td></tr>");
		            		else{                          
           						int i=0;
                       			while(i<friendlist.size()){
                       				FriendBean friendSingle=(FriendBean)friendlist.get(i);
                       				String sexImg="front/friend/pic/";
                       				if(friendSingle.getSex().equals("男"))
                       					sexImg+="man.jpg";
                       				else if(friendSingle.getSex().equals("女"))
                       					sexImg+="women.jpg";
	                    %>
 						<tr height="30">
 							<td align="center" width="10%"><img src="<%=sexImg%>" border="1 solid"></td>
 							<td align="center"><a href="FriendServlet?action=single&id=<%=friendSingle.getId()%>"><%=friendSingle.getName()%></a></td>
 							<td align="center" width="5%"><img src="front/friend/pic/hand.jpg"></td>
 							<td align="center" width="13%"><a href="<%=friendSingle.getBlog()%>">好友博客</a></td>
 						</tr>
                        <%
                        			i++;
                        		}
                        	}
            			%>
            		</table>
                </td>
            </tr>
            <tr height="100"><td colspan="2"><%@ include file="../view/FrontEnd.jsp" %></td></tr>
        </table>
    </center>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -