Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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


Ïà¹ØÎĵµ£º

java£¨jsp)ʹÓÃMySqlÊý¾Ý¿â,ÖÐÎÄÂÒÂëµÄÍêÕû½â¾ö·½°¸

 java£¨jsp)ʹÓÃMySqlÊý¾Ý¿â,ÖÐÎÄÂÒÂëµÄÍêÕû½â¾ö·½°¸
mysqlÊÇÒ»¸öСÐ͵ĿªÔ´µÄÊý¾Ý¿â£¬ÓÃÀ´×ÔѧһЩ¼¼ÊõÊÇÊ®·Ö·½±ãµÄ¡£µ«Ê¹ÓÃmysql´æ´¢Êý¾Ý£¬Ò²»áÓöµ½Ò»Ð©·Ç³£¶ñÐĵÄÎÊÌ⣬È磺ÖÐÎÄÂÒÂëÎÊÌâ¡¢javaÇý¶¯³ÌÐòÎÞ·¨Ê¹ÓõÄÎÊÌ⣨ÒѾ­½â¾ö£¬Ïê¼û£ºhttp://hi.baidu.com/lauo1988/blog/item/ff0da655bd3e2eceb745ae0b.html)¡£ ......

MyEclipseÖÐ ÖÇÄÜÌáʾ JSP Ò³ÃæµÄhtml ±ê¼ÇÊôÐÔÖµ

²Ù×÷·½·¨£º windows------preferences----------ËÑË÷ html----------ÕÒµ½ html SourceÕâÏî---------
ÕÒµ½ content assist (¼ûÏÂͼ)------Prompt when these¡£¡£¡£¡£ºóÃæÓиöÊäÈë¿ò£¨ÀïÃæÓиöСÓںţ©½ô¸ú СÓںźóÃæÊäÈëÒ»¸ö     ¿Õ¸ñ¼ü   £¬-----------apply----------ok¡£
ÔÚhtmlÖÐ±à¼­Ê ......

ÈçºÎ½«Ò»¸öJspÍøÕ¾´ò°ü·¢²¼(·¢²¼ÎªWarÎļþ)

 ÍøÕ¾×öÍêºó£¬²¢²»ÊÇÖ±½Ó·Åµ½·þÎñÆ÷£¨Tomcat£©ÖÐÈ¥ÔËÐУ¬¶øÊÇÏȽ«Æä´ò°ü³ÉWarÎļþ£¬ÔÙ°ÑWarÎļþ·Åµ½·þÎñÆ÷ÖÐÈ¥ÔËÐУ¬ÄÇÑù¸ü·½±ã
ÄÇôÔõÑù½«Ò»¸öJspÍøÕ¾´ò°üÄØ£¿£¿£¿
 Ò».·½·¨Ò»
  ½øÈëcmdµ½dosÃüÁîÐÐÏ£¬½øÈëJspWeb(×¢ÒâÒª½øÈëJspWebĿ¼£¬¼´½øÈëÄãÒª´ò°üµÄÍøÕ¾µÄ¸ùĿ¼)
   ÔÙÏÂÒ»²½
  ......

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

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

Google·ÖÒ³¹¦ÄܵÄjsp±êǩʵÏÖ

 ÏÂÃæÊÇjsp´úÂë<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page import="com.yourcompany.struts.action.Student" %>
<%@ t ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ