java web¿ª·¢ÖУ¬ÈçºÎ²é¿´JSPºÍServlet°æ±¾
java web¿ª·¢ÖУ¬ÈçºÎ²é¿´JSPºÍServlet°æ±¾
2008-12-10 09:00
ÎÒÃÇÔÚjava web¿ª·¢µÄ¹ý³ÌÖУ¬ÓÐʱÔÚ×ÊÁÏÉÏ¿ÉÄÜ»áÌáµ½»·¾³ËùÒªÖ§³ÖµÄJSP£¬Servlet°æ±¾¡£Èç¹û°æ±¾µÍ¾Í¿ÉÄܳöÏÖ²âÊÔ´íÎó¡£
·½·¨£º´ò¿ªtomcatµÄcommon\lib Ŀ¼Ï£¬ÓÐÁ½¸öJARÎļþ£º jsp-api.jar servlet-api.jar ¡£Èç¹ûûÓУ¬ÄÇ¿ÉÄÜÊÇÄãûÓÐÌí¼Ó½øÀ´¡£½âѹÕâÁ½¸öÎļþ£¬ÓüÇʱ¾·Ö±ð´ò¿ªMETA-INFϵÄMAINMEFT.MFÎļþ¡£
ÎÒµÄServlet°æ±¾ÊÇ£ºManifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.4.2_12-b03 (Sun Microsystems Inc.)
Name: javax/servlet/
Specification-Title: Java API for Servlets
Specification-Version: 2.4
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: javax.servlet
Implementation-Version: 2.4.public_draft
Implementation-Vendor: Apache Software Foundation
ÎÒµÄJSP°æ±¾ÊÇ£ºManifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.4.2_12-b03 (Sun Microsystems Inc.)
Name: javax/servlet/jsp/
Specification-Title: Java API for JavaServer Pages
Specification-Version: 2.0
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: javax.servlet.jsp
Implementation-Version: 2.0.public_draft
Implementation-Vendor: Apache Software Foundation
Ïà¹ØÎĵµ£º
private String smtpHost;
private String smtpUserName;
private String smtpPassword;
public void sendEmail(String fromAddress, List<String> toAddresses, List<String> ccAddresses,
String subject, String message) {
Properties props = new Properties();
props.put("mail.smtp.host", smt ......
×÷Ϊ¶ÔÏóµÄ´´½¨Ä£Ê½,µ¥Àýģʽȷ±£Ä³¸öÀàÖ»ÓÐÒ»¸öʵÀý£¬¶øÇÒ×ÔÐÐʵÀý»¯²¢ÏòÕû¸öϵͳÌṩÕâ¸öʵÀý¡£Õâ¸öÀà³ÆΪµ¥ÀýÀà¡£Óɶ¨Òå¿ÉÒÔ×ܽá³öµ¥ÀýģʽµÄÒªµãÓÐÈý¸ö£ºÒ»Êǵ¥ÀýÀàÖ»ÄÜÓÐÒ»¸öʵÀý£»¶þÊÇËü±ØÐë×ÔÐд´½¨Õâ¸öʵÀý£»ÈýÊÇËü±ØÐë×ÔÐÐÏòÕû¸öϵͳÌṩÕâ¸öʵÀý¡£
ÔÚ¼ÆËã»úϵͳÖУ¬Ï̳߳ء¢»º´æ¡¢ÈÕÖ ......
Compiling with the Java Compiler API
µ÷ÓÃJava±àÒëÆ÷API±àÒëJava
´ÓµÚÒ»Ì쿪ʼ,±ê×¼Javaƽ̨¾ÍȱÉÙÄܹ»±»µ÷ÓÃ,È¥²úÉúJava×Ö½ÚÂëµÄ±àÒëÆ÷½Ó¿Ú. ʹÓÃSunʵÏÖµÄƽ̨,Ò»¸öÓû§¿ÉÒÔͨ¹ý·Ç±ê×¼µÄ com.sun.tools.javac °üÖеÄMain class È¥±àÒëÄãµÄ´úÂë (Äã¿ÉÒÔÔÚlib×ÓĿ¼Ï嵀 tools.jar ÎļþÀïÕÒµ½Ëü). È»¶øÕâ¸ö° ......
Ç°ÑÔ
ÔÚʹÓÃÊý¾Ý¿âµÄ¹ý³ÌÖУ¬²»¿É±ÜÃâµÄÐèҪʹÓõ½·ÖÒ³µÄ¹¦ÄÜ£¬¿ÉÊÇJDBCµÄ¹æ·¶¶Ô´ËȴûÓкܺõĽâ¾ö¡£¶ÔÓÚÕâ¸öÐèÇóºÜ¶àÅóÓѶ¼ÓÐ×Ô¼ºµÄ½â¾ö·½°¸£¬±ÈÈçʹÓÃVectorµÈ¼¯ºÏÀàÏȱ£´æÈ¡³öµÄÊý¾ÝÔÙ·ÖÒ³¡£µ«ÕâÖÖ·½·¨µÄ¿ÉÓÃÐԺܲÓëJDBC±¾ÉíµÄ½Ó¿ÚÍêÈ«²»Í¬£¬¶Ô²»Í¬ÀàÐ͵Ä×ֶεÄÖ§³ÖÒ²²»ºÃ¡£ÕâÀïÌṩÁËÒ»ÖÖÓëJDBC¼æÈÝÐԷdz£ºÃµÄ·½°¸ ......
required ÊÇÊÇ·ñΪ±ØÑ¡ÊôÐÔ
rtexprvalueµÄÈ«³ÆÊÇ Run-time Expression Value£¬ ËüÓÃÓÚ±íʾÊÇ·ñ¿ÉÒÔʹÓÃJSP±í´ïʽ.
µ±ÔÚ<attribute>±êÇ©ÀïÖ¸¶¨<rtexprvalue>true</rtexprvalue>ʱ£¬ ±íʾ¸Ã×Ô¶¨Òå±êÇ©µÄijÊôÐÔµÄÖµ¿ÉÒÔÖ±½ÓÖ¸¶¨»òÕßͨ¹ý¶¯Ì¬¼ÆËãÖ¸¶¨, example as follow:
<sql:query var="result" & ......