文件说明: products.jsp  ------ 购物车列表 buyServlet.java ------- 购物servlet cart.jsp  ----- 查看购物车 ClearServlet ---- 清空购物车 products.jsp  <%@ page language="java" import="java.util.*" pageEncoding="GB18030"%> <% String path = reque...

阅读全文>>

public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // 获得用户请求的时候,封装在request中的cooike信息 Cookie[] cookies = request.getCookies(); // 遍历cookie数组 Cookie targetCookie = findTargetCookie(cookies, "lastvisit"); response.se...

阅读全文>>

jackon的jar包下载地址: http://repo1.maven.org/maven2/com/fasterxml/jackson/ 需要下载core里面的3个jar包 测试案例 package com.gyarmy.javabeen; import java.util.Date; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.core.JsonProcessingException; ...

阅读全文>>

学习用的代码,意义不大 <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title>Ajax - XML</title> </head> <style type="text/css"> #details{ width:400px; height: 200px; background-color: ali...

阅读全文>>

注意: 实际开发中用不到,学习时可以看看.. <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title>Ajax - XML</title> </head> <style type="text/css"> #details{ width:400px; height: 200px; ...

阅读全文>>

Ajax以前学习过,但是忘记的差不多了,再来看看吧。。 <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HT...

阅读全文>>

XPath 简介 XPath 是一门在 XML 文档中查找信息的语言。XPath 用于在 XML 文档中通过元素和属性进行导航。 在学习之前应该具备的知识: 在您继续学习之前,应该对下面的知识有基本的了解: · HTML / XHTML · XML / XML 命名空间 如果您希望首先学习这些项目,请在我们的 首页 访问这些教程。 什么是 XPath? · XPath 使用路径表达式在 XML 文档中进行导航 · XPath 包含一个...

阅读全文>>

public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String name = request.getParameter("name"); byte[] bytes = name.getBytes("ISO8859-1"); name = new String(bytes,"UTF-8"); response.setContentType("text/html;charset=u...

阅读全文>>

package com.itheima.response; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.IOException; import java.util.Random; import javax.imageio.ImageIO; import javax.servlet.ServletException;...

阅读全文>>

public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String ip = request.getRemoteAddr(); System.out.println(ip); //读取 3.txt String path3 = getServletContext().getRealPath("/WEB-INF/5.txt"); System.out.print...

阅读全文>>

1 ssh-server 2 vim 3 解决root登陆问题 vi /etc/ssh/sshd_config Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 &nbs...

阅读全文>>

1,下载jdk-7u45-linux-x64.tar.gz       网址:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html 2, 解压JDK          进入JDK的下载目录 Html代码   sudo tar zxvf jdk-...

阅读全文>>