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

jsp:forward±êÇ©

jsp:forward±êÇ©ÓÃÓÚ½«µ±Ç°µÄJspÒ³ÃæÌøתµ½ÁíÒ»¸öÒ³ÃæÉÏ£¬¸ÃÖ¸ÁîÖ»ÄÜʵÏÖ±¾ÍøÕ¾µÄÌøת
1.ÌøתµÄÒ³ÃæΪ¾²Ì¬Ò³ÃæʱµÄ¸ñʽ£º
     <jsp:forward page="ÌøתµÄ¾²Ì¬Ò³ÃæÎļþÃû" />
2.ÌøתµÄÒ³ÃæΪ¶¯Ì¬Ò³ÃæʱµÄ¸ñʽ
     <jsp:forward page="ÌøתµÄ¶¯Ì¬Ò³ÃæÎļþÃû">
          <jsp:param name=? value=? />
          ......  ......
     </jsp:forward>


Ïà¹ØÎĵµ£º

jspÖÐList,ArrayListµÄʹÓ÷½·¨


public static List getPageUser(int currentPage) throws Exception {//?List
         Connection conn = null;
         PreparedStatement prep = null;
         ResultSet rs = null ......

JSP/ServletÖеıàÂëÏà¹ØÉèÖÃ

ÔÚJSPºÍServletÖÐÓм¸¸öµØ·½¶¼¿ÉÒÔÉèÖñàÂ룬¸÷¸ö±àÂëµÄ¹¦ÄÜÒ²²»Ò»Ñù£¬±¾ÎĽ«¶Ô¸÷¸ö±àÂë×öÒ»¸öС½á¡£
¸÷ÖÖ±àÂëÒ»ÀÀ
A. JSP/Servlet¶¼ÓеıàÂëÉèÖÃ
1. request.setCharacterEncoding("UTF-8")
2. response.setCharacterEncoding("UTF-8")
3. response.setContentType("text/html;
charset=U ......

jsp·Åµ½WEB INFϺóÒýÓò»Í¬Ä¿Â¼µÄÎļþ,ÔõôҲÕÒ²»µ½

ÎÒ°Ñindex.jspÎļþ·Åµ½WEB-INFÏ£¬ÓÖÔÚWEB-INFϽ¨Á¢Ò»¸öĿ¼jsÓÃÀ´·ÅjavascriptÎļþ£¬Ò²¾ÍÊÇ˵index.jspºÍjsĿ¼ÊÇƽ¼¶µÄ£¬µ«ÊÇÔÚindex.jspÏÂÒýÓÃjavascriptÎļþʱÔõôҲÕÒ²»µ½¡£
WEB-INF¶ÔÓÚÓû§£¨Ò²¾ÍÊÇIE£©²»¿É¼û¡£
¶Ô²ß£¬°Ñjs·Åµ½WEB-INFÍ⣬»òÕßͨ¹ýרÃŵÄjsp/servlet/actionµÈforwardµ½ÏàÓ¦µÄ×ÊÔ´¡£ ......

jsp:param±êÇ©

¸Ã±êÇ©ÓÃÓÚÏòÄ¿±êÒ³ÃæÖеIJÎÊý´«Öµ£¬¸Ã±êǩͨ³£Óëjsp:include»òjsp:forward±êÇ©Ò»ÆðʹÓÃ
¸ñʽ£º<jsp:param name=? value=? />
         name£ºÄ¿±êÒ³ÃæÖеÄij²ÎÊýÃû
         value£ºÏònameÖ¸¶¨µÄ²ÎÊýËù´«µÄÖµ
Ò»¸öÒ³ÃæÖпÉÒÔÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ