Presentation is loading. Please wait.

Presentation is loading. Please wait.

WebServer on OS/390 Bill O'Donnell InfoTech Services

Similar presentations


Presentation on theme: "WebServer on OS/390 Bill O'Donnell InfoTech Services"— Presentation transcript:

1 WebServer on OS/390 Bill O'Donnell InfoTech Services Bill.ODonnell@doa.state.wi.us

2 Friday, November 27, 1998 InfoTech Services. Hope to accomplish n Start our presentation at a high level for the first half. n As we go, we will revisit topic and work down the technical road.

3 Friday, November 27, 1998 InfoTech Services. Topics of Discussion n Video to help understand OS390 as a server. n Some basics concepts on Web technology. n OS/390 components. n OS/390 Web Options. n The Java Tools. n Java application frame work. n What is the State of Wisconsin doing? n Educational tips. n How to code a Java Servlet. n Look at coding examples using the Java application frame work and Servlet.

4 Friday, November 27, 1998 InfoTech Services. Some basics concepts on Web technology. n In this topic we will discuss: u Communication Protocol u Java u Applets u Servlets

5 Friday, November 27, 1998 InfoTech Services. Communication Protocols Http RMI CORBA Client Server

6 Friday, November 27, 1998 InfoTech Services. Java n Object oriented programming language. n High level language similar to C/C++. n Java Soft Standard. n Java compiles to Java byte code. n Java Virtual Machine (JVM) interprets Java byte code. n High Performance Java (HPJ).

7 Friday, November 27, 1998 InfoTech Services. Java Applet n Java application that runs under the control of a Web browser JVM. n Applet code is downloaded from a server to the client. n Best for interactive display. n Difficult to access OS/390 data directly. n Depends on current Browser software.

8 Friday, November 27, 1998 InfoTech Services. Java Servlet n Java application that runs on the server side. n Sends dynamic HTML results back to client. n Direct access to OS/390 data. n No dependency on Browser Software.

9 Friday, November 27, 1998 InfoTech Services. HTTP and Servlets Browser Server HTTP GET Request Request Servlet Send Static HTML Send Dynamic HTML

10 Friday, November 27, 1998 InfoTech Services. OS/390 components n In this topic we will discuss: u OS/390 Unix Services. u Lotus Go Domino Webserver 5.0. u Java Virtual Machine (JVM). u JDBC and SQLJ. u DB2 for OS/390. u CICS

11 Friday, November 27, 1998 InfoTech Services. OS/390 Unix Services n OS/390 is now a branded Unix Operating System. n The WebServer services run under OS/390 Unix Services n WebServer and Java were ported from AIX and enhanced.

12 Friday, November 27, 1998 InfoTech Services. Lotus Go Domino Webserver 5.0. n OS/390 has offered Webserver solution since 1995. n The product has been renamed several times as new functions and features became available. n GDW 5.0 originally shipped with ServletExpress and will be replaced by WebSphere Application Server. n OS/390 can achieve 20,000 HTTP page hits per second.

13 Friday, November 27, 1998 InfoTech Services. Security on OS/390 Http Server n Surrogate n UserID and Password n Certificates n Once authentication is established: u Valid ID is validated u All file references are check u All resources like DB2 are validated. n InfoTech is looking at public UserID administration

14 Friday, November 27, 1998 InfoTech Services. Java Virtual Machine n Today OS/390 has available JVM 1.1.6. n JVM runs under the OS/390 Unix Services.

15 Friday, November 27, 1998 InfoTech Services. OS/390 components OS/390 Unix Services Go Domino Webserver RACF TCPIP (OS/390 2.5+) Client JVM WebAS Servlet MVS DB2

16 Friday, November 27, 1998 InfoTech Services. DB2 Stored Procedures n Can be written in any Language (Java within a year). n Excellent performer due to Caching techniques. n Can access DB2 as well as other subsystems within OS/390. n Can be written and controlled by agency programmer staff

17 Friday, November 27, 1998 InfoTech Services. OS/390 Web Solutions DB2 n Java using JDBC n Java using JDBC to DB2 Stored Procedures n Net.Data n Some web method to CICS then to DB2

18 Friday, November 27, 1998 InfoTech Services. JDBC and SQLJ n Java DataBase Call is the Java API used to access any relational database. n JDBC uses dynamic SQL n SQLJ is a Java API that performs static SQL. n JDBC and SQLJ can call Stored procedures. n IDMS can use JDBC. DB2 Oracle

19 Friday, November 27, 1998 InfoTech Services. JDBC and DB2 Java JDBCSQLJ CLI DB2 Store Proc

20 Friday, November 27, 1998 InfoTech Services. OS/390 Web Solutions CICS n Java to CICS Gate Way n Java to JDBC to DB2 Stored Procedures to CICS n Templates n CICS Web Server n Several Third Party solutions

21 Friday, November 27, 1998 InfoTech Services. OS/390 Web Solutions IMS n Java to JDBC to DB2 Stored Procedures to IMS n Templates n Java to new IMS Java classes n Third Party software tools n CICS offers other facilities. n Future CICS will be able to run Java directly under CICS.

22 Friday, November 27, 1998 InfoTech Services. OS/390 Web Solutions IDMS n Java to JDBC to DB2 Stored Procedures to IDMS n Java to JDBC to IDMS n Possible third party solutions

23 Friday, November 27, 1998 InfoTech Services. OS/390 Web Solutions VSAM n Java to JDBC to DB2 Stored Procedures to VSAM n Java using JRIO classes n Third party solutions

24 Friday, November 27, 1998 InfoTech Services. Tools n WebSphere Application Server u Http Java Enabler u Plugs in many Http Servers n WebSphere Studio u NetObjects u Visual Age for Java u Script Builder u Servlet Builder n Many others

25 Friday, November 27, 1998 InfoTech Services. Tools work with OS390 n Some tools will use FTP behind the covers directly to OS390 n Today some tools may need manual effort to FTP n Later this summer DFS will be available for testing at InfoTech u Mapping a virtual NT drive directly to OS390

26 Friday, November 27, 1998 InfoTech Services. Development Environment n Could develop on NT and port to OS/390 for Java Apps n Could develop directly on OS390 n Development, system test, Acceptance test will be available that line directly with DB2/CICS/etc.

27 Friday, November 27, 1998 InfoTech Services. Why OS/390 solution n Best platform to scale applications n Availability n Workload Manager n GeoPlex/Sysplex n Security n Major Player for E-business transactions. n Web apps should be close to the data. n Removes complexity for OS390 data applications.

28 Friday, November 27, 1998 InfoTech Services. Performance n You need to look at the round trips for a transaction. n Best world is bring App close to the data. n OS390 2.7 is performing 20,000 http page hits per second. n DB2 Stored procedures are extremely fast.

29 Friday, November 27, 1998 InfoTech Services. What is the State of Wisconsin doing? n Department of Revenue n Employee Trust Fund n Treasure Office n Technology Management n Cares Interested n DOT Interested

30 Friday, November 27, 1998 InfoTech Services. Java Application Frame Work n In this topic we will discuss: u Write once run anywhere. u Separation of business, presentation, and data objects. u Component Broker.

31 Friday, November 27, 1998 InfoTech Services. Write once run anywhere n Platform can be chosen after development stage. n Platform can be changed at any time with little effort. n Database manager can be chosen after development stage using JDBC. n Database manager can be changed at anytime.

32 Friday, November 27, 1998 InfoTech Services. Presentation Objects Business Obj Data Objects Separation of Business, presentation, and data objects DB2IMSOracle JDBC SQLJ Applet Servlet CORBA

33 Friday, November 27, 1998 InfoTech Services. Component Broker Look for this next year!

34 Friday, November 27, 1998 InfoTech Services. Education tips. n Experienced OS390 Application programmers have great advantage. They know OS390! n Get training in u OO u HTML u Java n Start with a small project.

35 Friday, November 27, 1998 InfoTech Services. How to code a Java Servlet n In this topic we will discuss: u Servlet API. u How to code JDBC. u How to code Dynamic HTML. u How to code Java Server Page (JSP).

36 Friday, November 27, 1998 InfoTech Services. The Servlet API n A Java Servlet runs under Servlet enabled Webserver. n The Java program uses Servlet API as documented by JavaSoft. n Webserver is responsible to handle Servlet API calls. n Java program codes methods within a Java Servlet Class. These methods are the Servlet API.

37 Friday, November 27, 1998 InfoTech Services. Common Methods to code n Init() method is invoked at the time the Servlet is first loaded. n Destroy() method is invoked at the time the Servlet is unloaded. n doGet() or doPost() method is invoked to handle a request from a browser.

38 Friday, November 27, 1998 InfoTech Services. Init() and destroy() method WebAS Pgm1 Pgm1 Servlet Init() Pgm2 Servletdestroy() Loading Unloading

39 Friday, November 27, 1998 InfoTech Services. doGet() method <form name=dman method=get action=/servlet/SampleServlet> public class SampleServlet extends HttpServlet { … } public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException,IOException { …. }

40 Friday, November 27, 1998 InfoTech Services. doPost() method <form name=dman method=post action=/servlet/SampleServlet> public class SampleServlet extends HttpServlet { … } public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException,IOException { …. }

41 Friday, November 27, 1998 InfoTech Services. How to code JDBC n Before you start, you will need to get the following information: u The database driver F DB2 on NT is COM.ibm.db2.jdbc.app.DB2Driver F DB2 on OS/390 is ibm.sql.DB2Driver u The database URL F DB2 on NT is jdbc:db2:databaseName F DB2 on OS/390 is jdbc:db2os390:DB2LocationName

42 Friday, November 27, 1998 InfoTech Services. JDBC coding step 1 Load the driver try { Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); } catch (ClassNotFoundException e) { e.printStackTrace(); }

43 Friday, November 27, 1998 InfoTech Services. JDBC coding step 2 Setup the URL String url = "jdbc:db2:dbmanu";

44 Friday, November 27, 1998 InfoTech Services. JDBC coding step 3 Perform the connection to DB2 Connection con = DriverManager.getConnection (url,userid,password); Statement stmt = con.createStatement();

45 Friday, November 27, 1998 InfoTech Services. JDBC coding step 4 Perform some SQL ResultSet rs = stmt.executeQuery("SELECT * FROM SYSIBM.SYSTABLES ");

46 Friday, November 27, 1998 InfoTech Services. JDBC coding step 5 Time to Close stmt.close(); con.close();

47 Friday, November 27, 1998 InfoTech Services. How to code Dynamic HTML res.setContentType("text/html"); res.setHeader("Pragma", "no-cache"); res.setHeader("Cache-Control", "no-cache"); res.setDateHeader("Expires", 0); ServletOutputStream out = res.getOutputStream(); out.println(" "); out.println(" manufacturer information ”); out.println(“ ");. Out.println(“</html”);

48 Friday, November 27, 1998 InfoTech Services. How to code Java Server Page (JSP) dataManager dataBean; try { dataBean = data; } catch (Exception ex) {throw new ServletException("Can not create BEAN of class DataBean: " + ex.getMessage()); } ((com.sun.server.http.HttpServiceRequest) req).setAttribute("dataBean",dataBean); ((com.sun.server.http.HttpServiceResponse) res).callPage("/view.jsp",req); } The Servlet Side

49 Friday, November 27, 1998 InfoTech Services. JSP HTML Template manufacturer information <bean name="dataBean" type="dataManager” introspect="no” scope="request"> This is a test. Manufacturer is =

50 Friday, November 27, 1998 InfoTech Services. What does this all mean n OS390 legacy data can be made available to the Internet Online. n OS390 great platform for Web applications requiring: u High volume of transactions. u Large database systems. u 24 by 7 availability. n Java provides great flexibility.

51 Friday, November 27, 1998 InfoTech Services. Questions?


Download ppt "WebServer on OS/390 Bill O'Donnell InfoTech Services"

Similar presentations


Ads by Google