Reference documentation:
L a.1 Jane: /APC/Manual/guide/guideaa/guide291.htm
l uji tag reference: /APC/Manual/tag/index.html
1, basic operational process
l Basic Need: JSP Uji Tags (View), Handler (Controller), DataBean (Model), in line with MVC mode
l Recommended principle: a picture corresponding to 1 JSP page, 1 handler and 1 DATABEAN
l If you share Handler or DataBean (such as the case), logical confusion is prone to development and maintenance
2, control page main.jsp
<% @ page contenttype = "text / html; charset = shift_jis"%>
<% @ Taglib URI = "uji-taglib" prefix = "uji"%>
HEAD>
Body>
Html>
l APC application starts from main.jsp
l uji: include tag contains two parts: page and page body
l Remove
3, DataBean
l Headbean.java
Package Sample;
Public class headbean experts com.fujitsu.uji.databean
{
Protected int count;
protected java.util.date logintime;
Public int getCount () {
Return count;
}
Public void setcount (int count) {
THIS.COUNT = COUNT;
}
Public java.util.date getLogintime () {
Return Logintime;
}
Public void setLogintime (java.util.date logintime) {
THIS.Logintime = logintime;
}
}
l bodybean.java
Package Sample;
Public class bodybean extends com.fujitsu.uji.databean
{
Protected string message;
Protected Double VAL1;
Protected Double Val2;
Protected Double Result;
Public string getMessage () {
Return Message;
}
Public void setmessage (string message) {
THIS.MESSAGE = Message;}
Public double getval1 () {
Return VAL1;
}
Public void setval1 (double val1) {
THIS.VAL1 = VAL1;
}
Public double getVal2 () {
Return Val2;
}
Public void setval2 (double val2) {
THIS.VAL2 = VAL2;
}
Public double getResult () {
Return Result;
}
Public void setResult (double result) {
THIS.RESULT = Result;
}
}
l DataBean is a standard JavaBean, you need to expand com.fujitsu.uji.DataBean
l DataBean is consistent with the project in the picture definition book
L sub-DATABEAN: For the case of the list of items in the screen, use sub-DATABEAN to represent an entry, through the List structure sub-DataBean represents the entire entry list, and as a property of the parent DataBean
4, into the exit page
l Header.jsp
<% @ page contenttype = "text / html; charset = shift_jis"%>
<% @ Taglib URI = "uji-taglib" prefix = "uji"%>
実 実 回数
セショ セショ 时间 时间 时间 时间
l uji: UseBean tag Specifies the DATABEAN, the id attribute value needs to be consistent with the PANE attribute value of the uji: include in main.jsp, and the CLS property specifies the full path to the DataBean class.
l uji: getProperty tag Get the specified property value in the DATABEAN, the bean property is consistent with the UJI: UseBean's ID property, the Property property specifies the properties in the DATABEAN.
l Request.jsp
<% @ page contenttype = "text / html; charset = shift_jis"%>
<% @ Taglib URI = "uji-taglib" prefix = "uji"%>
サ サ プ プ プ プ グ グ ム で, 2 加 减 実 実 実. 実.