½â¾öJSPÂÒÂëµÄ¹ýÂËÆ÷
----*web.xml *----
----*web.xml *----
<filter>
<filter-name>MyFilter</filter-name>
<filter-class>cray.util.MyFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>MyFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
------------MyFilter.java-------------
import javax.servlet.*;
import javax.servlet.http.HttpServlet;
import java.io.IOException;
public class MyFilter extends HttpServlet implements Filter
{
private FilterConfig filterConfig;
public void init(FilterConfig filterConfig) throws ServletException
{
this.filterConfig = filterConfig;
}
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain filterChain)
{
try
{
request.setCharacterEncoding("GBK");
filterChain.doFilter(request, response);
} catch (ServletException sx)
{
filterConfig.getServletContext().log(sx.getMessage());
} catch (IOException iox)
{
filterConfig.getServletContext().log(iox.getMessage());
}
}
public void destroy()
{
}
}
Ïà¹ØÎĵµ£º
Ò» ǰÌá
Ï£Íû×îеļͼÔÚ¿ªÍ·¸øÄãµÄ±í½¨Á¢²éѯ£º
񡜧mytable
²éѯ£ºcreate or replace view as mytable_view from mytable order by id desc ÆäÖУ¬×îºÃʹÓÃÐòÁкÅcreate sequence mytable_sequence À´×Ô¶¯Ôö¼ÓÄãµÄ¼ ......
jQueryÊÇĿǰһ¸öºÜÁ÷ÐеÄjs¿ò¼Ü£¬ËüÒ²ÌṩÁ˶ÔajaxºÜºÃµÄÖ§³Ö¡£Ê¹ÓÃajaxÒì²½ÇëÇóÊý¾Ýʱ£¬Èç¹û·þÎñÆ÷·µ»ØµÄÒ»¸öÁбíÊý¾Ý£¬Í¨³£µÄ×ö·¨ÊǰÑÁбíÊý¾Ýת»»³Éjson¸ñʽµÄÊý¾Ý£¬È»ºó·µ»Øµ½Ò³Ã棬ʹÓÃjQuery½øÐнâÎö²¢Óñí¸ñÀ´ÏÔʾ£¬ÕâÒªÇóÄã¶Ôjavascript½âÎöjsonºÜÊì͸¡£
ÎÒÔÚÕâÀïÌṩһÖÖͶ»úÈ¡ÇɵÄ×ö·¨£¬Ê¹ÓÃjQuery·¢ËÍÒì²½ÇëÇó ......
jsp »º´æ£¬ html »º´æ£¬ ajax»º´æ,½â¾ö·½·¨
url:http://blog.csdn.net/oklzh/archive/2009/08/14/4445722.aspx
ÓйØÒ³Ã滺´æÎÊÌ⣮Õâ¸öÎÊÌâÉÏÍøÕÒÁ˺ö࣮µ«·¢¾õ¸÷ÖÖ½â¾ö·½·¨£¬¶¼±Ë´Ë·ÖÀ룬ûÓÐһƪͳһµÄ½â¾ö·½·¨£¬±¾È˽üÈÕ£¬Ò²Óöµ½ÁËÒ³Ãæ»º´æµÄÎÊÌ⣬¸ù¾ÝÍøÉϸ÷Ò³Ãæ»º´æµÄ½â´ð£¬×öÁËÒ»¸ö×ܽᡣ
1.·þÎñÆ÷¶Ë»º´æµÄÎÊÌâ ......
Ö÷ÒªÔÚjspÒ³Ãæ¼ÓÈë
<%@ page contentType="application/msexcel;charset=GBK"%>
<%
response.setHeader("Content-disposition",
"attachment; filename=shouExcel.xls");
%>
ÍêÕûÒ³ÃæÈçÏ£º
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8 ......