Deploying the Web-Based Application


The servlet has been written, the USatm76.java program is ready, and it's time to deploy our web-based application. The first step is to start the Java web server. Once this is done, you must compile the USatm76 and AtmServlet source code and place the resulting .class file in the proper directory on the server. Where you place the .class file is server-dependent but will generally be in a subdirectory to the server root directory. For the example in this chapter, the server root directory was /usr/jserv. The .class files were placed in the /usr/jserv/servlets directory.

At this point, we can access the server-based application from a client machine by typing the appropriate address into the location window of the browser. For example, let's say the server is a machine named www.JackZack.com and is listening on port number 8080. If the server root directory were /usr/jserv and if we placed the application byte code into the directory /usr/jserv/servlets, a client machine could invoke the servlet by typing the following into the location window of the browser ”

http://www.JackZack.com:8080/servlets/AtmServlet

Figure 27.2 shows a typical result when the web-based atmosphere modeling application is run.

Figure 27.2. Web-based atmosphere modeling tool

graphics/27fig02.jpg



Technical Java. Applications for Science and Engineering
Technical Java: Applications for Science and Engineering
ISBN: 0131018159
EAN: 2147483647
Year: 2003
Pages: 281
Authors: Grant Palmer

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net