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

jspµ¼³öword ¼°mht תÂëÎÊÌâ

×î½ü×öÁËÒ»¸ö×ʷѲéѯģ¿é£¬ÀïÃæÉæ¼°½«×Ê·ÑÐÅÏ¢µ¼³öWordÎĵµºÍExcelÎĵµ£¬
ÏÈ˵˵µ¼³öWordÎĵµ£º
Æäʵ¾ÍÊÇ°ÑÏìÓ¦µÄÀàÐÍÉèΪapplication/msword,È»ºó°ÑÄÚÈÝÊä³öµ½Õâ¸öÎļþ¾ÍÐÐÁË
µÚÒ»²½£º
ÏÈÔÚ×ÀÃæÉÏн¨Ò»¸öwordÎĵµ,Ë«»÷´ò¿ª£¬È»ºóÁí´æΪ.htmÎļþ£¬»á²úÉúÒ»¸öÒÔ.htm½áβµÄÎļþ
µÚ¶þ²½£º
°Ñ.htmÎļþÀ©Õ¹Ãû¸ÄΪ.jspÎļþ,´ËʱËü¾ÍÊÇÒ»¸öÓÐwordÅÅ°æ¸ñʽµÄjspÎļþÁË£¬
È»ºóÔÚÕâ¸öÎļþÇ°¼ÓÉÏ£º<%@ page contentType="application/msword;charset=gbk"%>
ÔÙÒýÈëÆäËûÏà¹ØµÄÀà
µÚÈý²½£º°ÑjspÎļþÖУ¬ÐèÒª¶¯Ì¬ÏÔʾµÄ¶«Î÷¸Ä³ÉΪjava´úÂë¾ÍÐÐÁË£¬Í¨³£¾Í»á¶ÔÒ»¸ö¼¯ºÏ»òÖ±½Ó¾ÍÊǽá¹û¼¯½øÐбéÀú
È磺·ÃÎÊ
http://localhost:8080/jxtelecom/exportWord.jsp
³öÏÖ£º
²»Ö§³Ö£¬µ¼³öÖ»¶ÁÎļþ£¬Èç¹ûË­½â¾öÁË£¬Çë¸øÎÒÁôÑÔ£¬Ð»Ð»¡£
²¹³ä£º½â¾öÂÒÂëÎÊÌâ¡£
ÔÚmhtÎļþÖУ¬¿ÉÒÔ¿´µ½ºº×ֵıàÂë±äÁË£¬Èç“Öйú”±äΪ“&#20013;&#22269;”ÕâÖÖÆäʵ ÊÇunicodeÂëµÄ10½øÖƱíʾ£¬ÎÒÃÇÔÚjavaÖÐÒ»°ã¿´µ½µÄunicodeÂ붼ÊÇ16½øÖƵġ£Ö÷Ҫд¸ö10½øÖÆunicodeºÍ16½øÖÆunicodeת»»³ÌÐò£¬ÒÔºó¿ÉÒԲο¼Ò»Ï£¬Õâ¸ö¶ÔÓÚÕâ´ÎÏîÄ¿ÖвéѯÊý¾Ý²¢¸ù¾ÝÄ£°åµ¼³öµ½wordÖУ¬½â¾öÁ˼¸ÖÜÀ´µÄÂÒÂëÎÊÌâ¡£ public class TestUnicode {
 /**
  * ¶þÆÚµ¼³öwordÎĵµ×¨ÓÃתÂë·½·¨
  * ·½·¨ËµÃ÷£º°ÑÖÐÎÄ ×ªÎª mhtרÓÃµÄ uncode 10½øÖƱàÂë
  * @author peijianwen
  * @since 2009-12-01
  * @return String
  */
 public static String convertUncode10(String s) {
  String conStr = "";
  //  ×ªÂëuncode 10½øÖÆ        
  for(int i = 0;i<s.length();i++){
   char a  = s.charAt(i);
   conStr += "&#"+ (int)a+";";   //½«ÖÐÎÄת³É10½øÖƵıíʾ
  }
  return conStr;
 }   
 public static void main(String[] args) {
    //½«ÖÐÎÄת³É16½øÖƵıíʾ
    System.out.println("\u" + Integer.toHexString('ÖÐ'));    //“\u4e2d”
    System.out.println("\u" + Integer.toHexString('ÖÐ' & 0xffff));  &nb


Ïà¹ØÎĵµ£º

JSP Standard Tag Libraries ʵ¼ùÀí½â

 ÔÚ±¾ÆªÎÄÕÂÖÐ,ÎÒÃǽ«»áÉîÈëÁ˽âÔÚ²»Í¬µÄTag LibraryÃèÊö·û(Tag Library Descriptors:TLDs)ÖÐʹÓø÷ÖÖ²»Í¬µÄtagµÄÇé¿ö.ÎÒÃǽ«»áÒÀ´ÎÑо¿ Ìõ¼þ¡¢Ñ­»·¡¢URL¡¢U18N¡¢XMLµÈtagµÄÓ÷¨¡£ÒÔ´ËÀ´Ìá¸ßÄã¶ÔJSTLµÄÈÏʶºÍÓ¦ÓÃÄÜÁ¦,ÔÚÔĶÁ±¾ÎÄÇ°£¬ÄãÓ¦¸Ã¶Ô JSP Tag LibÓÐËùÁ˽⣬²¢ÇåÎúÓйØJSTL£¨JSP Standard Tag Libraries£©µÄ»ù± ......

²»¼ä¶ÏÑ­»·¹ö¶¯Í¼Æ¬£¬jspÍøÒ³´úÂë

<html>
 <head>
  <title>marquee</title>
  <style>
   #marq {
    width:500px;
    height:100px;
    border:1px solid red;
    overflow:hidden;
   }
   #mar ......

JSPÖÐ404´íÎóµÄ½â¾ö

 404´íÎóÊÇʲôʱºò²úÉúµÄÄØ£¿µ±ÎÒÃÇͨ¹ýä¯ÀÀÆ÷ÇëÇó·þÎñÆ÷ÉϵÄij¸ö×ÊÔ´µÄʱºò£¬¿ÉÄÜÊÇJSP£¬Ò²¿ÉÄÜÊÇServlet£¬Èç¹ûÒª·ÃÎʵÄ×ÊÔ´²»´æÔÚ£¬¾Í»á²úÉú404´íÎó£¬404´íÎó¿ÉÄÜÊÇÓ¦Óñ¾ÉíµÄÎÊÌ⣬ÀýÈçûÓÐÕý³£²¿Êð¡¢Ãû×Öд´íÁË£¬Ò²¿ÉÄÜÊÇÎļþµÄÎÊÌ⣬JSPÎļþ²»´æÔÚ¡¢Ãû×Ö´íÎ󣬻òÕßServleûÓÐÅäÖá£
¸ù¾ÝÕâЩÇé¿ö£¬404´íÎóµÄ½â¾ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ