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

JavaÏà¶Ô·¾¶/¾ø¶Ô·¾¶×ܽá(ת£©

1.»ù±¾¸ÅÄîµÄÀí½â
¾ø¶Ô·¾¶£º¾ø¶Ô·¾¶¾ÍÊÇÄãµÄÖ÷Ò³ÉϵÄÎļþ»òĿ¼ÔÚÓ²ÅÌÉÏÕæÕýµÄ·¾¶£¬(URLºÍÎïÀí·¾¶)ÀýÈ磺
C:xyz est.txt ´ú±íÁËtest.txtÎļþµÄ¾ø¶Ô·¾¶¡£http://www.sun.com/index.htmÒ²´ú±íÁËÒ»¸öURL¾ø¶Ô·¾¶¡£
Ïà¶Ô·¾¶£ºÏà¶ÔÓëij¸ö»ù׼Ŀ¼µÄ·¾¶¡£°üº¬WebµÄÏà¶Ô·¾¶£¨HTMLÖеÄÏà¶ÔĿ¼£©£¬ÀýÈ磺ÔÚ
ServletÖУ¬"/"´ú±íWebÓ¦ÓõĸúĿ¼¡£ºÍÎïÀí·¾¶µÄÏà¶Ô±íʾ¡£ÀýÈ磺"./" ´ú±íµ±Ç°Ä¿Â¼,"../"´ú±íÉϼ¶Ä¿Â¼¡£ÕâÖÖÀàËƵıíʾ£¬Ò²ÊÇÊôÓÚÏà¶Ô·¾¶¡£
ÁíÍâ¹ØÓÚURI£¬URL,URNµÈÄÚÈÝ£¬Çë²Î¿¼RFCÏà¹ØÎĵµ±ê×¼¡£
RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax,
(http://www.ietf.org/rfc/rfc2396.txt)
2.¹ØÓÚJSP/ServletÖеÄÏà¶Ô·¾¶ºÍ¾ø¶Ô·¾¶¡£
2.1·þÎñÆ÷¶ËµÄµØÖ·
·þÎñÆ÷¶ËµÄÏà¶ÔµØÖ·Ö¸µÄÊÇÏà¶ÔÓÚÄãµÄwebÓ¦ÓõĵØÖ·£¬Õâ¸öµØÖ·ÊÇÔÚ·þÎñÆ÷¶Ë½âÎöµÄ£¨²»Í¬ÓÚhtmlºÍjavascriptÖеÄÏà¶ÔµØÖ·£¬ËûÃÇÊÇÓÉ¿Í»§¶Ëä¯ÀÀÆ÷½âÎöµÄ£©Ò²¾ÍÊÇ˵ÕâʱºòÔÚjspºÍservletÖеÄÏà¶ÔµØÖ·Ó¦¸ÃÊÇÏà¶ÔÓÚÄãµÄwebÓ¦Ó㬼´Ïà¶ÔÓÚhttp: //192.168.0.1/webapp/µÄ¡£
ÆäÓõ½µÄµØ·½ÓУº
forward£ºservletÖеÄrequest.getRequestDispatcher(address);Õâ¸öaddressÊÇÔÚ·þÎñÆ÷¶Ë½âÎöµÄ£¬ËùÒÔ£¬ÄãÒªforwardµ½a.jspÓ¦¸ÃÕâôд£ºrequest.getRequestDispatcher(“/user/a.jsp”)Õâ¸ö/ Ïà¶ÔÓÚµ±Ç°µÄwebÓ¦ÓÃwebapp£¬Æä¾ø¶ÔµØÖ·¾ÍÊÇ£ºhttp://192.168.0.1/webapp/user/a.jsp¡£ sendRedirect£ºÔÚjspÖÐ<%response.sendRedirect("/rtccp/user/a.jsp");%>
2.22¡¢¿Í»§¶ËµÄµØÖ·
ËùÓеÄhtmlÒ³ÃæÖеÄÏà¶ÔµØÖ·¶¼ÊÇÏà¶ÔÓÚ·þÎñÆ÷¸ùĿ¼(http://192.168.0.1/)µÄ£¬¶ø²»ÊÇ(¸úĿ¼ÏµĸÃWebÓ¦ÓõÄĿ¼) http://192.168.0.1/webapp/µÄ¡£ HtmlÖеÄform±íµ¥µÄactionÊôÐԵĵØÖ·Ó¦¸ÃÊÇÏà¶ÔÓÚ·þÎñÆ÷¸ùĿ¼(http://192.168.0.1/)µÄ£¬ËùÒÔ£¬Èç¹ûÌá½»µ½a.jsp Ϊ£ºaction£½"/webapp/user/a.jsp"»òaction="<%=request.getContextPath()% >"/user/a.jsp£»
Ìá½»µ½servletΪactiom£½"/webapp/handleservlet" JavascriptÒ²ÊÇÔÚ¿Í»§¶Ë½âÎöµÄ£¬ËùÒÔÆäÏà¶Ô·¾¶ºÍform±íµ¥Ò»Ñù¡£
Òò´Ë£¬Ò»°ãÇé¿öÏ£¬ÔÚJSP/HTMLÒ³ÃæµÈÒýÓõÄCSS,Javascript.ActionµÈÊôÐÔÇ°Ãæ×îºÃ¶¼¼ÓÉÏ
<%=request.getContextPath()%>,ÒÔÈ·±£ËùÒýÓõÄÎļþ¶¼ÊôÓÚWebÓ¦ÓÃÖеÄĿ¼¡£ÁíÍ⣬Ӧ¸Ã¾¡Á¿±ÜÃâʹÓÃÀàËÆ".","./","../../"µÈÀàËƵÄÏà¶Ô¸ÃÎļþλÖõÄÏà¶Ô·¾¶£¬ÕâÑùµ±ÎļþÒƶ¯Ê±£¬ºÜÈÝÒ׳öÎÊÌâ¡£
3. JSP/Servl


Ïà¹ØÎĵµ£º

java·ºÐÍT.classµÄ»ñÈ¡

   ºÜÔç֮ǰд¹ýÀûÓ÷ºÐͺͷ´Éä»úÖƳéÏóDAO £¬¶ÔÆäÖлñÈ¡×ÓÀà·ºÐ͵ÄclassÒ»Ö±²»ÊǺÜÀí½â¡£¹Ø¼üµÄµØ·½ÊÇHibernateBaseDaoµÄ¹¹Ôì·½·¨ÖеÄ
Type genType = getClass().getGenericSuperclass();
Type[] params = ((ParameterizedType) genType).getActualTypeArguments();
entityClass = (Class)params[0] ......

JAVA£º°²È«Ö¤Êé ¹«Ô¿¼ÓÃÜ£¬Ë½Ô¿½âÃÜʾÀý³ÌÐò


import java.io.FileInputStream;
import java.security.KeyStore;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.cert.Certificate;
import java.security.cert.CertificateFactory;
import javax.crypto.Cipher;
// ¹«Ô¿¼ÓÃÜ£¬Ë½Ô¿½âÃÜʾÀý³ÌÐò
public class A {
& ......

µ¥Àýģʽ(Singleton) JavaʵÏÖ

    µ¥ÀýģʽµÄʵÏÖ·½Ê½ÓкܶàÖÖ£¬ÔÚÕâÀï½éÉÜ×î¼òµ¥µÄÁ½ÖÖ¡£
    µ¥ÀýģʽÄܹ»È·±£Ò»¸öÀàÖ»ÓÐÒ»¸öʵÀý£¨Õý³£Çé¿öÎÒÃÇ¿ÉÒÔnew³öÒ»¸öÀàµÄÎÞÊý¸öʵÀý£©£¬×ÔÐÐÌṩÕâ¸öʵÀý²¢ÏòÕû¸öϵͳÌṩÕâ¸öʵÀý¡£ÏÂÃæ½éÉܵ¥ÀýģʽµÄʵÏÖ·½·¨£º
    1. µ¥ÀýģʽÓÐÁ½ÖÖʵÏÖ·½Ê½£ºÒ»ÖÖÊǽ«Àൠ......

java·´Éä»úÖÆʾÀý(¶ÌÐŽÓÊÕת·¢ÊµÏÖ)

Ò».Êý¾Ý¿âÉè¼Æ
Éè¼ÆͳһµÄ¶ÌÐŽÓÊÕ,·¢Ë͵ÄÊý¾Ý´æ´¢±í:¶ÌÐŽÓÊÕ±íT_Sms_Incept,¶ÌÐÅ·¢ËͱíT_Sms_Send
/*==============================================================*/
/* Table: t_sms_incept                    ......

dzÎöJava·ºÐÍ

±íÃæÉÏ¿´ÆðÀ´£¬ÎÞÂÛÓï·¨»¹ÊÇÓ¦ÓõĻ·¾³£¨±ÈÈçÈÝÆ÷Àࣩ£¬·ºÐÍÀàÐÍ£¨»òÕß·ºÐÍ£©¶¼ÀàËÆÓÚ C++ ÖеÄÄ£°å¡£µ«ÊÇÕâÖÖÏàËÆÐÔ½öÏÞÓÚ±íÃ棬Java ÓïÑÔÖеķºÐÍ»ù±¾ÉÏÍêÈ«ÔÚ±àÒëÆ÷ÖÐʵÏÖ£¬ÓɱàÒëÆ÷Ö´ÐÐÀàÐͼì²éºÍÀàÐÍÍƶϣ¬È»ºóÉú³ÉÆÕͨµÄ·Ç·ºÐ͵Ä×Ö½ÚÂë¡£ÕâÖÖʵÏÖ¼¼Êõ³ÆΪ²Á³ý£¨erasure£©£¨±àÒëÆ÷ʹÓ÷ºÐÍÀàÐÍÐÅÏ¢±£Ö¤ÀàÐÍ°²È«£¬È»ºóÔ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ