`
无印之路
  • 浏览: 5602 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表
编写一个截取字符串的函数,输入为一个字符串和字节数,输出为按字节截取的字符串。 但是要保证汉字不被截半个,如"我ABC"4,应该截为"我AB",输入"我ABC汉DEF",6,应该输出为"我ABC"而不是"我ABC+汉的半个"。 public class parseCH { public void splitIt(String splitStr, int bytes) { int cutLength = 0; int byteNum = bytes; byte bt ...
1.input.jsp <%@ page language="java" pageEncoding="UTF-8"%> <%@ taglib uri="/struts-tags" prefix="s" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title& ...
1.Product.java and Product.hbm.xml package com.v12.shop.model; public class Product implements java.io.Serializable { private Integer id; private Category category; private String name; private Double price; private String description; public Pro ...
1.ProductDao.java and ProductDaoHibernate.java package com.v12.shop.dao; import java.util.List; import com.v12.shop.model.Product; public interface ProductDao { public void add(Product p); public void delete(Integer id); public void update(Product p); public Product qu ...
1.ProductAction.java package com.v12.shop.web; import com.opensymphony.xwork2.ActionSupport; import com.v12.shop.dao.ProductDao; import com.v12.shop.model.Product; public class ProductAction extends ActionSupport{ private Product product; private Integer id; private ProductDao prod ...
1.web.xml文件 <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee ...
Global site tag (gtag.js) - Google Analytics