JSPȨÏÞ¿ØÖÆ£¨¶þ£©
1 £©Ê×ÏȽ¨Á¢¹ÜÀíÓû§±í£¬ÆäÖÐ UserPopedom ¼Ç¼Óû§µÄȨÏÞ×Ö·û£¬ÆäʵҲ¾ÍÊÇһЩ JSP »òÕß ACTION µÄÎļþÃû£º
CREATE TABLE [dbo].[AdminUser] (
[UserID] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[UserName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[UserPass] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[UserPopedom] [text] COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
2 £©°´ÕÕÉÏÃæµÄ±í¸ñ½¨Á¢¸ÃÓû§µÄ¶ÔÏó
package com.wake.bean;
public class AdminUser {
private String UserID;
private String UserName;
private String UserPass;
private String UserPopedom;
public String getUserID() {
return UserID;
}
public void setUserID(String userID) {
UserID = userID;
}
public String getUserName() {
return UserName;
}
public void setUserName(String userName) {
UserName = userName;
}
public String getUserPass() {
return UserPass;
}
public void setUserPass(String userPass) {
UserPass = userPass;
}
public String getUserPopedom() {
return UserPopedom;
}
public void setUserPopedom(String userPopedom) {
UserPopedom = userPopedom;
}
}
3 £©¶ÔÕû¸öºǫ́µÄ¿ØÖÆÎÒÕâÀï·ÖΪÁËÁ½²¿·Ö£¬Ò»²¿·ÖÊÇÀ¸Ä¿µÄÏÔʾ¿ØÖÆ£¬Ò»²¿·ÖÊÇ×ÊÔ´£¨Ò³Ã棩µÄ²Ù×÷¿ØÖÆ¡£
ÆäÖÐÀ¸Ä¿µÄÏÔʾ¿ØÖƽâÊÍΪ£ºÒÔÐÂÎÅÀ¸Ä¿ÎªÀý£¬Èç¹ûijÓû§Ã»ÓÐÐÂÎÅÀ¸Ä¿µÄÈκιÜÀíȨÏÞ£¨Ôö¡¢¸Ä¡¢É¾¡¢ÉêµÈ£©£¬ÄÇôÔÚºǫ́µÄ¹ÜÀí²Ëµ¥Öн«²»ÏÔʾÐÂÎÅÀ¸Ä¿¡£·ñÔò£¬Ö»ÒªÄ³Óû§ÓµÓÐÆäÖÐÈκÎÒ»¸öȨÏÞ£¬ÐÂÎÅÀ¸Ä¿ÔòÏÔʾ¡£ÕâÀïÒªÕÆÎÕµÄÒªÁìÊÇ£¬ËùÓкÍÐÂÎÅȨÏÞÏà¹ØµÄÒ³ÃæÃüÃû±ØÐëÒÔ News ´òÍ·£¬ÕâÑù½«À´¾ö¶¨ÏÔʾÓë·ñ¾ÍÒÔ¸ÃÓû§µÄȨÏÞ×Ö·ûÖÐÊÇ·ñÄÜÕÒµ½ News ΪÒÀ¾Ý¡£¸Ã¹¦ÄܵÄʵÏÖÎÒдÁË Bean À´Åжϡ£ÈçÏ£º
package com.wake.util;
import java.util.Map;
import com.opensymphony.xwork.ActionContext;
import com.wake.bean.AdminUser;
public class PopedomValidate {
public static boolean UserPopedomValidate(String pstr){
Map session = ActionContext.
Ïà¹ØÎĵµ£º
Ïàͬµã£º
Èç¹û±»°üº¬½øÈ¥µÄÎļþÀïÃæÓÐcssÎļþµÄ»°£¬°üº¬µÄÒ³Ãæ»áÊܵ½±»°üº¬ÎļþµÄcssÑùʽµÄÓ°Ï죡
²»Í¬µã£º
<%@ include
file="date.jsp" %>
<jsp:include
page="date.jsp" flush="true"/>
include
±àÒëÖ¸ÁîÊÇÔÚ
JSP
³ÌÐò ......
´íÎó£º
String realPath = " http:// " + request.getServerName() + " : " + request.getServerPort() + request.getContextPath();
String realPath = " http:// " + request.getSer ......
¸ÅÊö
¡¡¡¡Java Server Pages£¨JSP£©Ê¹µÃÎÒÃÇÄܹ»·ÖÀëÒ³ÃæµÄ¾²Ì¬HTMLºÍ¶¯Ì¬²¿·Ö¡£HTML¿ÉÒÔÓÃÈκÎͨ³£Ê¹ÓõÄWebÖÆ×÷¹¤¾ß±àд£¬±àд·½Ê½Ò²ºÍÔÀ´µÄÒ»Ñù£»¶¯Ì¬²¿·ÖµÄ´úÂë·ÅÈëÌØÊâ±ê¼ÇÖ®ÄÚ£¬´ó²¿·ÖÒÔ“£¼%”¿ªÊ¼£¬ÒÔ“%£¾”½áÊø¡£
¡¡¡¡ÀýÈ磬ÏÂÃæÊÇÒ»¸öJSPÒ³ÃæµÄƬ¶Ï£¬Èç¹ûÎÒÃÇÓÃhttp://host/OrderConfirm ......
ÎÒÃǶ¼ÖªµÀÔÚjspÖÐincludeÓÐÁ½ÖÖÐÎʽ,·Ö±ðÊÇ
<%@ include file=" "%>
<jsp:include page=" " flush="true"/>
ǰÕßÊÇÖ¸ÁîÔªËØ¡¢ºóÕßÊÇÐÐÎªÔªËØ.
ͨ³£µ±Ó¦ÓóÌÐòÖÐËùÓеÄÒ³ÃæµÄijЩ²¿·Ö(ÀýÈç±êÌâ¡¢Ò³½ÅºÍµ¼º½À¸)¶¼ÏàͬµÄʱºò,Î ......
index.jsp:
<html>
<head>
<title>The News</title>
</head>
<body>
<h1> Latest News</h1>
<table>
<tr>
<td><h3><%@include file="items/news1.jsp" %></h3></td>
</tr>
<tr>
<td> ......