The practical course of JSP University, electronic industry Press editor: Shangyi Zhang Yuping Example Source code __jsp

Source: Internet
Author: User

The practical course of JSP University

Electronics Publishing House

Edited by: Shangyi Zhang Yuping

Example source code

It is recommended that you use a Document Map (select Word menu → view → Document Map)

Directory

1th Chapter JSP Introduction 1

Example 1 1

First.jsp 1

2nd Chapter JSP Page 2

Example 1 2

Example2_1.jsp 2

Example 2 2

Example2_2.jsp 2

Example 3 3

Example2_3.jsp 3

Example 4 3

Example2_4.jsp 3

Example 5 4

Example2_5.jsp 4

Example 6 4

Example2_6.jsp 4

Example 7 5

Example2_7.jsp 5

Example 8 6

Example2_8.jsp 6

Example 9 6

Input.jsp 6

Receive.jsp 7

Example 10 7

Example2_10.jsp 7

Example 11 8

Select.jsp 8

Show.jsp 9

3rd Chapter JSP Mark 10

Example 1 10

a.jsp 10

b.jsp 10

c.jsp 10

Example 2 11

example3_2.jsp 11

Example 3 11

example3_3.jsp 11

time.jsp 12

sun.jsp 12

Example 4 12

example3_4.jsp 12

computer.jsp 12

Example 5 13

example3_5.jsp 13

num1.jsp 14

num2.jsp 14

Example 6 15

Firsttag.tag 15

Secondtag.tag 15

example3_6.jsp 15

Example 7 16

example3_7.jsp 16

Show.tag 16

Example 8 17

example3_8.jsp 17

Trangle.tag 17

Chapter 4th built-in Objects 18

Example 1 18

example4_1.jsp 18

Compter.tag 18

Example 2 19

example4_2.jsp 19

showmessage1.jsp 19

showmessage2.jsp 20

Example 3 20

example4_3.jsp 20

Example 4 22

example4_4.jsp 22

Example 5 23

example4_5.jsp 23

Example 6 23

example4_6.jsp 23

form.jsp 23

Example 7 24

Example4_7.jsp 24

Welcome1.jsp 24

Welcome2.jsp 24

Welcome3.jsp 25

Example 8 25

First.jsp 25

Second.jsp 25

Third.jsp 26

Example 9 26

Main.jsp 26

Food.jsp 27

Count.jsp 27

Example 10 28

Example4_10.jsp 28

Example 11 29

First.jsp 29

Second.jsp 29

third.jsp 30

Example 12 30

helloone.jsp 30

hellotwo.jsp 30

Count.tag 31

Example 13 32

Example4_13.jsp 32

Example 14 33

Submit.jsp 33

5th Chapter JSP and JavaBean 36

Example 1 36

Lader.java 36

Usebean.jsp 37

Example 2 37

Bean1.jsp 37

Bean2.jsp 37

Example 3 38

DOOR1.JSP 38

DOOR2.JSP 38

Example 4 39

Book.java 39

Example 5 40

Student.java 40

Example 6 42

Studentform1.jsp 42

Example 7 43

STUDENTFORM2.JSP 43

Example 8 44

Listfile.java 44

LISTFILE.JSP 45

Triangle Bean 45

Triangle.java 45

Arithmetic Bean 47

Computerbean.java 47

Guess the number bean 49

Guessnumber.java 49

Guess.jsp 51

Time Bean 51

Showcalendar.java 51

Calendar Bean 54

Calendarbean.java 54

Showcalendar.jsp 56

Play Slide Bean 57

Playslide.java 57

Play.jsp 58

6th Chapter JSP in the file operation 60

Example 1 60

Filepro.java 60

File.jsp 61

Example 2 62

Filedir.java 62

WEBDIR.JSP 63

Example 3 64

Readfile.java 64

SELECTDIR.JSP 65

Listfile.jsp 66

Example 4 66

Readbyrow.java 66

SELECTFILE.JSP 68

READBYROW.JSP 68

Example 5 69

WriteFile.java 69

WRITE.JSP 70

Example 6 71

Test.java 71

TEST.JSP 72

Example 7 73

Test.java 73

UPFILE.JSP 76

SHOW.JSP 76

Example 8 77

Downloadfile.java 77

Downfile.jsp 77

7th Chapter JSP uses the database 79

Example 1 79

SHOWBYJDBCODBC.JSP 79

Example 2 80

Example 3 81

Querybeanone.java 81

Querybeantwo.java 83

Example 4 87

Randomquerybean.java 87

Example 5 91

Conditionquery.java 91

INPUTCONDITION.JSP 93

INQUIREONE.JSP 94

INQUIRETWO.JSP 94

INQUIRETHREE.JSP 94

Example 6 95

Orderquery.java 95

CHOICETYPE.JSP 97

Example 7 97

Keywordquery.java 97

KEYWORD.JSP 99

SHOW.JSP 99

Example 8 100

Renewbean.java 100

Addbean.java 102

Delbean.java 103

MAINPAGE.JSP 105

RENEW.JSP 105

Add.jsp 106

DELETE.JSP 107

Example 9 107

Preparedquerybean.java 107

PRE.JSP 110

Example 10 110

Addrecordbean.java 110

PRE.JSP 112

Example 11 113

Showrecordbypage.java 113

CHOICEDATABASE.JSP 116

SHOWBYPAGE.JSP 116

Example 11 117

LINKORACLE.JSP 117

Example 12 119

LINKMYSQL.JSP 119

Example 13 120

Aaa.java 120

MAIN.JSP 122

8th Chapter Java servlet Basics 123

Example 1 123

GIVENUMBER.JSP 123

Computer.java 123

Example 2 124

Showletter.jsp 124

Showletter.java 124

Example 3 125

Showpi.jsp 125

Computerpi.java 125

Example 4 126

METHOD.JSP 126

Getsqare.java 126

Getsquareorcubic.java 127

Example 5 129

INPUT.JSP 129

Verify.java 129

Showmessage.java 130

Example 6 131

Boy.java 131

Look.java 132

Example 7 132

GETNUMBER.JSP 132

INPUTNUMBER.JSP 133

Handleguess.java 133

9th chapter based on the servlet MVC pattern 135

Example 1 135

Web.xml 135

Triangle.java 135

INPUT.JSP 136

SHOW.JSP 137

Handledata.java 137

Example 2 138

Computerbean.java 138

Inputnumber.jsp 139

SHOWRESULT.JSP 140

Handlecomputer.java 140

Example 3 142

Filemessage.java 142

CHOICEFILE.JSP 143

SHOWFILE.JSP 144

Handlefile.java 144

Example 4 145

Showrecordbypage.java 145

Choicedatabase.jsp 147

Showrecord.jsp 147

Handledatabase.java 148

10th Chapter Member Management System 153

System Management 153

Head.txt 153

Index.jsp 153

Web.xml 154

Member Registration 156

Register.java 156

REGISTER.JSP 157

SHOWREGISTERMESS.JSP 158

Handleregister.java 159

Member Login 161

Login.java 161

LOGIN.JSP 162

SHOWLOGINMESS.JSP 162

Handlelogin.java 163

Upload Photos 166

Uploadfile.java 166

UPLOAD.JSP 166

Showuploadmess.jsp 167

Handleupload.java 167

Browse Members 171

Memberinform.java 171

Showbypage.java 173

Choicelooktype.jsp 174

Showallmember.jsp 174

SHOWLOOKEDMEMBER.JSP 175

Handledatabase.java 176

Modify Password 180

Password.java 180

MODIFYPASSWORD.JSP 180

SHOWNEWPASSWOR.JSP 181

Handlepassword.java 181

Modify registration Information 183

Modifymessage.java 183

Choicemodifymess.jsp 184

INPUTMODIFYMESS.JSP 185

showmodifymess.jsp 186

Getoldmess.java 186

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.