Để hỗ trợ các sử dụng J2EE SDK đi kèm với phát triển J2EE và các công cụ triển khai, một máy chủ Web, cơ sở dữ liệu Cloudscape, ứng dụng phần mềm máy chủ Java, hỗ trợ Extensible Markup Language (XML), các API J2EE và Java Plug-In. Java Plug-In cho phép bạn chạy Java 2 applet trong các trình duyệt hỗ trợ một bản phát hành trước đó của Java Runtime Environment | SEPTEMBER 27 2000 7 Import Statements The servlet code begins with import statements for the following packages which contains generic protocol-independent servlet classes. The HTTPServiet class uses the servietException class in this package to indicate a servlet problem. which contains HTTP servlet classes. The HttpServiet class is in this package. for system input and output. The HttpServiet class uses the lOException class in this package to signal that an input or output exception of some kind has occurred. for using the Java Naming and Directory Interface JNDI APIs to look up the session bean home interface. for looking up the session bean home interface and making its remote server object ready for communications. init Method The method looks up the session bean home interface and creates its instance. The method uses the JNDI name specified during component assembly caics to get a reference to the home interface by its name. The next line passes the reference and the home interface class to the method to be sure the reference can be cast to type caicHome. InitiaiContext ctx new InitiaiContext Object objref caics homecaic CaicHome obj ref doGet Method The parameter list for the doGet method takes a request and response object. The browser sends a request to the servlet and the servlet sends a response back to the browser. The method implementation accesses information in the request object to find out who made the request what form the request data is in and which HTTP headers were sent and uses the response object to create an HTML page in response to the browser s request. The doGet method throws an lOException if there is an input or output problem when it handles the request and a servietException if the request could not be handled. To calculate the bonus value the doGet method creates the .