การพัฒนาโปรแกรมด้วย JSP | ||
หน่วยที่ 9. การพัฒนาโปรแกรมด้วย JSP _ _ _ [ menu ] | |
1. สามารถติดตั้งโปรแกรมเพื่อใช้พัฒนาภาษา JSP ได้ 2. สามารถอธิบายลักษณะต่าง ๆ ของภาษา JSP ได้ 3. สามารถเขียนโปรแกรมด้วยภาษา JSP ได้ |
1. 2. |
9.1 ความรู้เบื้องต้นเกี่ยวกับภาษา 9.2 การติดตั้งเครื่องบริการ เพื่อบริการ JSP 9.3 การโปรแกรมโครงสร้าง 9.4 การรับ และส่งข้อมูล 9.5 การเขียนโปรแกรมใช้งานอย่างง่าย |
1. http://www.thaiall.com/jsp 2. http://www.apache.org 3. http://www.javasoft.com 4. http://www.thaiall.com/class 5. http://www.thaiall.com/webserver 6. http://www.thaiall.com/mysql แบบฝึกหัดท้ายบท 1. เขียนตัวอย่างโปรแกรมด้านล่างนี้สัก 5 รอบ 2. 3. |
ตัวอย่างแฟ้ม a.jsp ที่สร้างขึ้นด้วย notepad <body><pre> <% for (int i=1;i<=10;i++) { out.println(i); } %> </pre></body> ตัวอย่างแฟ้ม b.jsp :: อ่านข้อมูลจาก DSN ใน ODBC มาแสดงผล <body> <%@ page import="java.sql.*" %> <% Connection connection; Statement statement; String sourceURL = "jdbc:odbc:empl"; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection = DriverManager.getConnection(sourceURL); statement = connection.createStatement(); String sql = "select * from empl"; ResultSet myresult = statement.executeQuery(sql); while (myresult.next()) { out.println(myresult.getString("emplid") + "<br>"); } myresult.close(); %> </body>