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

¹ØÓÚÍøÕ¾Ê×Ò³Ãû³Æ°²È«ÐÔÎÊÌâ JSP ÔÊÐíĿ¼ä¯ÀÀ

ÔÚ²»ÔÊÐíĿ¼ä¯ÀÀµÄÇé¿öÏ     ä¯ÀÀÆ÷»áÏÈÕÒµ½Ê×Ò³£¨Ä¬ÈÏΪindex.html  /index.jsp...£©
·ñÔò³ö´í
Òò´Ë ÈôÊ×Ò³±»¶ñÒâ¸ü¸Ä   ÍøÕ¾±ÀÀ£
½â¾ö·½·¨£º
¸ü¸ÄĬÈÏÆô¶¯Ò³Ã棺$tomcat/conf/web.xml×îºóλÖÃ
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
¿ÉÒÔɾ³ýËùÓÐ<welcome-file>***</welcome-file>
ÔÊÐíĿ¼ä¯ÀÀ£ºµ±»¶Ó­Ò³ÃæûÓÐÕÒµ½Ê±ÔÊÐíĿ¼ä¯ÀÀ£¬ÔòÐèÒª¸ü¸Ä$tomcat/conf/web.xmlµÚ80ÐÐlistingsµÄֵΪtrue¡££¨tomcat5.5ÐèÒª£¬4.1²»ÐèÒª£©


Ïà¹ØÎĵµ£º

½â¾öJspÒ³ÃæURLÖд«µÝ²ÎÊýÂÒÂëµÄ·½·¨

JspÒ³ÃæÔÚURLÖд«µÝ²ÎÊý»á³öÏÖÂÒÂë
½â¾ö·½·¨ÈçÏ£º
Ò»¡¢Ê¹Óøü¸ÄTomcatµÄ·½·¨¡£Õâ¸ö·½·¨¼òµ¥£¬µ«ÊÇÐèÒª¸Ä¶¯µÄµØ·½ÊÇ·þÎñÆ÷Èí¼þ¼¶±ðµÄ£¬Èç¹ûÉÔ΢±ä¶¯ÏµÍ³½«ÎÞ·¨ÕýȷתÂ룬ÒÆÖ²ÐÔ²»¸ß¡£
1¡¢À´µ½tomcatĿ¼£¬ÕÒµ½confĿ¼ÏµÄserver.xmlÎʼۣ¬´ò¿ª£¬ÕÒµ½<Connector>±êÇ©£¬ÔÚ×îºóÌí¼ÓURIEncoding=’GBK’£¬Ð ......

JSPʵÀýÈý¡¢sql·ÖÒ³(1)

index.jsp
<%@ page language="java" import="java.sql.*" import="java.lang.*" import="java.util.*" pageEncoding="GB2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%!
& ......

jspÖÐ×Ô¶¨Òå±êÇ©×ܽá(Ò»)_´«Í³±êǩƪ

×Ô¶¨Òå±êÇ©ÊÇÈÿª·¢ÈËÔ±´´½¨¿Í»§»¯µÄ±êÇ©,²¢ÇÒÔÚjspÎļþÖÐʹÓÃÕâЩ±êÇ©,ÕâÑù¿ÉÒÔʹjsp´úÂë¸ü¼ò½à!
 Ê×ÏÈÕâÀïÏȽéÉÜ´Ó¶¨Òå±êÇ©µ½Ê¹ÓñêÇ©µÄ²½Öè:
     1,´´½¨×Ô¶¨Òå±êÇ©´¦ÀíÀà,¼°Ïà¹ØÀà.class ²¢ÇÒ°ÑËûÃǶ¼·ÅÔÚWEB-INF/classesĿ¼ÏÂ
     2,´´½¨TLD±êÇ©¿âÃèÊöÎļþ(.tld)Î ......

Jsp±àÂë¹æ·¶


Jsp±àÂë¹æ·¶
1.1 Îļþºó׺(File Suffixes)
ÎļþÀà±ð ¡¡¡¡ ¡¡¡¡¡¡¡¡¡¡Îļþºó׺
--------------------------------------
JavaÔ´Îļþ¡¡¡¡¡¡¡¡¡¡¡¡¡¡.java
Java×Ö½ÚÂëÎļþ¡¡¡¡¡¡¡¡¡¡.class
¶¯Ì¬Ò³Ãæ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.jsp
¾²Ì¬Ò³Ãæ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.html
½Å±¾Îļþ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.js
1.2 ³£ÓÃÎļþÃû(Common ......

JSPÖÐÓë·¾¶Ïà¹ØµÄ³£Óõļ¸¸ö·½·¨


http:/localhost/123/jsp/test.jsp:
<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logi ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ