jsp³£Ê¶£¬²»¶Ï¸üÐÂÖÐ...
CGI¾ÍÊÇweb·þÎñÆ÷¸¨Öú³ÌÐò£¬ºÍservletÊÇÒ»¸ö×÷Óá£
----jspÓÐʲô-----
------------------------------------------------------
jsp¿ÉÒÔ°üÀ¨Ê²Ã´£º
1¡¢jsp½Å±¾£¨³ÌÐòƬ¶Î£©£º
<% ... %>
2¡¢jsp±í´ïʽ£º
<%= ... %>
3¡¢jsp3ÖÖÖ¸Á
<%@ page attribute="xxx" %>
<%@ taglib attribute="xxx"%>
<%@ include attribute="xxx"%>
4¡¢jspÄ£°åÎı¾£¨»ù±¾html£©£ºÔÚJSPÀ±ê×¼µÄhtml³ÉΪģ°åÎı¾¡£
5¡¢jspÉùÃ÷£º
6¡¢jspÒþʽ¶ÔÏó£º
ps:ĬÈÏÇé¿öÏÂjspÎļþÖеÄÄ£°åÎı¾ÎªhtmlÎı¾£¬Èç¹ûͨ¹ý<%@ page contentType="text/plain" %>Óï¾ä°ÑÏìÓ¦ÕýÎÄÀàÐÍÉèΪ"text/plain",ÄÇôjspÎı¾ÖеÄÄ£°åÎı¾Îª´¿Îı¾¡£
ÕâÑùÒ»À´jsp»á°ÑhtmlÔ´Âë·¢Ë͵½¿Í»§¶Ë¡£ÓÃopera·ÃÎʵõ½ÊÇÔ´Â룬ÓÃieû±ä»¯....
-------------------------------------------------------
---serlvet jspÊÇʲô£¿-------
-------------------------------------------------------
servletºÍjsp¶¼ÊÇʹÓÃioÁ÷½«html´úÂë·¢Ë͵½¿Í»§¶Ë¡£
ÔÚservletÀïÒ»ÇкÜÃ÷ÏÔ¡£¶øjspÒ²²»¹ýÊÇÈÃÈÝÆ÷À´¶ÁÈ¡jsp£¬½«Ìض¨µÄ±ê¼Ç(jspÀïµÄ±ê¼Ç)½øÐнâÎö´¦Àí(Èç¹ûÊÇhtmlÎı¾Ö±½Ó¶Á£©£¬È»ºóÔÚ·¢Ë͵½¿Í»§¶Ë¡£
ÇëÇóת·¢£¬²»¹ýÊÇ·½·¨µÄµ÷Óá£
ÖØ¶¨ÏòÊôÓÚÐÒéµÄ¶«Î÷¡£302
¸ãÃ÷°×ÁË£¬Ò»Çж¼Ã»ÓÐÄÇôÄѶ®£¡Ò»Çж¼ÊÇÐÒ飬һÇж¼ÊÇsocket°É¡£
--------------------------------------------------------
---Òþʽ¶ÔÏó---
--------------------------------------------------------
Òþʽ¶ÔÏóÊÇÔõô»ØÊ£¿¾¿¾¹Ôõô»ØÊ£¿
ÊÇÕâÑùµÄ¡£ÈÝÆ÷»á°Ñjsp±àÒëΪservlet¡£¶øÎÒÃÇÖªµÀÎÒÃÇÔÚ±àдservletµÄʱºò»á±àдÏàÓ¦µÄdoPostºÍdoGet·½·¨£¬»òÕßÊÇservice·½·¨¡£
ÈÝÆ÷°Ñjsp±àÒëΪservlet£¬ÔÚÄǸöservletÀï¾ÍʵÏÖÁËservice·½·¨¡£¶øÒþʽ±äÁ¿Ò²¾ÍÊÇÔÚÄǸöservice·½·¨ÖУ¬¶¨ÒåºÃµÄÁË¡£
ÕÒµ½Ò»¸öjsp±àÒëºÃµÄservletÀà¿´ÏÂËüµÄservice·½·¨ÖпªÍ·£º
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_
Ïà¹ØÎĵµ£º
ǰ¼¸Ì죬ºþÄÏSEOÔÚÓÃjspдһ¸öÆóÒµÕ¾³ÌÐòµÄʱºò£¬ÒòΪҪ²Î¼ÓÏîÄ¿´ð±ç¾ºÑ¡£¬ËùÒÔ¾ÍÏëΪ×Ô¼ºÐ´µÄ³ÌÐò¸ã¼¸¸öÁÁµã£¬ÒòΪ¸ãSEO¾ÃÁË£¬²»×Ô¾õ¾Í»áÏ뵽α¾²Ì¬£¬µ«ÊÇÔڰٶȲéÁËÒ»¸öÏÂÎ磬ֻ²éµ½ÁËurlrewrite¼Ü°üµÄÏÂÔØµØ·½£¬ºÍ¼ÜÉè·½ÃæµÄÎÄÕ£¬²¢Ã»ÓÐjsp(JAVA)α¾²Ì¬µÄ¾ßÌå²Ù×÷ʾ·¶£¬ÓеÄÒ²Ö»ÊÇ£¬µ¥Ò³ÃæµÄα¾²Ì¬µÄд·¨£¬ÕâÀïÎÒ¾ÍÖØÍ· ......
ÒÔǰÓÐÌáµ½¹ýÂÒÂëÎÊÌ⣬×î½üÔÚʹÓÃwindow.openʱÓÖ³öÏÖ´ËÀàÎÊÌ⣬ÏÖ½â¾öÈçÏ£º
1£ºÊ¹ÓÃencodeURIComponentº¯Êý¶Ô²ÎÊý½øÐд¦Àí£¬ÀýÈ磺window.open("html.jsp?name=" + encodeUrlComponent(value)));
2£ºÐÞ¸Ätomcat·þÎñÆ÷µÄserver.xmlÎļþÌí¼Ó£ºuseBodyEncodingForURI="true"»òÕß
URIEncoding=" ......
ÍøÒ³»º´æµÄ×÷ÓÃÊÇʲô£¿Ó¦¸ÃºÜÖØÒª¡£µ«ÊÇÎÒÃÇÔÚ¿ª·¢ÍøÂçÓ¦ÓõÄʱºò£¬ÍøÒ³»º´æ×ÜÊǸøÎÒÃÇÒ»ÖÖĪÃûµÄ·³ÄÕ¡£ÓÚÊǼ¸ºõÿһ¸ö¿ª·¢Õß¶¼ÊÔͼ½â¾ö¹ýÕâ¸öÎÊÌâ¡£µ±È»£¬ÎÒÒ²²»ÊǽñÌì²Å×ÅÊÖ½â¾öÕâ¸öÎÊÌâ¡£µ«ÊǽñÌìһʱÐÄѪÀ´³±£¬Ð´Ò»Æª£¬¼Ç¼һÏÂÓõ½µÄ·½·¨¡£
1.½ûÖ¹¿Í»§¶Ë»º´æÒªÔÚ<head>ÖмÓÈëÀàËÆÈçÏÂÄÚÈÝ(ÎÒµ±È»»¹Ã»Ó ......
×î½üÔÚ×Ô¼º×öµÄÏîÄ¿ÖÐÐèÒªÓõ½ÔÚÏß±à¼Æ÷,ÔÚÍøÉÏËÑÁËÏ£¬·¢ÏÖÁËckeditor£¬µ±È»ÍøÉÏÓкü¸ÖÖÔÚÏß±à¼Æ÷£¬²»ÖªµÀΪʲôѡÔñÁËckeditor,±¾À´´òËãÓÃFckeditorµÄ£¬µ«ÊÇ¿´µ½ÍøÉÏ»¹ÐèÒªµ¼ÈëºÃ¼¸¸öJAR°ü£¬»¹Òª½øÐÐÒ»¶ÑÅäÖã¬ÓеãÂé·³£¬±¾À´ÏîÄ¿ÖÐÒ²¾ÍÓÃһϣ¬»¹ÒªÄÇôÂé·³µØÈ¥ÅäÖá£
ÓÚÊÇÈ¥ckeditorÍøÕ¾ÏÂÔØÁË×îа汾µÄckeditor£¬ ......
JSP¹²ÓÐÒÔÏÂ9ÖÖ»ù±¾ÄÚÖÃ×é¼þ£¨¿ÉÓëASPµÄ6ÖÖÄÚ²¿×é¼þÏà¶ÔÓ¦£©£º
¡¡1.request Óû§¶ËÇëÇ󣬴ËÇëÇó»á°üº¬À´×ÔGET/POSTÇëÇóµÄ²ÎÊý¡£
2. response ÍøÒ³´«»ØÓû§¶ËµÄ»ØÓ¦ ¡£
3.pageContext ÍøÒ³µÄÊôÐÔÊÇÔÚÕâÀï¹ÜÀí ¡£
4.session ÓëÇëÇóÓйصĻỰÆÚ¡£
5.ap ......