Lập trình JSP servlet

Chuyên đề 2 lập trình JSP, servlet bài 02  cơ bản về JDBC

Chuyên đề 2 lập trình JSP, servlet bài 02 cơ bản về JDBC

... Pointbase    jdbc: oracle:thin:@machinename:1 521 :dbname jdbc: derby://localhost:1 527 /sample jdbc: pointbase:server://localhost/sample Cức b        c s d ng JDBC B1 Load JDBC driver cho ... Application Server (và GlassFish V2), m t data source đ c g i m t JDBC resource 24 1 /29 /20 12 Cức thu c tính c a m t DataSource đ đ nh ngh a đâu?   DataSource (JDBC Resource) f...
Ngày tải lên : 04/12/2015, 04:13
  • 10
  • 402
  • 1
Đồ án tốt nghiệp - Phân tích thiết kế hệ thống - LẬP TRÌNH JSP TECHNOLOGY docx

Đồ án tốt nghiệp - Phân tích thiết kế hệ thống - LẬP TRÌNH JSP TECHNOLOGY docx

... triggers, stored procedures,… - Không có môi trường đồ hoạ So sánh JSP với công nghệ khác a) JSP với ASP ASP công nghệ tương đương từ Microsoft JSP có ba lợi so với ASP - Phần động viết Java, ngôn ... chúng có cú pháp XML Có chín actions chuẩn: jsp: include, jsp: useBean, jsp: setProperty, jsp: getProperty, jsp: plugin, jsp: forward, jsp: fallback, jsp: params, jsp: p...
Ngày tải lên : 27/06/2014, 17:20
  • 145
  • 426
  • 1
Bài Giảng Lập Trình JSP _P1

Bài Giảng Lập Trình JSP _P1

... values, etc • Servlets: Code to determine and redirect to appropriate response JSP request Control servlet JSP JSP JSP JSPs for views response 10 User-friendly Error Handling • Tell user what went ... issues – Prepared statements – Connection pooling web container database server control servlet JSP database driver DBMS database JDBC 14 Tools We will be Using • Jakarta Tomcat web cont...
Ngày tải lên : 14/07/2014, 16:00
  • 17
  • 232
  • 1
Bài Giảng Lập Trình JSP _P2

Bài Giảng Lập Trình JSP _P2

... create web site index .jsp Prompts user for number of widgets reciept .jsp Displays number of widgets purchased Building a Web Application Adding a JSP • File  New Choose a JSP Give it a name Running ... an initial index .jsp page (default home page of the new site) The index .jsp is initially just a “Hello world” page Running a Web Application • Running the site opens the index .jsp...
Ngày tải lên : 14/07/2014, 16:00
  • 39
  • 209
  • 1
Bài Giảng Lập Trình JSP _P3

Bài Giảng Lập Trình JSP _P3

... sum variable Value of in sum used in this JSP No html here JSP Scoping • Variable declared in a block of JSP on a page • May be accessed by any other JSP on same page • No access to variable from ... john@cis.ysu.edu 21 Commenting JSP Files • Crucial to future maintenance of site • Inside of JSP code (between ): // comment /* comment */ • Outside of JSP code (that is, in html)...
Ngày tải lên : 14/07/2014, 16:00
  • 23
  • 329
  • 0
Bài Giảng Lập Trình JSP _P4

Bài Giảng Lập Trình JSP _P4

... “ …monitor=on… ” if monitor is checked – No mention of monitor if not checked Checkbox JSP • If execute JSP code: String monitor = request.getParameter("monitor"); monitor will have the value ... returned if ask for value of parameter which was not passed in the request string Conditions in Java • JSP may need to different things depending on checkbox – Display “Monitor” if checked – Di...
Ngày tải lên : 14/07/2014, 16:00
  • 27
  • 235
  • 1
Bài Giảng Lập Trình JSP _P5

Bài Giảng Lập Trình JSP _P5

... (database info, etc.) – Decide which JSP should be sent back as response – Forward control (and request data) to that JSP request Control servlet response JSP JSP JSP JSPs act as views Adding a Servlet ... (like a JSP) – Methods invoked by a request for the servlet – Usually redirects to a JSP Request for servlet Tomcat Servlet methods called Servlet JSP converted to html Respons...
Ngày tải lên : 14/07/2014, 16:00
  • 26
  • 350
  • 0
Bài Giảng Lập Trình JSP _P6

Bài Giảng Lập Trình JSP _P6

... value = context.getInitParameter(“name"); • Accessing from a JSP: – String value = application.getInitParameter(“name"); Built-in object in JSP (like “request”) Configuration Parameters ... have a root tag Welcome Page Properties • Page shown at webapp startup – Default: index .jsp • Can change to a new welcome file New Welcome Page • Will go to that page when webapp started
Ngày tải lên : 14/07/2014, 16:00
  • 18
  • 226
  • 1
Bài Giảng Lập Trình JSP _P7

Bài Giảng Lập Trình JSP _P7

... approach: Force JSP to repeat validation done in servlet to determine which messages to display • Better approach: Once servlet detects error, it creates error message and passes to JSP as attribute ... pages • Better design: single page for both JSP request Form elements Displays error messages if any found by servlet Servlet Validates form errors Calls JSP again if errors, passing e...
Ngày tải lên : 14/07/2014, 16:00
  • 40
  • 235
  • 0
Bài Giảng Lập Trình JSP _P8

Bài Giảng Lập Trình JSP _P8

... Request = parameters + session ID Servlet or JSP Handle request Associating Session Data • Servlets/JSPs can store data associated with session ID • Servlets/JSPs can look up that data in future when ... All other JSPs test whether attribute is null • If so, redirect to another page – Initial page in sequence – Error page telling session has expired • Syntax for redirection from JSP:
Ngày tải lên : 14/07/2014, 16:00
  • 24
  • 217
  • 1
Bài Giảng Lập Trình JSP _P9

Bài Giảng Lập Trình JSP _P9

... separate from servlets/JSPs – Servlets/JSPs interact with those classes – Often interact with databases request Control servlet response Store data View JSP View JSP View JSP Classes that model ... called by JSP to display data stored earlier These model classes often created by other programmers – Business logic specialists create model – Server programming specialists create servlet...
Ngày tải lên : 14/07/2014, 16:00
  • 41
  • 224
  • 0
Bài Giảng Lập Trình JSP _P11

Bài Giảng Lập Trình JSP _P11

... dynamically generated JSP into separate files – Easier to develop and maintain as group Configuration .jsp Information .jsp CreditCard .jsp Including Dynamic Resources • Syntax:
Ngày tải lên : 14/07/2014, 16:00
  • 8
  • 186
  • 0
Bài Giảng Lập Trình JSP _P12

Bài Giảng Lập Trình JSP _P12

... validate order Does item exist? Is it still in stock? web container control servlet database JSP Queries to database to display information to user Query for all items in stock Query to ... password-controlled – Examples: • • • • MySQL (free) Oracle MS Server Not Access! Database server control servlet JSP database Database Servers • • Programs create statement objects inside server Serve...
Ngày tải lên : 14/07/2014, 16:00
  • 17
  • 222
  • 0
Bài Giảng Lập Trình JSP _P14

Bài Giảng Lập Trình JSP _P14

... requested: – Connection used by servlet /JSP Connections currently in use web container JSP/ servlet Connection pool database server JSP/ servlet database New JSP/ servlet Reference to unused connection ... pool Connections currently in use web container JSP/ servlet Connection pool database server JSP/ servlet database Request for new connection New JSP/ servlet Free unused connection...
Ngày tải lên : 14/07/2014, 16:00
  • 19
  • 179
  • 0