zoukankan      html  css  js  c++  java
  • javaee学习构建spring框架

    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    <%@page import="com.ch7.model.*"%>
    <%@page import="com.ch7.dal.Class"%>
    <%@page import="com.ch7.dal.Blog"%>
    <%@page import="com.ch7.common.DataValidator"%>
    <%@page import="com.ch7.common.Utility"%>
    <%
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
                + path + "/";
    %>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
        <link rel="stylesheet" type="text/css" href="styles.css">
        -->
    
    <%
        Blog blog = new Blog();
        List<BlogInfo> list = blog.getList(null);
        Class cls = new Class();
        List<ClassInfo> clist = cls.getList();
    %>
    </head>
    
    <body background="Image/timg.jpg" width=100% height=100%>
    
    <div class="header">
    <style>
    .header{ background:url(Image/2.jpg) no-repeat left top; height:618px;}}
    </style>
    
    </div>
        
        
        <div id="content">
            <%
                for (BlogInfo info : list) {
            %>
            <div class="post">
                <h1 class="title">
                    <a href="blog-information.jsp?id=<%=info.getId()%>"><%=info.getTitle()%></a>
                </h1>
                <p class="byline">
                    <small><%=info.getCreatedtime()%></small>
                </p>
                <div class="entry">
                    <p>
                        <%=Utility.Substring(DataValidator.removeHtml(info.getContext()), 300)%></p>
                </div>
                <p class="meta">
                    <a href="#" class="more">分类:<%=info.getClassName()%></a>   <a
                        href="#" class="more">详情</a>    <a
                        href="blog-information.jsp?id=<%=info.getId()%>#comment"
                        class="comments"> 我要评论</a>
                </p>
            </div>
            <%
                }
            %>
        </div>
    
        <div id="sidebar">
            <ul>
                <li>
                    <h2>日志分类</h2>
                    <ul>
                        <%
                            for (ClassInfo cinfo : clist) {
                        %>
                        <li><a href="blog-list.jsp?classId=<%=cinfo.getId()%>"><%=cinfo.getName()%></a></li>
                        <%
                            }
                        %>
                    </ul>
                </li>
            </ul>
        </div>
    </body>
    </html>
    
  • 相关阅读:
    Office2003中文绿色免安装版本(wordExcelPowerPoint三合一)
    图片去背景神奇网站remove.bg
    网络视频下载分享
    Windows10手机投屏到电脑
    测试开发工程必备技能之一:Mock的使用
    实战教程:如何将自己的Python包发布到PyPI上
    Sysbench测试神器:一条命令生成百万级测试数据
    Java 获取PDF中的数字签名信息
    Java 在Excel中添加分离型饼图、环形图
    C#/VB.NET 添加、删除PPT幻灯片中的数字签名
  • 原文地址:https://www.cnblogs.com/zhjvvvvvv/p/14941181.html
Copyright © 2011-2022 走看看