html添加keyword,description帮助百度收录处理方法,jsp去除空白行方法

1.将网页的title,keyword,description写成include包含文件,例如: top.jsp

<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" trimDirectiveWhitespaces="true" %>
<%@page import="com.bn.car.core.Constants"%>

<title>养车之家</title>
<meta name="keywords" content="养车之家,自助保养,汽车保养,汽车配件,汽车用品,汽车百科,汽车服务" />
<meta name="description" content="养车之家由上海道宽信息科技有限公司创办,是国内领先的保养配件与车型精确匹配绑定、线上线下一体化服务相结合的汽车用品网上商城。公司地址:上海市徐汇区吴中路8号锦辉大厦1016-1018,电话:021-64870926"/>


2.在前台页面的地方加上top.jsp

<jsp:include page="./include/top.jsp"></jsp:include>

3.jsp去除空白行方法

<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" trimDirectiveWhitespaces="true"%>

在每个jsp页面上面加上: trimDirectiveWhitespaces="true"就可以实现效果了。

posted @ 2014-02-11 19:14  全新时代-小小程序员大梦想  阅读(2737)  评论(0编辑  收藏  举报