SetCharacterEncodingFilter jsp×Ö·û¹ýÂËÆ÷
package com.demo.filter;
import javax.servlet.Filter;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.FilterChain;
import java.io.IOException;
public class SetCharacterEncodingFilter implements Filter {
protected FilterConfig filterConfig;
protected String encodingName;
protected boolean enable;
public SetCharacterEncodingFilter() {
this.encodingName = "GBK";
this.enable = false;
}
public void init(FilterConfig filterConfig) throws ServletException {
this.filterConfig = filterConfig;
}
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws IOException, ServletException {
request.setCharacterEncoding("GBK");
response.setCharacterEncoding("GBK");
chain.doFilter(request, response);
}
public void destroy() {
}
}
————————————————————————————————————————————
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.
Ïà¹ØÎĵµ£º
javaµ¼Èëµ¼³öexcel²Ù×÷(jxl)£¨2£©
¹Ø¼ü×Ö: javaµ¼Èëµ¼³öexcel²Ù×÷(jxl)£¨2£©(
¸ß¼¶²Ù×÷
Ò»¡¢ Êý¾Ý¸ñʽ»¯
ÔÚExcelÖв»Éæ¼°¸´ÔÓµÄÊý¾ÝÀàÐÍ£¬Äܹ»±È½ÏºÃµÄ´¦Àí×Ö´®¡¢Êý×ÖºÍÈÕÆÚÒѾÄܹ»Âú×ãÒ»°ãµÄÓ¦Óá£
×Ö´®¸ñʽ»¯
×Ö·û´®µÄ¸ñʽ»¯Éæ¼°µ½µÄÊÇ×ÖÌå¡¢´Öϸ¡¢×ֺŵÈÔªËØ£¬ÕâЩ¹¦ÄÜÖ÷ÒªÓÉWritableFontºÍWritableCellFormat ......
Ò»¡¢page ¶ÔÏó
¡¡¡¡page¶ÔÏó´ú±íJSP±¾Éí£¬¸ü׼ȷµØËµËü´ú±íJSP±»×ªÒëºóµÄServlet£¬Ëü¿ÉÒÔµ÷ÓÃServletÀàËù¶¨ÒåµÄ·½·¨¡£
¡¡¡¡¶þ¡¢config ¶ÔÏó
¡¡¡¡config ¶ÔÏóÀï´æ·Å×ÅһЩServlet ³õʼµÄÊý¾Ý½á¹¹¡£
¡¡¡¡config ¶ÔÏóʵÏÖÓÚjavax.servlet.ServletConfig ½Ó¿Ú£¬Ëü¹²ÓÐÏÂÁÐËÄÖÖ·½·¨£º
......
Ò»Ö±ÒÔÀ´Ê¹ÓÃMyeclipse±à¼Ê±£¬¸Ð¾õÔÓеÄ×ÖÌå´óСºÜ²»ÊÊÓ¦£¬ÓÚÊÇÔÚÍøÉÏËÑÁ˹ØÓÚÔÚMyEclipseÖÐÔõÑùÐÞ¸Ä×ÖÌå´óС£¬ºÜ¶à¶¼ÊÇʹÓÃwindow-preferences-general-apperaence-colors and fonts-java-java edditor text font À´ÐÞ¸Ä×ÖÌå¡£
ʹÓÃÕâ¸ö·½·¨ËäȻдÀàÎļþÀïÃæµÄ´óС¶¼¸ü¸ü¸ ......
Impl
public class BaseDAOImpl extends HibernateDaoSupport implements IBaseDAO
//Ìí¼ÓÊý¾Ý
this.getHibernateTemplate().save(achi);
//ɾ³ý
this.getHibernateTemplate().delete(this.getById(achi));
//²éѯËùÓÐ
return this.getHibernateTemplate().find("from Achievement a ......