122 Chapter 6 Response Rendering Serving Static Files The easiest way to start responding to URL requests is to place static files inside the project’s /public directory. As the name implies, this is where all publicly accessible resources are located. Static files include HTML markup pages, CSS stylesheets, JavaScript files, images, and anything else that you would place on a plain old web server. Well, this isn’t very exciting, is it? If your users wanted to see static content, they could go read a book. What we want is dynamic content that can react to specific input data and generate a custom response. That’s. | 122 Chapter 6 Response Rendering Serving Static Files The easiest way to start responding to URL requests is to place static files inside the project s public directory. As the name implies this is where all publicly accessible resources are located. Static files include HTML markup pages CSS stylesheets JavaScript files images and anything else that you would place on a plain old web server. Well this isn t very exciting is it If your users wanted to see static content they could go read a book. What we want is dynamic content that can react to specific input data and generate a custom response. That s what this Web world is all about anyway so let s give our users a truly interactive experience. Do not fret static files you still have an important role to serve. Even the richest of Internet applications requires a bootstrap HTML page to get things started and images style sheets and of course Javascript to enable the browser as an application platform. Remember any files located within the public directory are directly accessible by the URL. This means that you must ensure that you secure sensitive data behind an authentication scheme and also not rely on simple page flow to control your application. An example might be an online quiz. After the student answers a question he is forwarded to the answer page for further discussion. If your file and directory conventions are similar to and ZtopiclZ you might be surprised how well your students do when taking these tests There are many ways to prevent such obvious URL hacking but you must be aware of how files may be accessed inside the public directory. Internationalizing Static Files For performance reasons support for serving internationalized files is disabled in WebSphere sMash. If you plan on offering pages in multiple languages for your application you will want to enable this feature. Internationalization i18n uses content negotiation to determine the browser s preferred