ÇóJava web¿ª·¢ÃæÊÔÌâ - Java / Web ¿ª·¢
ѧϰ
1¡¢jspºÍservletµÄÇø±ð¡¢¹²Í¬µã¡¢¸÷×ÔÓ¦Óõķ¶Î§£¿£¿
JSPÊÇServlet¼¼ÊõµÄÀ©Õ¹£¬±¾ÖÊÉϾÍÊÇServletµÄ¼òÒ×·½Ê½¡£JSP±àÒëºóÊÇ¡°Ààservlet¡±¡£ServletºÍJSP×îÖ÷ÒªµÄ²»Í¬µãÔÚÓÚ£¬ServletµÄÓ¦ÓÃÂß¼ÊÇÔÚJavaÎļþÖУ¬²¢ÇÒÍêÈ«´Ó±íʾ²ãÖеÄHTMLÀï·ÖÀ뿪À´¡£¶øJSPµÄÇé¿öÊÇJavaºÍHTML¿ÉÒÔ×éºÏ³ÉÒ»¸öÀ©Õ¹ÃûΪ.jspµÄÎļþ¡£JSP²àÖØÓÚÊÓͼ£¬ServletÖ÷ÒªÓÃÓÚ¿ØÖÆÂß¼¡£ÔÚstruts¿ò¼ÜÖÐ,JSPλÓÚMVCÉè¼ÆÄ£Ê½µÄÊÓͼ²ã,¶øServletλÓÚ¿ØÖƲã.
2¡¢cookieºÍsessionµÄ×÷Óá¢Çø±ð¡¢Ó¦Ó÷¶Î§£¬sessionµÄ¹¤×÷ÔÀí£¿£¿£¿
Cookie:Ö÷ÒªÓÃÔÚ±£´æ¿Í»§¶Ë£¬ÆäÖµÔÚ¿Í»§¶ËÓë·þÎñ¶ËÖ®¼ä´«ËÍ£¬²»°²È«£¬´æ´¢µÄÊý¾ÝÁ¿ÓÐÏÞ¡£
Session:±£´æÔÚ·þÎñ¶Ë£¬Ã¿Ò»¸ösessionÔÚ·þÎñ¶ËÓÐÒ»¸ösessionID×÷Ò»¸ö±êʶ¡£´æ´¢µÄÊý¾ÝÁ¿´ó£¬°²È«ÐԸߡ£Õ¼Ó÷þÎñ¶ËµÄÄÚ´æ×ÊÔ´¡£
3¡¢jstlÊÇʲô£¿ÓŵãÓÐÄÄЩ£¿£¿
JSTL£¨JSP Standard¡¡Tag¡¡Library¡¡£¬JSP±ê×¼±êÇ©¿â)ÊÇÒ»¸ö²»¶ÏÍêÉÆµÄ¿ª·ÅÔ´´úÂëµÄJSP±êÇ©¿â£¬ÓÉËĸö¶¨ÖƱê¼Ç¿â£¨core¡¢format¡¢xml ºÍ sql£©ºÍÒ»¶ÔͨÓñê¼Ç¿âÑéÖ¤Æ÷£¨ScriptFreeTLV ºÍ PermittedTaglibsTLV£©×é³É¡£ÓŵãÓУº
1¡¢ ÔÚÓ¦ÓóÌÐò·þÎñÆ÷Ö®¼äÌṩÁËÒ»ÖµĽӿڣ¬×î´ó³ÌÐòµØÌá¸ßÁËWEBÓ¦ÓÃÔÚ¸÷Ó¦Ó÷þÎñÆ÷Ö®¼äµÄÒÆÖ²¡£
2¡¢ ¼ò»¯ÁËJSPºÍWEBÓ¦ÓóÌÐòµÄ¿ª·¢¡£
3¡¢ ÒÔÒ»ÖÖͳһµÄ·½Ê½¼õÉÙÁËJSPÖеÄscriptlet´úÂëÊýÁ¿£¬¿ÉÒԴﵽûÓÐÈκÎscriptlet´úÂëµÄ³ÌÐò¡£ÔÚÎÒÃǹ«Ë¾µÄÏîÄ¿ÖÐÊDz»ÔÊÐíÓÐÈκεÄscriptlet´úÂë³öÏÖÔÚJSPÖС£
4¡¢ ÔÊÐíJSPÉè¼Æ¹¤¾ßÓëWEBÓ¦ÓóÌÐò¿ª·¢µÄ½øÒ»²½¼¯³É¡£ÏàÐŲ»¾Ã¾Í»áÓÐÖ§³ÖJSTLµÄIDE¿ª·¢¹¤¾ß³öÏÖ¡£
4¡¢j2eeµÄÓÅÔ½ÐÔÖ÷Òª±íÏÖÔÚÄÄЩ·½Ã棿MVCģʽ
Ïà¹ØÎÊ´ð£º
JSPÒ³ÃæÖÐÓжà¸öradio°´Å¥
JSPÒ³Ãæ½«²ÎÊýPOST¸øservlet
ÒªÇóÈçÏÂ;
1.Ñ¡ÔñÒ»¸öradio£¬µ÷ÓÃservlet servletÖиù¾Ý²ÎÊýµ÷ÓÃÆäËû½Ó¿Ú£¬³ý·ÇÑ¡ÖиÃradio²¢µã»÷JSPÖеÄʵР......
ÎÒJSPµÄÒ³ÃæÊÇ£º
<%@ page language="java" contentType="text/html; charset=gb2312"
%>
<script>
function Save(){
xmlHttp=GetXmlHttpObject()
if(xmlHttp==nul ......
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 52 in the jsp file: /vip_info.jsp
ÕË cannot be resolved
49: <table border="1& ......
ÓÐËÓÃjava×ö¹ý´òÓ¡·¢Æ±µÄ³ÌÐò£¬¸Ð¾õÕâ·½Ãæ²»ÊǺܺÿØÖÆ£¬Ï£Íû¸øµã½¨Ò飬×îºÃÄܸø³ö´úÂë
¼òµ¥µã¾Íµ÷ÓÃwindow.print()
ÄãÒ²¿ÉÒÔ°ÑÏÂÃæ´úÂë·Åµ½ÄãJSPÖÐ:
<html>
<head>
<title> ......
java swing ³ÌÐòÈçºÎ´ò°ü³Éjar£¬È»ºó¿ÉÒÔͨ¹ýÅú´¦ÀíÎļþbatÖ±½ÓÔËÐУ¬ÓÐûÓÐʲô¹¤¾ßÖ±½Ó¿ÉÒÔÍê³ÉÕâÁ½¸ö¹¤×÷£¿
ÓÃjar´ò°ü£¬°ÑÔËÐÐÐèÒªµÄjar¿½±´µ½Ò»¸öĿ¼£¬Åú´¦ÀíÓà start javaw -cp .;ÆäËû°ü·¾¶ ÔËÐÐ
ÓÃzip ......