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

FCKeditor 2.5 jsp struts2

Ò».ÏÂÔØfckeditor-java-demo-2.5.war
           ÏÂÔصØÖ·£ºhttp://java.fckeditor.net/demo.html£¬²¿Êðµ½tomcatÏ£¬Æô¶¯ºó¾Í¿ÉÒÔ·ÃÎÊ´Ëdemo.
¶þ.jsp¼¯³É
           1. copy "fckeditor"Îļþ¼Ðµ½ÍøվĿ¼   ÎÒĿ¼½á¹¹Îª£ºmyweb/fckeditor  ,ÆäÖÐmywebΪ¹¤³ÌÖ÷Ŀ¼£¬¸´ÖÆfckeditor demo ÏÂweb.xmlÄÚÈݵ½×Ô¼º¹¤³Ìweb.xmlÖÐÈçÏ£º
....
<servlet>
  <servlet-name>ConnectorServlet</servlet-name>
  <servlet-class>
   net.fckeditor.connector.ConnectorServlet
  </servlet-class>
  <load-on-startup>1</load-on-startup>
 </servlet>
 <servlet-mapping>
  <servlet-name>ConnectorServlet</servlet-name>
  <!-- Do not wrap this line otherwise Glassfish will fail to load this file -->
  <url-pattern>/fckeditor/editor/filemanager/connectors/*</url-pattern>
 </servlet-mapping>
....
ÏÖÔÚ¿ÉÒԲο¼demoÖÐʵÀýµ÷Óá£
Èý.struts2ÉÏ´«ÎÊÌâ
Èô¹¤³ÌÖÐÓÐstruts2ÐèÐÞ¸Äweb.xmlÖÐstruts2Ïà¹ØÅäÖÃÈçÏ£º
 <filter>
  <filter-name>struts2</filter-name>
  <filter-class>
   org.apache.struts2.dispatcher.FilterDispatcher
  </filter-class>
 </filter>
 <filter-mapping>
  <filter-name>struts2</filter-name>
  <url-pattern>*.action</url-pattern>
 </filter-mapping>
 
OK£¬OVER¡£¡£¡£ 
 


Ïà¹ØÎĵµ£º

jspµ÷ÓÃlucene

ѧϰËÑË÷ÒýÇ棬£¬·¢¾õjspµ÷ÓÃjava´óÖÂÓÐ3ÖÖ·½·¨¡£
µÚÒ»ÖÖ£¬Ê¹ÓÃjavabean¡£ÀýÈç
<jsp:useBean id="mm" class="com.ReadComm" scope="page"> </jsp:useBean>
classÖÐÌîдclass·¾¶¡£
µÚ¶þÖÖ£¬Ö±½ÓimportÒýÓÃjavaÀà
±ÈÈ磺 <%@ page import="java.util.*"%>
°ÑÄãµÄÀà·Åµ½WEB-INF\classesÏ£¬ÒýµÃʱ ......

jspÖÐÔõôÁ¬½ÓexcelÊý¾Ý¿â

1.н¨Ò»¸öexcelÎļþ  Ãû×ÖËæ±ã  À©Õ¹Ãû .xls
2.µÚÒ»ÐÐÊDZíÍ·   дÉÏÁÐÃû  Èç id   pwd
ÏÂÃæ¾ÍÊÇдÊý¾ÝµÄµØ·½
Ñ¡ÖÐÒ»¶ÎÇøÓò   Èçͼ

²Ëµ¥   ²åÈë--Ãû³Æ--¶¨Òå
È¡¸öÃû×Ö   µãÌí¼Ó   Õâ¸öÃû×Ö¾ÍÊDZíÃû

3.ÉèÖÃÊý¾ÝÔ´
ϵͳDSN--Ìí¼Ó-- ......

JSP filter¹ýÂËÆ÷µÄ¹¦ÄܼòÒª½éÉÜ

filter¹¦ÄÜ.ËüʹÓû§¿ÉÒԸıäÒ»¸ö requestºÍÐÞ¸ÄÒ»¸öresponse. Filter ²»ÊÇÒ»¸öservlet,Ëü²»ÄܲúÉúÒ»¸öresponse,ËüÄܹ»ÔÚÒ»¸örequestµ½´ïservlet֮ǰԤ´¦Àírequest,Ò²¿ÉÒÔÔÚÀ뿪 servletʱ´¦Àíresponse.»»ÖÖ˵·¨,filterÆäʵÊÇÒ»¸ö¡±servlet chaining¡±(servlet Á´). Ò»¸öfilter °üÀ¨:
1. ÔÚservlet±»µ÷ÓÃ֮ǰ½Ø»ñ; ......

JSP»ñÈ¡ÕæʵIPµØÖ·




 
ÔÚJSPÀ»ñÈ¡¿Í»§¶ËµÄIPµØÖ·µÄ·½·¨ÊÇ£ºrequest.getRemoteAddr£¨£©£¬ÕâÖÖ·½·¨Ôڴ󲿷ÖÇé¿ö϶¼ÊÇÓÐЧµÄ¡£µ«ÊÇÔÚͨ¹ýÁË
Apache£¬SquidµÈ·´Ïò´úÀíÈí¼þ¾Í²»ÄÜ»ñÈ¡µ½¿Í»§¶ËµÄÕæʵIPµØÖ·ÁË¡£Èç¹ûʹÓÃÁË·´Ïò´úÀíÈí¼þ£¬ÓÃ
request.getRemoteAddr£¨£©·½·¨»ñÈ¡µÄIPµØÖ·ÊÇ£º127.0.0.1»ò
192.168.1.110£¬¶ø²¢²»ÊÇ¿ ......

MyEclipseÐÞ¸ÄÒ³ÃæÄ£°å£¨JSPºÍHTMLµÈ£©

 
MyEclipse:ÐÞ¸ÄMyEclipse¿ª·¢¹¤¾ßÖеÄÒ³ÃæÄ£°å£¨JSPºÍHTMLµÈ£©
1.ÓÃMyEclipse¹¤¾ß¿ª·¢WebÏîÄ¿£¬ÓÐÒ»¸öºÜÆÕ±éµÄÎÊÌ⣬¾ÍÊÇÔÚн¨Ò»¸öÒ³ÃæÎļþʱ£¬ÐèÒªÐÞ¸ÄpageEncodingÖµ£¬Ò³ÃæÖÐĬÈϵÄpageEncodingÖµÒ»°ãÊÇISO-8859-1¡£
2.Èç¹ûWebÏîÄ¿ÐèÒªÖ§³ÖÖÐÎÄ£¬ÄǾͱØÐë°ÑÄǸöISO-8859-1¸ø¸Äµô£¬»»³ÉÒÔϼ¸ÖÖ£ºUTF-8¡¢GB2312 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ