jsp¶¯Ì¬°üº¬
include.jspÖÐ
<jsp:include page="divide.jsp?value1=2&value2=3 flush="true">
value1 , value2 µÄÖµ¿ÉÒÔ´ÓÉÏÒ»¸ö´«¸øinclude.jspµÄdata.jspÖÐÈ¡Âð£¿
Èç¹û¿ÉÒÔÕâôд°¡£¬±ÈÈçvalue1=request.getParameter("val")
¿ÉÒÔÈ¡µÃµ½£¬value1=request.getParameter("val")ÕâÑùдÊÇ¿ÉÒԵġ£
¶¯Ì¬°üº¬¿ÉÒÔ£¬
¾²Ì¬°üº¬²»¿ÉÒÔ£»
²»¹ýÂ¥Ö÷ÓиöÎÊÌâҪעÒâÁË£¬ÔÚ <jsp:include>ÔÚ´«µÝ²ÎÊýµÄʱºòÓ¦¸Ã²»ÊÇÄãÄÇÑùϵµÄ°É¡£Óà <jsp:param>À´´«µÝ¡£
Java code:
<jsp:include page="divide.jsp">
<jsp:param name="value1" value="<%= request.getParameter("a") %>"/>
<jsp:param name="value2" value="<%= request.getParameter("value2") %>"/>
<jsp:param name="value2" value="<%= request.getParameter("value3") %>"/>
</jsp:include>
ÄãÊÔÏ°ɣ¬ÎÒÕâ²âÊÔÊÇͨ¹ýµÄ
Â¥Ö÷µÄд·¨Ó¦¸ÃÊǶ¯Ì¬°üº¬°É¡£ºÇºÇ
<jsp:include page="divide.jsp?value1= <%= request.getParameter('val') %>" flush="true">
ÊÇÕâÑùÂð£¿
Ïà¹ØÎÊ´ð£º
JSPÒ³ÃæÖÐÓжà¸öradio°´Å¥
JSPÒ³Ã潫²ÎÊýPOST¸øservlet
ÒªÇóÈçÏÂ;
1.Ñ¡ÔñÒ»¸öradio£¬µ÷ÓÃservlet servletÖиù¾Ý²ÎÊýµ÷ÓÃÆäËû½Ó¿Ú£¬³ý·ÇÑ¡ÖиÃradio²¢µã»÷JSPÖеÄʵР......
ÎÒÊǸöÐÂÊÖ£¬×öÒ»¸öJSPÍøÒ³£¬ÎÒÒª¶Á³öÊý¾Ý¿âÕý³££¬µ«ÊÇÎÒÒªÐ޸ĵÄʱºò£¬Ò²¾ÍÊǶÁÈëµÄʱºò³öÏÖÂÒÂ룬Çë¸ßÊÖ¸æËßÎÒÔõô½â¾ö£¬ÏÈллÁË¡£
request.setCharacterEncoding("UTF-8");
°Ñ±àÂëͳһ
/**
......
tableÔõô°ó¶¨Êý¾Ý¿â£¬²¢ÇÒÓÃJavaScriptʵÏÖ·Ò³¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£JavaScriptÄÜÏòJSPÒ³Ãæ´«µÝ²ÎÊýÂð
Äã˵µÄÎÊÌâÓеãÄǸö¡£¡££¬²»ºÃ»Ø´ð¡£¡£¡£¡£
jspÖÐtableÊÇÐèÒªhtml´úÂëÓëÒ³Ãæ¶Ë»ñÈ¡Êý¾Ý¿â²éѯºóµÄÐÅÏ¢½øÐÐ ......
±ÈÈç˵DB.classÊÇÔÚ°ücom/zhl/jdbcϵÄ
ÄÇôDB.class·ÅÔÚʲôµØ·½ Èç¹ûÓÃ<jsp:useBean id="d" class=""/>À´ÒýÈëbean ÄÇôclassÊôÐÔÓ¦¸ÃÔõôд
Ðè²»ÐèÒªÏñservletÄÇÑù»¹ÒªÅäÖÃweb.xmlµÄ& ......
³ÌÐòÈçÏÂ:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page language="java" %>
<%@ page import="com.mysql.jdbc.Driver" %>
<%@ page import ......