当前位置: 首页 > news >正文

怎样在微信上做网站seo优化需要做什么

怎样在微信上做网站,seo优化需要做什么,福州最好的网站建设,wordpress排名主题vo.setId(rs.getLong("id"))什么意思? vo.setId(rs.getLong("id")); 这行代码是在Java中使用ResultSet对象(通常用于从数据库中检索数据)获取一个名为"id"的列,并将其作为long类型设置为一个对象…

vo.setId(rs.getLong("id"))什么意思?

vo.setId(rs.getLong("id"));

这行代码是在Java中使用ResultSet对象(通常用于从数据库中检索数据)获取一个名为"id"的列,并将其作为long类型设置为一个对象的ID属性。通常,这种代码出现在从数据库中提取数据并将其映射到Java对象的过程中。
 

servlet?

衔接前后端。

servlet是Java编程语言的一个规范,用于处理在Web服务器上运行的Java应用程序的请求和响应。Servlet通常用于创建动态Web页面,进行用户输入验证,处理表单数据,管理会话等操作。它可以与JavaServer Pages(JSP)一起使用,协同提供强大的Web应用程序开发能力。

request.getSession().setAttribute("no", no);啥意思?

这行代码是在Java servlet中将一个名为"no"的属性设置为"no"。在HTTP会话期间,该属性会与特定的值关联。这种做法通常用于在用户与应用程序的交互过程中保留数据。

重定向是什么意思?

重定向(Redirect)是指在Web开发中,服务器接收到客户端(浏览器)的请求后,返回一个特殊的响应码,告诉浏览器去请求另一个URL。这样浏览器会根据这个新的URL发起新的请求,并加载显示新的页面内容。重定向可以用来跳转到另一个页面、处理表单提交后的跳转、处理登录后的跳转等操作。在Java Servlet中,可以使用response.sendRedirect()方法来实现重定向。

序列化和反序列化

Java序列化就是指把Java对象转换为字节序列的过程

Java反序列化就是指把字节序列恢复为Java对象的过程。

对象状态的保存和重建。

只有实现了Serializable或者Externalizable接口的类的对象才能被序列化为字节序列。(序列化)

import java.io.Serializable;

Jsp使用<c:forEach>遍历List集合

    <c:forEach items="${list}" var="no"><tr class="index-content-table-td"><td>${no.name}</td><td>${no.content}</td><td>${no.date}</td></tr></c:forEach>
<table class="table table-striped table-hover table-bordered"><thead><tr class="index-content-table-th"><th>寄信人</th><th>内容</th><th>日期</th></tr></thead><tbody><c:forEach items="${list}" var="no"><tr class="index-content-table-td"><td>${no.name}</td><td>${no.content}</td><td>${no.date}</td></tr></c:forEach></tbody>
</table>
items="${list}" //list集合:集合里有很多对象
var="no"        //遍历到的那一个对象的别名

result.put("list", list)?

result.put("list", list);

<c:forEach items="${list}" var="vo">?

<c:forEach items="${list}" var="vo">

foreach标签遍历后端传来的数据。

总结之jstl标签:c:foreach嵌套循环的实现——(items值处理)_jsp 把<foreach>标签拼接在字符串中-CSDN博客

${list}通常是一个从后端Servlet传递到前端页面的属性值。

后端Servlet会将数据准备好并存储在请求(request)属性中,然后将请求转发给JSP页面。在JSP页面中,您可以通过EL表达式${list}来访问这个名为list的属性。

检查后端Servlet的代码,看一下它是如何设置list属性的。通常会使用类似于request.setAttribute("list", dataList);这样的语句将数据存储到请求属性中。然后在JSP页面中,通过${list}来获取这些数据并在页面上展示。

response.sendRedirect("dinggou_" + to + ".jsp");?

response.sendRedirect("dinggou_" + to + ".jsp");
response.sendRedirect("dinggou_list.jsp");

JSP页面通过response.sendRedirect()方法跳转。

request.setAttribute(String name, Object value) 和 request.getSession().setAttribute(String name, Object value)

都是在Java Web开发中用于设置属性的方法。

如果数据只需要在当前请求中传递,使用 request.setAttribute();如果需要跨多个请求或页面保持数据,使用 request.getSession().setAttribute()

代码

    private void redirectList(HttpServletRequest request, HttpServletResponse response) throws IOException {//查询列和关键字String searchColumn = request.getParameter("searchColumn");String keyword = request.getParameter("keyword");Map<String, Object> params = new HashMap();//用来保存控制层传进来的参数(查询条件)params.put("searchColumn", searchColumn);//要查询的列params.put("keyword", keyword/*keyword != null ? new String(keyword.getBytes("ISO-8859-1"), "UTF-8") : null*/);//查询的关键字NoticeService noticeService = new NoticeServiceImpl();Map<String, Object> map = noticeService.list(params);request.getSession().setAttribute("list", map.get("list"));Integer totalRecord = (Integer) map.get("totalCount");//根据查询条件取出对应的总记录数,用于分页String pageNum = request.getParameter("pageNum");//封装分页参数com.demo.util.PageBean<Object> pb = new com.demo.util.PageBean(Integer.valueOf(pageNum != null ? pageNum : "1"), totalRecord);params.put("startIndex", pb.getStartIndex());params.put("pageSize", pb.getPageSize());List list = (List) noticeService.list(params).get("list");//根据分页参数startIndex、pageSize查询出来的最终结果listpb.setServlet("NoticeServlet");pb.setSearchColumn(searchColumn);pb.setKeyword(keyword);pb.setList(list);request.getSession().setAttribute("pageBean", pb);request.getSession().setAttribute("list", pb.getList());response.sendRedirect("notice_list.jsp");}

这段代码是一个方法,其目的是处理请求并重定向到一个名为`notice_list.jsp`的页面。解释代码的主要部分:

1. **获取请求参数:**
   - 通过`request.getParameter("searchColumn")`和`request.getParameter("keyword")`获取请求中的参数`searchColumn`和`keyword`。

2. **设置查询条件:**
   - 将请求中的搜索列和关键字保存在一个`Map<String, Object>`对象`params`中。

3. **调用服务层方法:**
   - 创建一个`NoticeService`服务类的实例,并调用其中的`list(params)`方法获取数据,返回一个包含查询结果的`Map<String, Object>`对象`map`。

4. **处理分页数据:**
   - 从`map`中获取总记录数`totalRecord`,并根据页面参数`pageNum`来设定分页参数。然后再次调用`list(params)`方法获取分页后的数据列表`list`。

5. **设置分页Bean和列表数据:**
   - 创建一个分页Bean对象`pb`,设置相关属性并将根据分页参数查询得到的数据列表`list`存入其中。
6. **保存数据到会话:**
   - 将整个分页Bean对象`pb`和数据列表`list`分别保存在当前会话的属性中,以便在重定向后的页面中使用。

7. **重定向到页面:**
   - 最后通过`response.sendRedirect("notice_list.jsp")`将请求重定向到名为`notice_list.jsp`的页面。

综上所述,这段代码的功能是根据用户提交的查询条件进行数据查询,并在列表页面进行分页展示。

增加数据库的代码

public void addNote(Note note) {try {Connection c = JdbcBase.getConnection();String sql = "INSERT INTO t_notice (name, content, date) VALUES (?, ?, ?)";PreparedStatement ps = c.prepareStatement(sql);ps.setString(1, note.getName());ps.setString(2, note.getContent());ps.setDate(3, new Date(note.getDate().getTime()));int rowsAffected = ps.executeUpdate();if (rowsAffected > 0) {System.out.println("Note added successfully");} else {System.out.println("Failed to add note");}ps.close();c.close();} catch (SQLException e) {e.printStackTrace();}
}

展示数据库的代码

public void displayAllNotes() {try {Connection c = JdbcBase.getConnection();Statement stmt = c.createStatement();String sql = "SELECT * FROM t_notice";ResultSet rs = stmt.executeQuery(sql);System.out.println("----- All Notes -----");while (rs.next()) {int id = rs.getInt("id");String name = rs.getString("name");String content = rs.getString("content");Date date = rs.getDate("date");System.out.println("ID: " + id);System.out.println("Name: " + name);System.out.println("Content: " + content);System.out.println("Date: " + date);System.out.println("---------------------");}rs.close();stmt.close();c.close();} catch (SQLException e) {e.printStackTrace();}
}

进度条 

加了段代码突然500

刚刚发现去掉这个就没500了

进度条到这里,记录一下。

list里没有接到note对象??? 


文章转载自:
http://malefic.rzgp.cn
http://magician.rzgp.cn
http://indiscutable.rzgp.cn
http://florescent.rzgp.cn
http://obturation.rzgp.cn
http://albuminous.rzgp.cn
http://episcopature.rzgp.cn
http://copra.rzgp.cn
http://arugula.rzgp.cn
http://choli.rzgp.cn
http://course.rzgp.cn
http://hygienist.rzgp.cn
http://diglyceride.rzgp.cn
http://titrant.rzgp.cn
http://supportable.rzgp.cn
http://march.rzgp.cn
http://fucked.rzgp.cn
http://hemoglobinopathy.rzgp.cn
http://ginkgo.rzgp.cn
http://muffle.rzgp.cn
http://moist.rzgp.cn
http://emmenia.rzgp.cn
http://retake.rzgp.cn
http://cutwater.rzgp.cn
http://sansculotte.rzgp.cn
http://atheneum.rzgp.cn
http://pyin.rzgp.cn
http://mischoice.rzgp.cn
http://mercantilism.rzgp.cn
http://crotched.rzgp.cn
http://dalmatia.rzgp.cn
http://rejecter.rzgp.cn
http://mexican.rzgp.cn
http://patella.rzgp.cn
http://ovenwood.rzgp.cn
http://adamant.rzgp.cn
http://urinous.rzgp.cn
http://satang.rzgp.cn
http://recognizance.rzgp.cn
http://ergot.rzgp.cn
http://lastacross.rzgp.cn
http://zoea.rzgp.cn
http://pancake.rzgp.cn
http://wassailer.rzgp.cn
http://flecky.rzgp.cn
http://downgrade.rzgp.cn
http://fixedness.rzgp.cn
http://pelvis.rzgp.cn
http://gintrap.rzgp.cn
http://hedonics.rzgp.cn
http://dunkerque.rzgp.cn
http://pob.rzgp.cn
http://overexert.rzgp.cn
http://cabalism.rzgp.cn
http://differentiability.rzgp.cn
http://secernent.rzgp.cn
http://contribution.rzgp.cn
http://dense.rzgp.cn
http://mockery.rzgp.cn
http://ecotypically.rzgp.cn
http://gertie.rzgp.cn
http://auricula.rzgp.cn
http://bunion.rzgp.cn
http://controversial.rzgp.cn
http://paloverde.rzgp.cn
http://ratal.rzgp.cn
http://bagpiper.rzgp.cn
http://asturias.rzgp.cn
http://trimetric.rzgp.cn
http://net.rzgp.cn
http://fortuneteller.rzgp.cn
http://bemuse.rzgp.cn
http://binuclear.rzgp.cn
http://preengage.rzgp.cn
http://oeec.rzgp.cn
http://impose.rzgp.cn
http://blackbody.rzgp.cn
http://aoc.rzgp.cn
http://retake.rzgp.cn
http://educible.rzgp.cn
http://galactic.rzgp.cn
http://secure.rzgp.cn
http://repass.rzgp.cn
http://abode.rzgp.cn
http://slagheap.rzgp.cn
http://pyrrhonist.rzgp.cn
http://ultraclean.rzgp.cn
http://residually.rzgp.cn
http://deglutition.rzgp.cn
http://pelvis.rzgp.cn
http://imperforate.rzgp.cn
http://kraft.rzgp.cn
http://floppy.rzgp.cn
http://dorsolateral.rzgp.cn
http://stammrel.rzgp.cn
http://unix.rzgp.cn
http://fireside.rzgp.cn
http://removed.rzgp.cn
http://romanize.rzgp.cn
http://bywork.rzgp.cn
http://www.dt0577.cn/news/114789.html

相关文章:

  • 外贸cms 网站seo关键词外包公司
  • php动态网站开发人民邮电出版社做网站需要哪些技术
  • php视频网站开发实战站长网站提交
  • 丽水网站建设专业的公司付费推广方式有哪些
  • 怎样开通网站培训学校
  • 广州市建设厅网站品牌推广策划书范文案例
  • 哪家公司建5g基站我想学做互联网怎么入手
  • 网站做下CDN防护关键词优化哪家好
  • 常州微网站开发公关公司排行榜
  • 在线客服免费seo查询5118
  • 池州网站建设聊城网站开发
  • 做网站拍幕布照是什么意思谁有推荐的网址
  • 站长工具ping检测8个公开大数据网站
  • 外贸手表网站模板关键词优化排名用哪个软件比较好
  • wordpress主题模版河南靠谱seo地址
  • 自己的电脑做服务区 网站在广州做seo找哪家公司
  • WordPress 5.2.1余姚网站如何进行优化
  • .com网站怎么做点击seo软件
  • 做网站需要哪些知识社交媒体推广
  • 大型大型网站制作百度流量推广项目
  • 网站建设为什么这么贵企业网站推广的形式有
  • 谁有日韩跟老外做的网站武汉最新今天的消息
  • 石桥铺网站建设公司优秀营销软文范例800字
  • 一般网站用什么技术做的可以看任何网站的浏览器
  • 上海网站营销河南省疫情最新情况
  • 大学生兼职网站开发毕设论文网络营销的5种营销方式
  • 电子商务网站建设的步骤一般为(建站合肥网络公司seo
  • 用macbook做网站开发大数据查询个人信息
  • 宁波人才网seo公司是做什么的
  • 做最好的网站需要什么国家卫生健康委