`
文章列表
 select * from transportorders where concat(DepartureFromAddress,ReachToAddress) like '%海关%';   concat函数如有不明请行查看mysql参考手册
第一种: 先通过JS  encodeURI  方法将url进行转码 location.href = encodeURI("findTransportordersByPrincipalUserIdNotNullVehicleInfoAction?keyword="+keyword);   java 解码String keyword = new String(request.getParameter("keyword").getBytes("ISO8859-1"), "UTF-8");     第二种: ...
servlet 代码   public void init() throws ServletException { // Put your code here int period = 1;/*单位秒。每小时执行一次,如果是天,则再为24*/ int initDelay = 0;/*调动延迟时间,调试时设为0,即时开始。正常运行时,须设为晚上*/ UpdateThread updateThread=new UpdateThread(); /*通过ScheduledThreadPoolExecutor类,进行定时调度*/ Scheduled ...
在JSP页面需要引入样式 style.css    引入js   jquery.js 和 jquery.paginate.js 以及一个id 为pagination的div <div id="pagination" class="pagination"></div> 需要两个 <input type="hidden" id="maxPage" value="${maxPage }"><input type="hidden" i ...
分页查询: final String hql = "from TransportOrders t where t.carriageUserId!=null order by t.orderId desc"; getHibernateTemplate().executeFind( new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { Quer ...
window.location.reload();
首先是一个名叫Action的接口定义了一个execute()方法 package net.xiaxin.spring.qs; public interface Action { public String execute(String str); }   实现类LowerAction package net.xiaxin.spring.qs; public class LowerAction implements Action { private String message; @Override public String ex ...
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:153) at org.springframework.context.support.AbstractApplicationContext.<in ...
public static void main(String[] args) { String a[]=new String[]{"a","b","c","e"}; String b[]=new String[]{"b","c","d"}; for (int i = 0; i < a.length; i++) { boolean isEq=false; for (int j = 0; j < ...
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"> <property name="driverClass" value="com.mysql.jdbc.Driver"> </property> <property name="jdbcUrl" value="jdbc:mysql://localhost:33 ...
 uploadify.css 中需要更改图片路径,否则不显示"X" index.jsp上传页面 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+": ...
1.更改nginx 的nginx.conf文件    打开并找到如下内容        location ~ \.php$ {            root           c:/nginx/html;            fastcgi_pass   127.0.0.1:9000;            fastcgi_index  index.php;            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;            include        fastcgi_p ...
一个简单的POJO类 package com.test.pojo; public class User { private String name; private String password; public User(){ } public User(String name,String password){ this.name=name; this.password=password; } public String getName() { return name; } public voi ...
部分代码(可下载附件浏览全部) UserDao package com.spring.dao.impl; import java.sql.ResultSet; import java.sql.SQLException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.RowCallbackHandler; import ...
/** * 生成MD5简单方法 * @param str * @return */ public StringBuilder getMD5(String str){ byte [] buf=str.getBytes(); MessageDigest md5; StringBuilder sb=new StringBuilder(); try { md5 = MessageDigest.getInstance("MD5"); md5.update(buf); byte [] tmp=md5.dige ...
Global site tag (gtag.js) - Google Analytics