Examples

Web Development with Java

Chapter 1

/webdev/ViewJsp/ch1/Simple.html
/webdev/ViewJsp/ch1/poem.html

Try It: /webdev/ch1/poem.html

/webdev/ViewJsp/ch1/poem_formatted.html

Try It: /webdev/ch1/poem_formatted.html

/webdev/ViewJsp/ch1/OnePage/SimpleForm.html

Try It: /webdev/ch1/OnePage/SimpleForm.html

Try It: /webdev/ch1/OnePage/SimpleForm.html

/webdev/ViewJsp/ch1/simple_web_xml.html
/webdev/ViewJsp/ch1/OnePage/First.jsp

Try It: /webdev/ch1/OnePage/First.jsp

/webdev/ViewJsp/ch1/OnePage/FormInitialized.jsp

Try It: /webdev/ch1/OnePage/FormInitialized.jsp

/webdev/ViewJsp/ch1/OnePage/FormInitializedBad.jsp

Try It: /webdev/ch1/OnePage/FormInitializedBad.jsp

Source for a simple JSP
Servlet for a simple JSP

Chapter 2

/webdev/ViewJsp/ch2/TwoPages/Simple/Edit.jsp
/webdev/ViewJsp/ch2/TwoPages/Simple/Confirm.jsp

Try It: /webdev/ch2/TwoPages/Simple/Edit.jsp

/webdev/ViewJsp/ch2/TwoPages/Error/Confirm.jsp

Try It: /webdev/ch2/TwoPages/Error/Edit.jsp

/webdev/ViewJsp/ch2/TwoPages/Confirm.jsp

Try It: /webdev/ch2/TwoPages/Edit.jsp

/webdev/ViewJsp/ch2/ThreePages/Process.jsp
/webdev/ViewJsp/ch2/ThreePages/Confirm.jsp

Try It: /webdev/ch2/ThreePages/Edit.jsp

/webdev/ViewJsp/ch2/jspController/Controller.jsp
/webdev/ViewJsp/ch2/jspController/Edit.jsp
/webdev/ViewJsp/ch2/jspController/Confirm.jsp
/webdev/ViewJsp/ch2/jspController/Process.jsp

Try It: /webdev/ch2/jspController/Controller.jsp

/webdev/ViewJsp/ch2/servletController/Edit.jsp
/webdev/ViewJsp/ch2/servletController/Confirm.jsp
/webdev/ViewJsp/ch2/servletController/Process.jsp
/webdev/ViewClass/ch2/servletController/Controller.java

Try It: /webdev/ch2/servletController/Controller

Chapter 3

/webdev/ViewJsp/ch3/startExample/Edit.jsp
/webdev/ViewJsp/ch3/startExample/Confirm.jsp
/webdev/ViewJsp/ch3/startExample/Process.jsp

Try It: /webdev/ch3/startExample/Controller

/webdev/ViewClass/ch3/dataBean/RequestData.java
/webdev/ViewClass/ch3/dataBean/Controller.java
/webdev/ViewJsp/ch3/dataBean/Edit.jsp
/webdev/ViewJsp/ch3/dataBean/Confirm.jsp
/webdev/ViewJsp/ch3/dataBean/Process.jsp

Try It: /webdev/ch3/dataBean/Controller

/webdev/ViewClass/ch3/defaultValidate/RequestDataDefault.java
/webdev/ViewClass/ch3/defaultValidate/Controller.java

Try It: /webdev/ch3/defaultValidate/Controller

/webdev/ViewClass/ch3/sharedVariable/error/Controller.java

Try It: /webdev/ch3/sharedVariable/error/Controller

/webdev/ViewClass/ch3/sharedVariable/Controller.java

Try It: /webdev/ch3/sharedVariable/Controller

/webdev/ViewClass/ch3/reorganised/HelperBase.java
/webdev/ViewClass/ch3/reorganised/ControllerHelper.java
/webdev/ViewClass/ch3/reorganised/Controller.java

Try It: /webdev/ch3/reorganised/Controller

Chapter 4

/webdev/ViewSource/log4j-1.2.11.jar
/webdev/ViewClass/shared/InitLog4j.java
/webdev/ViewSource/commons-collections-2.1.1.jar
/webdev/ViewSource/commons-logging-1.0.4.jar
/webdev/ViewSource/commons-beanutils.jar

/webdev/ViewClass/ch4/enhanced/ControllerHelper.java
/webdev/ViewClass/shared/HelperBaseCh4.java
/webdev/ViewClass/shared/ButtonMethod.java
/webdev/ViewClass/ch4/enhanced/Controller.java

Try It: /webdev/ch4/enhanced/Controller

Chapter 5

Try It: /webdev/ch5/TestRegEx

/webdev/ViewSource/ejb3-persistence.jar
/webdev/ViewSource/hibernate3.jar
/webdev/ViewSource/hibernate-annotations.jar
/webdev/ViewSource/hibernate-commons-annotations.jar
/webdev/ViewSource/hibernate-validator.jar

/webdev/ViewClass/ch5/requiredValidation/RequestDataRequired.java
/webdev/ViewClass/shared/HelperBaseCh5.java
/webdev/ViewClass/ch5/requiredValidation/ControllerHelper.java

Try It: /webdev/ch5/requiredValidation/Controller

/webdev/ViewClass/ch5/postServlet/Controller.java
/webdev/ViewClass/ch5/postServlet/ControllerHelper.java

Try It: /webdev/ch5/postServlet/Controller

/webdev/ViewSource/antlr-2.7.6.jar
/webdev/ViewSource/asm-attrs.jar
/webdev/ViewSource/asm.jar
/webdev/ViewSource/c3p0-0.9.1.jar
/webdev/ViewSource/cglib-2.1.3.jar
/webdev/ViewSource/commons-beanutils.jar
/webdev/ViewSource/commons-collections-2.1.1.jar
/webdev/ViewSource/commons-logging-1.0.4.jar
/webdev/ViewSource/dom4j-1.6.1.jar
/webdev/ViewSource/ehcache-1.2.3.jar
/webdev/ViewSource/ejb3-persistence.jar
/webdev/ViewSource/hibernate3.jar
/webdev/ViewSource/hibernate-annotations.jar
/webdev/ViewSource/hibernate-commons-annotations.jar
/webdev/ViewSource/hibernate-validator.jar
/webdev/ViewSource/jdbc2_0-stdext.jar
/webdev/ViewSource/jta.jar
/webdev/ViewSource/log4j-1.2.11.jar
/webdev/ViewSource/xerces-2.6.2.jar
/webdev/ViewSource/log4j-1.2.11.jar
/webdev/ViewSource/mysql-connector-java-5.0.6-bin.jar
/webdev/ViewSource/jstl.jar
/webdev/ViewSource/standard.jar

/webdev/ViewClass/shared/HibernateHelper.java
/webdev/ViewClass/shared/PersistentBase.java
/webdev/ViewClass/ch5/persistentData/Controller.java
/webdev/ViewClass/ch5/persistentData/ControllerHelper.java
/webdev/ViewJsp/validator/Min.java
/webdev/ViewJsp/validator/MinValidator.java
/webdev/ViewJsp/validator/Max.java
/webdev/ViewJsp/validator/MaxValidator.java
/webdev/ViewClass/shared/WebappListener.java

Try It: /webdev/ch5/persistentData/Controller

/webdev/ViewJsp/ch5/hibernate.cfg.xml
/webdev/ViewClass/ch5/persistentData/configure/ControllerHelper.java

Chapter 6

/webdev/ViewJsp/ch6/test.css
/webdev/ViewJsp/ch6/test.css.html

Try It: /webdev/ch6/test.css.html

/webdev/ViewClassJsp/ch6/complexForm/Edit.jsp
/webdev/ViewClass/ch6/complexForm/RequestDataComplex.java
/webdev/ViewClassJsp/ch6/complexForm/Confirm.jsp
/webdev/ViewClassJsp/ch6/complexForm/Process.jsp

Try It: /webdev/ch6/complexForm/Controller

/webdev/ViewClass/shared/HelperBaseCh6.java
/webdev/ViewClass/shared/AttributeType.java
/webdev/ViewClass/shared/SetByAttribute.java
/webdev/ViewClassJsp/ch6/complexInit/Edit.jsp

Try It: /webdev/ch6/complexInit/Controller

/webdev/ViewClassJsp/ch6/complexPersistent/Process.jsp

Try It: /webdev/ch6/complexPersistent/Controller

Chapter 7

/webdev/ViewClassJsp/ch7/accountLogin/Login.jsp
/webdev/ViewClass/ch7/accountLogin/ControllerHelper.java

Try It: /webdev/ch7/accountLogin/Controller

/webdev/ViewClass/ch7/accountRemove/ControllerHelper.java

Try It: /webdev/ch7/accountRemove/Controller

/webdev/ViewClass/shared/CookieUtil.java
/webdev/ViewClass/ch7/cookie/Controller.java
/webdev/ViewClass/ch7/cookie/ControllerHelper.java
/webdev/ViewClassJsp/ch7/cookie/ShowCookies.jsp

Try It: /webdev/ch7/cookie/Controller

/webdev/ViewClass/ch7/accountCookie/ControllerHelper.java

Try It: /webdev/ch7/accountCookie/Controller

/webdev/ViewClass/ch7/catalog/CatalogItem.java
/webdev/ViewClass/ch7/catalog/CreateCatalog.java
/webdev/ViewClass/ch7/catalog/ShoppingCart.java
/webdev/ViewClass/ch7/catalog/ControllerHelper.java
/webdev/ViewClassJsp/ch7/catalog/BrowseLoop.jsp
/webdev/ViewClassJsp/ch7/catalog/ProcessCart.jsp

Try It: /webdev/ch7/catalog/Controller

Appendix

/webdev/ViewClass/shared/HibernateHelper.java
/webdev/ViewClass/shared/PersistentBase.java
/webdev/ViewClass/shared/InitLog4j.java
/webdev/ViewClass/shared/CookieUtil.java
/webdev/ViewClass/shared/AttributeType.java
/webdev/ViewClass/shared/DataCollections.java
/webdev/ViewClass/shared/ButtonMethod.java
/webdev/ViewClass/shared/SetByAttribute.java
/webdev/ViewClass/shared/HelperBaseCh4.java
/webdev/ViewClass/shared/HelperBaseCh5.java
/webdev/ViewClass/shared/HelperBaseCh6.java
/webdev/ViewClass/shared/WebappListener.java

This JAR file contains all of the .java and .class files from the shared package. Add this to the lib directory of the web application to access all of the files from the shared package. /shared.jar


Contact the author