Static Resources
Everything you've learned so far in this book, up to the last exercise, is sufficient in order to build web applications and dynamic websites; you just need to put all the pieces together. What you've been doing in this chapter is returning messages that are different in nature, but that are all hardcoded as strings. Even dynamic messages have been based on templates hardcoded in the source file of the exercises and activities. Let's now consider something. In the case of the first "hello world
" server, the message never changed. If we wanted to modify the message and return a "Hello galaxy
" message, we would have to change the text in the code and then recompile and/or run the server again. What if you wanted to sell your simple "hello" server and give the option to everybody to specify a custom message? Of course, you should give the source code to everybody so that they could recompile and run the server. Although you...