The Example JSP Pages
This chapter illustrates JSP scripting elements using
webclient, a version of thehello1example introduced in Chapter 2 that accesses a web service. To build thewebclientexample, follow these steps:
- Build and deploy the JAX-WS web service
MyHelloServicedescribed in Deploying the Service (page 501).- In a terminal window, go to
<INSTALL>/javaeetutorial5/examples/jaxws/webclient/.- Run
ant. This target will spawn any necessary compilations, will copy files to the<INSTALL>/javaeetutorial5/examples/jaxws/webclient/build/directory, will create a WAR file, and will copy it to the<INSTALL>/javaeetutorial5/examples/jaxws/webclient/distdirectory.- Start the Application Server.
To deploy the example using
ant, run the following command:To learn how to configure the example, refer to the deployment descriptor (the
web.xmlfile), which includes the following configurations:To run the example, open your browser to
http://localhost:8080/webclient/greeting.
Note: The example assumes that the Application Server runs on the default port, 8080. If you have changed the port, you must update the port number in the file
<INSTALL>/javaeetutorial5/examples/jaxws/webclient/response.jspbefore building and running the example.