Unleash Your Potential - Namagunga Girls Coding Club
Developing Java Web Applications
1. Developing Java Web Applications Dr. Harry Chen CMSC 491S/691S February 11, 2008
2.
3. A canonical Web architecture Do you see any technical issues in this architecture? Source: http://www.ibm.com/developerworks/ibm/library/it-booch_web/
12. HelloWorld Servlet Set HTTP Header: Content-Type (HTML) Creates the HTML page content Implementation that handles HTTP GET request Outputs the HTML into the HTTP Response Do you see any technical issues with this implementation? Source: http://www.informit.com/articles/article.aspx?p=26920
13.
14. HelloWorld JSP Source: http://mainline.brynmawr.edu/~dkumar/JSP/ Use Java as if it’s a scripting language
25. Action: HelloWorld.java Extends a standard Action superclass. Implement the business logic How to access the Bean (the message)
26. View: helloworld.jsp Use JSP Tag lib to access our Bean (the message) If you don’t like to use JSP, you have other options: Freemarker and Velocity
35. Spring IoC: a more complex example (1) The Class object “folderTagListener” is dynamically associated with “bookmarkManager” via a configuration file, not hardwired in the source of “bookmarkManager”. (2) Developers also fine tune the number of WorkerThread to be instantiated by “bookmarkManager” in the same configuration file. (1) (2)