Chapter 7: Web Application Confi guration By arbitrary,
Chapter 7: Web Application Confi guration By arbitrary, we do not mean that they can be placed anywhere and the server will find them. Rather, as long as the files are put within the Web application directory, and outside of the WEB-INF directory, then the application itself (and its designer) decides where files are placed. In the example Web application shown in Figure 7-1 , index.jspis the default welcome page for the Web application. The welcome page is the Web page served up when you access the Web application URL in this case, http://localhost:8080/exampleapp/. If this Web page were not present, then, by default, index.htmland index.htm are looked for and served. These welcome pages are subject to configuration and can be modified, as you will see later in the chapter. Besides index.jspand contact.html, the other public resources in the example application are the image files in the imagesdirectory. URL Mappings In most cases, when you request a Web resource from your browser (such as an HTML page), it is served to you without modification by the Web server. JSP pages are an exception to this. A JSP page is first passed through a JSP compiler that compiles the file to a Java file, and then compiles the Java file to a Servlet class. This Servlet class then executes, and the output is displayed on your browser. The code that makes this happen is a URL mapping defined using a
For high quality java hosting services please check java web hosting website.