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

linux java/jsp »ñȡϵͳµ±Ç°Ê±¼äÎÊÌâ

JSPÔ´´úÂë
 <%
   //»ñȡϵͳʱ¼ä
   //String ddate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime());
   TimeZone tz = TimeZone.getTimeZone("ETC/GMT-8"); 
    TimeZone.setDefault(tz);
    java.util.Date date = new java.util.Date();//»ñµÃϵͳʱ¼ä.
          String nowTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);//½«Ê±¼ä¸ñʽת»»³É·ûºÏTimestampÒªÇóµÄ¸ñʽ.
          //Timestamp goodsC_date = Timestamp.valueOf(nowTime);//°Ñʱ¼äת»»
   %>
ÔÚwindowsÏÂÔËÐпÉÒÔ
µ«ÍøÒ³´«µ½linux:CentOS5.3ϳöÎÊÌâ
²î°ËСʱ£¬ºóÀ´²é×ÊÁÏ£¬
¸ÄÓÃÒÔÏ´úÂ룺
 <%
   //»ñȡϵͳʱ¼ä
   //String ddate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime()); 
   //TimeZone tz = TimeZone.getTimeZone("ETC/GMT-8"); 
   TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai");
    TimeZone.setDefault(tz);
    java.util.Date date = new java.util.Date();//»ñµÃϵͳʱ¼ä.
          String nowTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);//½«Ê±¼ä¸ñʽת»»³É·ûºÏTimestampÒªÇóµÄ¸ñʽ.
          //Timestamp goodsC_date = Timestamp.valueOf(nowTime);//°Ñʱ¼äת»»
   %>
¾ÍÕý³£ÁË¡£
¸ù¾Ý×ÊÁÏ£¬²é¿´
/usr/share/zoneinfo
·¢ÏÖ£¬²»ÊÇETC¶øÊÇEtc£¬¹ÊÐÞÕý´úÂ룺
 <%
   //»ñȡϵͳʱ¼ä
   //String ddate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime());
   TimeZone tz = TimeZone.getTimeZone("Etc/GMT-8");
 //  TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai");
    TimeZone.setDefault(tz);
    java.util.Date date = new java.util.Date();//


Ïà¹ØÎĵµ£º

ÔÚÐéÄâ»úÖеÄlinuxÏ°²×°tomcatºÍ²¿ÊðÏîÄ¿

×î½üѧϰÁËÔÚlinuxϲ¿ÊðÏîÄ¿£¬Ð´Ð´Ðĵá£
1.°²×°ÐéÄâ»úºó£¬ÅäºÃÍøÂ磬ÇŽÓ×îÈÝÒ×Å䣬ֱ½ÓÔÚlinuxÏÂʹÓÃͬһ¸öÍø¶ÎµÄÈÎÒâipµØÖ·¼´¿É¡£Ë³±ã°ÑvmµÄ¼¸¸öÍøÂçµÄ·þÎñ¸øÍ£ÁË¡£
2.ºÜÖØÒªµÄÒ»µã£¬°ÑlinuxµÄ°²È«ÅäÖÃÉèÖúᣲ¢¿ªÆôsshd·þÎñ
3.ÏÂÔØwindowsÖÐÐèÒªÁ½¸ö¹¤¾ß£ºputtyfile_0.60cn.zip winscp403setupintl.exe
Ç°ÕßΪԶ³ ......

JSPÂÒÂëÎÊÌâÏà¹Ø

JSPÖгöÏÖÂÒÂ룬Ê×Ïȼì²éÒ»ÏÂpageEncodingºÍcontentTypeÁ½¸öÊôÐÔ£¬Á½¸öÊôÐÔµÄĬÈÏÖµ¶¼ÊÇISO-8859-1
pageEncodingÉèÖõÄÊDZàÒëJSPʱËùÓõıàÂ룬Èç¹ûÓÃĬÈϵıàÂë±àÒëÖÐÎÄ£¬ÄÇôÔÚJSP±àÒë½×¶ÎÒѾ­ÊÇÂÒÂëÁË¡£
contentTypeÉèÖõÄÊÇ·þÎñ¶Ë·¶Î§¸øä¯ÀÀÆ÷µÄÏÔʾ±àÂ룬ºÍÒ³ÃæÉÏÉèÖñàÂëÊÇÒ»ÑùµÄЧ¹û¡£ ......

JAVA EXCEL

ʹÓÃWindows²Ù×÷ϵͳµÄÅóÓѶÔExcel£¨µç×Ó±í¸ñ£©Ò»¶¨²»»áÄ°Éú£¬µ«ÊÇҪʹÓÃJavaÓïÑÔÀ´²Ù×ÝExcelÎļþ²¢²»ÊÇÒ»¼þÈÝÒ×µÄÊ¡£ÔÚWebÓ¦ÓÃÈÕÒæÊ¢ÐеĽñÌ죬ͨ¹ýWebÀ´²Ù×÷ExcelÎļþµÄÐèÇóÔ½À´Ô½Ç¿ÁÒ£¬Ä¿Ç°½ÏΪÁ÷ÐеIJÙ×÷ÊÇÔÚJSP»òServlet Öд´½¨Ò»¸öCSV £¨comma separated values£©Îļþ£¬²¢½«Õâ¸öÎļþÒÔMIME£¬text/csvÀàÐÍ·µ»Ø¸øä¯ÀÀÆ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ