Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JSPÄÚ²¿¶ÔÏóÏê½â

1¡¢Out¶ÔÏó
Ö÷ÒªÓÃÀ´Ïò¿Í»§¶ËÊä³ö¸÷ÖÖ¸ñʽµÄÊý¾Ý£¬²¢ÇÒ¹ÜÀíÓ¦Ó÷þÎñÆ÷ÉϵÄÊä³ö»º³åÇø£¬Out¶ÔÏóµÄ»ùÀàÊÇjavax.servlet.jsp.JspWriterÀà¡£
OutµÄÖ÷Òª·½·¨£º
out.println(DataType);»òout.print(DataType);
ʵÀý£º
<%@page language="java"
contentType="text/html;charset=gb2312"
import="java.util.*"
%>
<HTML>
<HEAD>
<TITLE> out¶ÔÏóʹÓÃʵÀý</TITLE>
</HEAD>
<BODY>
<%
out.println(new Date().toLocaleString());
out.print("<BR>");
out.print("²âÊԳɹ¦");
%>
</BODY>
</HTML>
2¡¢Request¶ÔÏó
Request.setAttribute()ÓëRequest.getAttribute()·½·¨ÊµÀý£¨Ò²¿ÉÒÔʹÓÃforward½¨Á¢ÇëÇó¹Øϵ£©£º
Ö÷Ò³Ã棺
<%@page language="java"
contentType="text/html;charset=gb2312"
%>
<%@ include file="1.jsp" %>
Äã¸Õ²ÅÊäÈëµÄÄÚÈÝÊÇ£º
<%=request.getAttribute("gr")%>
ÒýÈëÒ³Ã棺
<%@page language="java"
contentType="text/html;charset=gb2312"
import="java.util.*"
%>
<HTML>
<HEAD>
<TITLE> request¶ÔÏóʹÓÃʵÀý</TITLE>
</HEAD>
<BODY>
<%
request.setAttribute("gr","123333");
%>
</FORM>
</BODY>
</HTML>
Request.getParameter()·½·¨ÊµÀý
Ö÷Ò³Ãæ
<%@page language="java"
contentType="text/html;charset=gb2312"
import="java.util.*"
%>
<HTML>
<HEAD>
<TITLE> request.getParameter()·½·¨Ê¹ÓÃʵÀý</TITLE>
</HEAD>
<BODY>
<FORM METHOD=POST ACTION="2.jsp">
<INPUT TYPE="text" NAME="gr1"><BR>
<INPUT TYPE="text" NAME="gr2"><BR>
<INPUT TYPE="text" NAME="gr3"><BR>
<INPUT TYPE="submit" NAME="submit" value="Ìá½»">
<INPUT TYPE="reset" NAME="reset" value="Çå³ý">
</FORM>
</FORM>
</BODY>
</HTML>
ÒýÈëÒ³Ãæ
<%@page language="java"
contentType="text/html;charset=gb2312"
%>
Äã¸Õ²ÅÊäÈëµÄÄÚÈÝÊÇ£º<BR>
<%=request.getParameter("gr1")%><BR>
<%=request.getParameter("gr2")%><BR>
<%=request.getParameter("gr3")


Ïà¹ØÎĵµ£º

JSP¾Å´óÄÚÖöÔÏó

      Ò»¡¢page ¶ÔÏó
¡¡¡¡page¶ÔÏó´ú±íJSP±¾Éí£¬¸ü׼ȷµØ˵Ëü´ú±íJSP±»×ªÒëºóµÄServlet£¬Ëü¿ÉÒÔµ÷ÓÃServletÀàËù¶¨ÒåµÄ·½·¨¡£
¡¡¡¡¶þ¡¢config ¶ÔÏó
¡¡¡¡config ¶ÔÏóÀï´æ·Å×ÅһЩServlet ³õʼµÄÊý¾Ý½á¹¹¡£
¡¡¡¡config ¶ÔÏóʵÏÖÓÚjavax.servlet.ServletConfig ½Ó¿Ú£¬Ëü¹²ÓÐÏÂÁÐËÄÖÖ·½·¨£º
......

´¿JSP·ÖÒ³´úÂë

<%@ page contentType="text/html; charset=gb2312" %>
<%@ page language="java" %>
<%@ page import="java.sql.*" %>
<%
//Çý¶¯³ÌÐòÃû
String driverName="org.gjt.mm.mysql.Driver";
//Êý¾Ý¿âÓû§Ãû
String userName="root";
//ÃÜÂë
S ......

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 SetCharacterEn ......

½â¾öÓйØExt Gridµ¼³öExcelÔÚJSPµÈ»·¾³Öв»¿ÉÓõÄÎÊÌâ


http://www.ajaxbbs.net/post/extjs/10.html
ÓйØExtGridµ¼³öExcelµÄʵÏÖ·½Ê½£¬ÍøÉÏÒѾ­Óкܶ࣬¹Ù·½Ò²¸ø³öÁËÒ»¸ö·½°¸£¬´úÂë²»ÊǺÜÍêÉÆ£¬²»¹ýÒѾ­ÓиßÈ˶ÔÕâ¸ö½øÐÐÁËÐÞÕý¡£¾ßÌåʵÏÖ·½Ê½¼°´úÂëÎÒÕâÀï¾Í²»ÔÙ¶à˵ÁË£¬´ó¼Ò¿ÉÒԲο´£º
http://www.dojochina.com/index.php?q=node/1254
£¬¸½¼þ£º
gridToExcel.js.txt
Æä»ù± ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ