jspÉÏ´«×é¼þʹÓúͽéÉÜ
jspʹÓÃ×é¼þ½øÐÐÎļþÉÏ´«
WEBÎļþÉÏ´«¿ÉÄÜÊÇÍøÕ¾½¨ÉèÖÐ×î³£ÓõŦÄÜÖ®Ò»£¬ÎÒÔÚÏîÄ¿¿ª·¢Öм¸ºõ¶¼ÐèҪʵÏÖÎļþÉÏ´«¹¦ÄÜ£®Ç°¶Îʱ¼ä×Ô¼ºËѼ¯ÁËһЩÉÏ´«×é¼þ£®ÕâƪÎÄÕÂÖн«½éÉÜÕâЩ×é¼þµÄʹÓ÷½·¨£¬²¢ÇұȽϸ÷×ÔµÄÓÅÁÓ£®
Ò»£¬smartupload×é¼þ£®
ÎÒÏëÖ»Òª×ö¸öÎļþÉÏ´«µÄÅóÓѶ¼ÖªµÀÕâ¸ö×é¼þ£¬ÎÒÈÏʶµÄÈËÖÐʹÓÃ×î¶àµÄÒ²ÊÇËü£¡ÎÒ¸Õµ½¹«Ë¾µÄʱºò£¬¹«Ë¾Ò²Ê¹ÓõÄsmartupload,Õâ¸ö×é¼þÉÏ´«Ïà¶Ô½ÏСµÄÎļþʱÊǸö²»´íµÄÑ¡Ôñ£®ÏÂÃæ¸ø³ö¸öʹÓõÄÀý×Ó£º
¡¡¡¡
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<%@ page import="com.jspsmart.upload.*" %>
<%
//ʵÀý»¯ÉÏÔØbean
SmartUpload mySmartUpload=new SmartUpload();
//³õʼ»¯
mySmartUpload.initialize(pageContext);
//ÉèÖÃÉÏÔصÄ×î´óÖµ,×¢Òâ:Èç¹ûÕâÀïÉèÖùý´ó»á³öÏÖÎÊÌâ!
mySmartUpload.setMaxFileSize(500 * 1024*1024);
//ÉÏÔØÎļþ
mySmartUpload.upload();
//Ñ»·È¡µÃËùÓÐÉÏÔصÄÎļþ
for (int i=0;i<mySmartUpload.getFiles().getCount();i++){
//È¡µÃÉÏÔصÄÎļþ
com.jspsmart.upload.File myFile = mySmartUpload.getFiles().getFile(i);
if (!myFile.isMissing())
{
//È¡µÃÉÏÔصÄÎļþµÄÎļþÃû
String myFileName=myFile.getFileName();
//È¡µÃ²»´øºó׺µÄÎļþÃû
String suffix=myFileName.substring(0,myFileName.lastIndexOf('.'));
//È¡µÃºó׺Ãû
String ext= mySmartUpload.getFiles().getFile(0).getFileExt();
//È¡µÃÎļþµÄ´óС
int fileSize=myFile.getSize();
//±£´æ·¾¶
String aa=getServletContext().getRealPath("/")+"jsp\\";
String trace=aa+myFileName;
//È¡µÃ±ðµÄ²ÎÊý
String explain=(String)mySmartUpload.getRequest().getParameter("text");
&nb
Ïà¹ØÎĵµ£º
1£¬DateTimeÀàÐÍÊý×Ö
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
µ±Ç°Ê±¼äSystem.DateTimeµÄ=ÐÂSystem.DateTimeµÄ£¨£©;
1.1Сʱ·ÖÖÓµ±Ç°ÈÕÆÚÃ룬µ±Ç°Ê±¼ä= System.DateTime.Now;
1.2¼ì²é±¾Äê¶ÈÁ®ÕþÄê= currentTime.Year;
1.3µ±Ç°Ô·ÝÁ®Õþ¸öÔÂ= currentTime.Month;
1,4²ÉÈ¡µ±ÌìÁ®ÕþÌì= currentTime.Day;&n ......
jspÒ³ÃæʹÓÃstruts2µÄproperty±êÇ©Êä³öÈçÏÂÄÚÈÝ
<s:property value="detailinfo"/> ÆäÖУ¬detailinfo="<strong>abc</strong>"£»
ºÃÏñûÊ£¬ÎÊÌâ³öÏÖÁË£¬ÔÚjspÒ³ÃæÉÏÏÔʾ³öÁË<strong>abc</strong>
Ò»¿´Ò³ÃæÔ´Â룬·¢ÏÖ£¬Ô´´úÂëÖÐÒѾ±ä³ÉÁË
< strong&a ......
JSPÐÂÎÅ·¢²¼ÏµÍ³androidÐж¯Íø
´ËÍøÕ¾µÄÑÝʾµØַΪ:http://www.androidgo.cn
²âÊÔÍøÖ·: http://ja00028.j01.netjsp.com
ÏÂÔصØÖ·::http://download.csdn.net/source/1653791
¼¼ÊõʵÏÖ:²ÉÓÃJSTL±êÇ©,»ùÓÚservlet,jdbc¿ª·¢¡£Ê¹ÓÃmysqlÊý¾Ý¿â¡£
Éè¼ÆÓÅÊÆ:Ò»Çм¼ÊõʹÓÃ×îµ×²ãµÄ£¬Ã»ÓÐʹÓÃssh¿ò¼Ü£¬¿ÉÒÔÔÚÈκιúÄÚµÄjs ......
ÔËÐÐ×Ô¼ºÅäÖõÄwebÓ¦Óã¬ÍùÍùÖ»ÄÜ¿´¼ûweblogic±àÒëÖ®ºóµÄclassÎļþ¡£¶ø¿´²»¼û±àÒëÇ°µÄjavaµÄÎļþ¡£ÎªÁ˵÷ÊÔ·½±ã£¬ÎÒÃÇÓÐʱºòÊÇÏë¿´±àÒëÇ°µÄjavaÎļþ¡£
ÔÚweblogic.xmlÖмÓÈë
<jsp-descriptor>
<jsp-param>
<param-name>keepgenerated</param-name>
<param-value>true</par ......
Äãʱ³£±»¿Í»§±§Ô¹JSPÒ³ÃæÏìÓ¦ËٶȺÜÂýÂð£¿ÄãÏë¹ýµ±¿Í»§·ÃÎÊ´ÎÊý¾çÔöʱ£¬ÄãµÄWEBÓ¦ÓÃÄܳÐÊÜÈÕÒæÔö¼ÓµÄ·ÃÎÊÁ¿Âð£¿
±¾ÎĽ²ÊöÁ˵÷ÕûJSPºÍservletµÄһЩ·Ç³£ÊµÓõķ½·¨£¬Ëü¿ÉʹÄãµÄservletºÍJSPÒ³ÃæÏìÓ¦¸ü¿ì£¬À©Õ¹ÐÔ¸üÇ¿¡£¶øÇÒÔÚÓû§ÊýÔö¼ÓµÄÇé¿öÏ£¬ÏµÍ³¸ºÔØ»á³ÊÏÖ³öƽ»¬Éϳ¤µÄÇ÷ÊÆ¡£ÔÚ±¾ÎÄÖ ......