JSPÓï·¨µÄxml±í´ï
´ó¼Ò×ÜÊDz»Ï²»¶¿´µ½<%ºÍ%>ÔÚjspÒ³ÃæÉÏ£¬ÆäʵÎÒÃÇ¿ÉÒÔʹÓñȽÏÓÅÑŵÄxml·½Ê½À´±í´ï
1£¬Òþº¬µÄ×¢ÊÍ
JSPÓï·¨£º<%-- ÄÚÈÝ --%>
XMLÓï·¨£ºÎÞ
2£¬±äÁ¿»òº¯ÊýµÄÉùÃ÷
JSPÓï·¨:<%! declaration;[declaration;]+... %>
ÀýÈ磺
<%!
int i=0;int a,b,c;
Color red=new Color(255,0,0);
private static final String OK="ok";
public String getAnswer(){
return OK;
}
%>
XMLÓï·¨£º
<jsp:declaration>
declartion;[declaration;]+...
</jsp:declaration>
ÀýÈ磺
<jsp:declaration>
int i=0;int a,b,c;
Color red=new Color(255,0,0);
private static final String OK="ok";
public String getAnswer(){
return OK;
}
</jsp:declaration>
3£¬±í´ïʽ
JSPÓï·¨£º<%=expression%>
ÀýÈ磺
<%=Math.round(Math.random*100)%>
XMLÓï·¨£º
<jsp:expression>
expression
</jsp:expression>
ÀýÈ磺
<jsp:expression>
Math.round(Math.random*100)
</jsp:expression>
4£¬´úÂëÆ¬¶Ï
JSPÓï·¨£º<% your java code %>
ÀýÈ磺
<%
String username=request.getParameter("username").trim();
String password=request.getParameter("password").trim();
%>
XMlÓï·¨£º
<jsp:scriptlet>
your java code
</jsp:scriptlet>
ÀýÈ磺
<jsp:scriptlet>
String username=request.getParameter("username").trim();
String password=request.getParameter("password").trim();
</jsp:scriptlet>
5£¬Ö¸Áinclude
JSPÓï·¨£º<%@include file="relativeURL"%>
ÀýÈ磺<%@include file="static_head.html"%>
XMLÓï·¨£º<jsp:directive.include file="relativeURL"/>
ÀýÈ磺<jsp:directive.include file="static_head.html"/>
6£¬Ö¸Ápage
JSPÓï·¨£º<%@page attribtes%>
ÀýÈ磺<%@page import="java.util.HashMap"%>
XMLÓï·¨£
Ïà¹ØÎĵµ£º
¡¡¡¡1 Javascript £¬ÉèÖÃÒ»¸ö±äÁ¿£¬Ö»ÔÊÐíÌá½»Ò»´Î¡£
¡¡¡¡#lt;script language="javascript"#gt;
¡¡¡¡ var checkSubmitFlg = false;
¡¡¡¡ function checkSubmit() {
¡¡¡¡ if (checkSubmitFlg == true) {
¡¡¡¡ return false;
¡¡¡¡ }
¡¡¡¡ checkSubmitFlg = true;
¡¡¡¡ return true;
¡¡¡¡ }
¡¡¡¡ document.ondblcli ......
Ò»¡¢
ÎÊ£ºorg.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "192.168.254.103", user "postgres",database "postgres", SSL off
´ð£ºPostgreSQÊý¾Ý¿âΪÁ˰²È«£¬Ëü²»»á¼àÌý³ý±¾µØÒÔÍâµÄËùÓÐÁ¬½ÓÇëÇ󣬵±Óû§Í¨¹ýJDBC·ÃÎÊÊÇ£¬¾Í»á±¨Ò»Ð©ÒÔÉϵÄÒì³£¡£Òª½â¾öÕâ¸öÎÊÌâ ......
»ù±¾ÄÚÈÝ
Ê×ÏÈÊÇÓÃJ2SE+TOMCAT´î½¨¿ª·¢Æ½Ì¨£¬È»ºó»áÓÃʵÀý·Ö±ð¶ÔjavabeanºÍservlet½øÐвâÊÔ£¬
ͬʱҲ»á̸µ½Ò»Ð©ÖÐÎÄ´¦ÀíÉϵÄÎÊÌâ¡£ÎÄÕÂÄÚÈÝ¿ÉÄÜ»áÓеãÔÓÂÒºÍÁãÉ¢£¬µ«ÕâÒ²ÊÇѧϰ
jsp×î»ù´¡µÄ֪ʶ£¬ÒªÏëѧºÃjsp»¹µÃ¿¿×Ô¼º¶àŬÁ¦Ñ§Ï°¡£
ΪʲôҪдÕâÑùһƪÎÄÕ£¿
ÈÏʶÎÒµÄÅóÓÑ¿ÉÄÜ»áÖªµÀ£¬ÎÒÆ½Ê±Ö»ÊÇдºÍ·ÒëһЩJ2ME· ......
JSP¹²ÓÐÒÔÏÂ9ÖÖ»ù±¾ÄÚÖÃ×é¼þ£¨¿ÉÓëASPµÄ6ÖÖÄÚ²¿×é¼þÏà¶ÔÓ¦£©£º
¡¡1.request Óû§¶ËÇëÇ󣬴ËÇëÇó»á°üº¬À´×ÔGET/POSTÇëÇóµÄ²ÎÊý¡£
2. response ÍøÒ³´«»ØÓû§¶ËµÄ»ØÓ¦ ¡£
3.pageContext ÍøÒ³µÄÊôÐÔÊÇÔÚÕâÀï¹ÜÀí ¡£
4.session ÓëÇëÇóÓйصĻỰÆÚ¡£
5.ap ......
struts-config:
<action path="/articleManage" name="articleManageForm" scope="request" type="auction.action.ArticleManageAction" validate="false">
<forward name="atriclesList" path="/WEB-INF/publish/articleManage/atriclesList.jsp"/>
<forward ......