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

JSPÔà»°¹ýÂËÆ÷µÄʵÏÖ

JSPÔà»°¹ýÂËÆ÷µÄʵÏÖ
²»¹ÜÊÇJSP»¹ÊÇServlet£¬ÆäFilter¹ýÂËÆ÷¶¼ÊÇÒ»¸ö¶«Î÷¡£ÒòΪJSPµÄ±¾ÖʾÍÊÇServlet£¬Ö»²»¹ýÊDZ»°ü×°ÁËһϣ¬³ÉÁ˱ê×¼£¬ÈÃWeb·þÎñÆ÷¶¼×ñÑ­Õâ¸ö±ê×¼À´½âÎö±àÒëÖ´ÐжøÒÑ¡£
ÒÔÏÂÑÝʾµÄ¾ÍÊÇÔÚJSPÖÐÈçºÎ¹ýÂËÔà»°£¨ServletµÄ´¦Àí·½Ê½Ò²²î²»¶à£©¡£
Ò»¡¢¹ýÂËÆ÷Àà
package com.filter;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
public class WordsFilter implements Filter {
              
               private Map< String, String>map = new HashMap< String, String>();
               // ¹ýÂËÆ÷µÄ³õʼ»¯
               public void init(FilterConfig config) throws ServletException {
                               String filePath = config.getInitParameter("filePath");
                               // ´ÓÅäÖÃÎļþÖÐÈ¡µÃÎļþµÄÏà¶Ô·¾¶
                               Servl


Ïà¹ØÎĵµ£º

JspÖÐFileUpload¿Ø¼þµÄʹÓÃ

       Ðí¾ÃûÓеǼ×Ô¼ºµÄУÄÚÍøÁË£¬½ñÌìµÇ¼ÁËһϣ¬ºöÈ»·¢ÏÖУÄÚµÄÉÏ´«ÕÕƬͦÓÐÒâ˼µÄ£¬ÓÚÊǺõ¾Í´ÓÍøÉÏÕÒÁËһϣ¬Ð£ÄÚÓ¦¸ÃÊÇʹÓÃjspдµÄ¡£ÔÚÍøÉÏÕÒµ½Á˸öFileUpload¿Ø¼þ£¬¿ÉÒԺܷ½±ãµÄÉÏ´«Îļþ¡£ÔÚÍøÉÏÕÒµ½Ò»ÆªÏêϸ½éÉÜÕâ¸ö¿Ø¼þʹÓõģ¬ÊÔÑéÁËһϣ¬¸ãÁ˺þòÅʵÏÖÏÖÔÚÕûÀí³öÀ´¡£
Ò»¡¢Ê× ......

ÈçºÎÔÚjspÖжÁÈ¡¿Í»§¶ËµÄexcelÎļþÖеÄÊý¾Ý

ÎÒÒªµ÷ÓÃJExcelApi   ¶ÁÈ¡Óû§ÔÚ¿Í»§¶ËÑ¡ÔñµÄExcelÖеÄÎļþÖеÄÊý¾Ý£¬  
  ÎÒÊÇÕâÑù×öµÄ£º  
    Ê×ÏÈ×öÒ»¸öÒ³ÃæupLoadExcel.jspÈÃÓû§Ñ¡Ôñ±¾µØµÄExcelÎļþ£¬ÎÒ¾ÍÊÇÓõÄÉÏ´«µÄÄǸöÒ³Ã棺  
      <!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD &nb ......

JSP+AJAX Ìí¼Ó¡¢É¾³ý¶àÑ¡¿ò

±¾ÀýÊDzÉÓÃJSP + Ajax + Îı¾À´ÑÝʾ¶àÑ¡¡¢È«Ñ¡£¬Ìí¼Ó¡¢É¾³ý¡¢¸üÐÂcheckbox¶àÑ¡¿òµÄЧ¹û£»³ä·ÖÕ¹ÏÖÁËÀûÓÃJavaScript¿ØÖÆHTML DOMÒÔ¼°ÀûÓÃXML http ´«µÝÊý¾Ý£¬ÀûÓÃJSP²Ù×÷Îı¾µÄЧ¹û¡£
¡¡¡¡1.JavaScript ÓÃÀ´¿ØÖÆÒ³ÃæÄÚÈݵÄÏÖʵÓëÔöɾЧ¹û£»
¡¡¡¡2.JSP×÷Ϊºǫ́£¬¶ÔÎı¾½øÐжÁÈ¡¡¢Ð´Èë¡¢¸üеȲÙ×÷£»
¡¡¡¡3.Îı¾¸ñʽÊÇÓÃÀ´´ ......

jsp/get/set/struts.xml´æÈ¡

get
jsp         url          ${param.serialID}
action    jsp          String commentId = ServletActionContext.getRequest().getParameter("commentId");
-- ......

½«jspÒ³ÃæÖÐtableµ¼³öµ½doc

<SCRIPT LANGUAGE="javascript">
       //Ö¸¶¨Ò³ÃæÇøÓòÄÚÈݵ¼ÈëWord
       function AllAreaWord() {
       var oWD = new ActiveXObject("Word.Application");
       var oDC = ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ