Struts JBuilder2005 Tomcat5.0

xiaoxiao2021-03-05  33

a. New Project

B.New WebModule

C.New JSP

d. New Actionform: Input Fields, Fields Definition, Add to Struts-Config.xml

e. New JSP from Actionform: Brows to select Class named by d.

Update the code: EX.

Add JSP file: action ok or error ok.jsp and error .jsp

f. new action:

FORMBEAN NAME: (Actionform Name)

SCOPE: REQUEST

Validate Formbean: False

INPUT JSP: (JSP from Actionform Name)

G.Complete The Code:

1.Get The Values ​​of Parameter Input from ActionForm

2. String Target;

Target = "ok"; //ok.jsp ...

Target = "error"; //rror.jsp ...

Return ActionMapping.FindForward (Target);

H.Compile and Run Project.

转载请注明原文地址:https://www.9cbs.com/read-34161.html

New Post(0)