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

jsp°üº¬Îļþ¼°Ê¹ÓÃjavabean

£¨Ò»£©°üº¬ÆäËûÒ³ÃæµÄ·½·¨£º
includeÖ¸Á<%@ include file = "test1.jsp" %>
 ¾²Ì¬°üº¬£¬¿ÉÒÔ°üº¬ÈÎÒâ¸ñʽµÄÎļþ£¨²»¹âÊÇjspÎļþ£¬»¹¿ÉÒÔÊÇtxtµÈÎı¾Îļþ£©£¬¾²Ì¬°üº¬¾ÍÊǽ«±»°üº¬ÎļþµÄÄÚÈÝ¿½±´µ½°üº¬ÎļþÖУ¬½øÐÐÖ´ÐС£µ±Ç°Ò³ÃæºÍtest1.jspÖв»ÄÜÓÐÖØÃûµÄ±äÁ¿¡£
include¶¯×÷ <jsp:include page = "test1.jsp"/>
 ¶¯Ì¬°üº¬£¬Ö»ÄÜ°üº¬¶¯Ì¬Ò³Ã棬¶¯Ì¬°üº¬ÊÇÏÈÖ´Ðб»°üº¬Îļþ£¬È»ºó½«½á¹û°üº¬µ½Îļþ¡£µ±Ç°Ò³Ãæ¿ÉÒÔºÍtest1.jspÖÐÓÐͬÃûµÄ±äÁ¿£¬ÒòΪËüÖ»°üº¬×îºóµÄ½á¹û¡£
£¨¶þ£©
É趨²ÎÊýÖµ£º
<%@ page pageEncoding = "GBK"%>
<%@ page imort = "cn.javabean.*"%>        //µ¼Èëjavabean°ü
<% request.setCharacterEncoding("GBK")%>  //postÌá½»µÄÊý¾ÝÖгöÏÖÖÐÎÄʱ·ÀÖ¹³öÏÖÂÒÂë
<jsp:useBean id = "userid" class = "cn.javabean.User"/>   //ʹÓÃjavabeanÖеÄUserÀà
<jsp:setPropert property = "beanUserName" param = "FormUserName" name = "userid"/>
Ò»°ãÇé¿öÏÂjavabeanÖеÄ×Ö¶ÎÃûÓëǰ̨jspÖÐform±íµ¥µÄnameÊÇÒ»ÑùµÄ,¼ÙÈ綼Ϊusername£¬Ôò
¿ÉÒÔд³É£º<jsp:setPropert property = "username" name = "userid"/>
»òÕß:<jsp:setPropert property = "*" name = "userid"/> ±íʾËùÓеÄ×ֶΰüÀ¨ÆäËûµÄÈç“ÃÜÂ딵ÈÃû×Ö¶¼ÊÇÓëjavabeanÖеÄ×Ö¶ÎÃûÏà¶ÔÓ¦µÄ¡£
»ñÈ¡²ÎÊýÖµ£º
Óû§Ãû£º<%= userid.getBeanUserName()%> »òÕß<jsp:getPropert property = "beanUserName" name = "userid">


Ïà¹ØÎĵµ£º

ÔÚJSPÎļþÉϲ»ÄÜÕýȷʹÓñêÇ©¿â

1¡¢ ÔÚJSPÎļþÉÏʹÓñêÇ©¿â
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
ʱ³öÏÖÎÊÌ⣬´íÎóÐÅÏ¢ÈçÏ£º
he absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar fil ......

JSP±Ê¼Ç

JSPÔªËØ°üÀ¨£º1¡¢½Å±¾ÔªËØ£¨ÓïÑÔΪJava£¬Ê¹ÓÃJava´úÂë¹æ·¶¡£ÆäÖÐ<%!ÉùÃ÷£¨±äÁ¿¡¢·½·¨£©%><%=±í´ïʽԪËØ%><%³ÌÐò´úÂë%>£©
2¡¢Ö¸ÁîÔªËØ£ºÖ¸¶¨ÍøÒ³ÖеÄÖ¸ÁîÈçºÎ±»Ö´ÐУ¬°üÀ¨pageºÍinclude¡£
3¡¢¶¯×÷ÔªËØ£ºÁ¬½ÓÒªÓõÄ×é¼þ£¬ÈçJavaBean(useBean¡¢get/setProperty£©£¬»¹ÓÐparam¡¢forward¡¢include¡£
include ......

myeclipse²¿ÊðwebÏîÄ¿ ÎÞjsp Ö»ÓÐlib

ͨ¹ýServerÊÓͼ²¿ÊðwebÏîĿʱ£¬ÓÐʱ»á·¢ÏÖ£¬tomcatµÄ webappsĿ¼Ï£¬ÏîÄ¿Îļþ¼ÐÖУ¬Ö»ÓÐweb-infÎļþ¼Ð£¬²¢ÇÒÀïÃæÖ»ÓÐlibÎļþ¼Ð£¬Õâʱ£¬Ö»Òª½øÈë¹¹½¨Â·¾¶´°¿Ú£¬Ñ¡ÔñsourceÑ¡Ï£¬È»ºó½«³ýÁËsrcÍâµÄÆäËûɾ³ýµô£¬´Óв¿ÊðÒ»ÏÂÏîÄ¿¾Í¿ÉÒÔÁË£¬×îºóֻʣÏÂsrcÎļþ¼Ð£¬O(¡É_¡É)O~²»ÖªµÀÈçºÎ´«Í¼Æ¬£¬ËùÒÔ¡­.. ......

Servlet/JSPѧϰ±Ê¼Ç(4) ServletÈëÃÅ

½éÉÜÍ깤¾ßºÍ»ù±¾¸ÅÄÏÖÔÚÖÕÓÚ¿ªÊ¼½éÉÜServletµÄ±àд·½·¨ÁË¡£ÎªÁ˱ãÓÚÀí½â£¬ÎÒÃǽ«²ÉÓÃeclipse+Lomboz×÷Ϊ¿ª·¢»·¾³£¬Ò»ÇеIJÙ×÷¶¼¿ÉÒÔÔÚeclipseÖÐÍê³É¡£Èç¹ûÄ㻹ûÓа²×°ºÃLomboz£¬Çë²Î¿¼Ç°¼¸ÆªÎÄÕÂÅäÖúû·¾³¡£
tomcatºÍeclipseµÄ°²×°
»ù´¡ÖªÊ¶
Lomboz½éÉÜ+°²×°·½·¨
ÎÒÃǽ«½¨Á¢Ò»¸öÃûΪ com.idv2.learnjsp µÄ°ü£¬Ó ......

JFreeChartÔÚJSPÖеÄÓ¦ÓÃʵÀý

    JFreeChart ÊÇÒ»¸ö¿ªÔ´µÄ JAVA ÏîÄ¿£¬ËüÖ÷ÒªÓÃÀ´¿ª·¢¸÷ÖÖ¸÷ÑùµÄͼ±í£¬ÕâЩͼ±í°üÀ¨£º±ýͼ¡¢Öù״ͼ ( ÆÕͨÖù״ͼÒÔ¼°¶ÑÕ»Öù״ͼ ) ¡¢Ïßͼ¡¢ÇøÓòͼ¡¢·Ö²¼Í¼¡¢»ìºÏͼ¡¢¸ÊÌØͼÒÔ¼°Ò»Ð©ÒDZíÅ̵ȵȡ£ÔÚÕâЩ²»Í¬Ê½ÑùµÄͼ±íÉÏ¿ÉÒÔÂú×ãÄ¿Ç°ÉÌҵϵͳµÄÒªÇó¡£ JFreeChart ÊÇÒ»ÖÖ»ùÓÚ JAVA ÓïÑÔµÄͼ±í¿ª·¢¼¼Êõ¡£ JFr ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ