Puts the Webmaster in complete control. DirectDNS, Bannerless hosting, SSL Certs, Free Email Forwarding. Hellobilly normal. Click to share on Twitter (Opens in new window). Click to share on Facebook (Opens in new window).
Hello Billy Marchiafava Lyrics
Getting Started With ServletsSlot machine pay table.
|1. MyFirstServlet||The 'Hello World' of servlet programming. Source: MyFirstServlet.java|
|The second servlet. This one involves form processing. The form includes text, select, radio, and checkbox objects. Source: MySecondServlet.java|
|Adopted from Deitel and Deitel's Internet and WWW: How To Program. This shows an example of session tracking. The Java code can be found in SessionExampleWithAttribute.java.|
|4. Coffee||This webapp extends the InsertCoffees program by selecting the coffees inserted using a simple servlet and JDBC. Code: GetCoffee.java Access DB: coffee.mdb|
|6. RegisterEmailURLServlet||This servlet shows how one can|
* 1. Write a doGet method to return an HTML form
* 2. Write a doPost method to retrieve the values in the form and insert them
* into an Access DB (called Student.mdb). The Java source is RegisterEmailURLServlet.
JSP (the examples given below are presented in the document JSP Examples for 353.doc)
|HelloBilly.jsp||How is this different from HelloBilly.html?|
|date.jsp||This shows a JSP expression|
|Hello7Times.jsp||This shows a JSP Scriptlet|
|RegisterToDB.html||This shows a JSP that gets the parameters and invokes the functionality of another class to store the parameter values into an Access DB|
|IncludeExamples.jsp||This shows the difference between compile time and run time includes|
|Sun's Tutorial on JSP, JavaBean||An easy to follow example of how to setup JSP page that makes use of JavaBean.|
|Shopping Cart Example from Murach's text||This shows how a numbers of JSPs and servlet work together. The whole project has been exported to a 'project interchange' file, a format that allows one to easily export and import a project to share with team members. The file is available at ShoppingCartJSP-ProjInterchange.zip (and in t:itk353). Just create a Dynamic Web Project and import this file into the project. Select both the ShoppingCartJSP and ShoppingCartJSPEAR projects when prompted. Everything will be put into the right places! Note: the application reads a file named AllProducts.txt and assume that it is in H:.|
More Sample Applications
Hillbilly Elegy Movie
|1. Core Web Programming||This is the link to the Core textbook's website.|
|3. DukeBookStore||Comprehensive example with Session Tracking, Shopping Cart, and 'DB' (simulated databases only)) [Source files] Note: This is available in T:ACS353DukeBook. Just create a web application called DukeBookin JRun and copy all the files in the directory to the D:JRunserversdefaultDukeBook folder. When done, just type:|
Another application that makes use of servlets, JSP, JDBC, and JavaMail. The files are in the folder T:ACS353vistas
|A Web app that|
uses servlets, JDBC, and email. Use the id of 1 and password of 1234 to log in as a member. The files are in the folder T:ACS353examples. Note the web application you need to create for this is 'examples' (not a very descriptive name but that is what was used before).
|6. CoffeeExtraShot||The same as Coffee but puts the retrieval result in HTML table and added a Date field. Code: GetCoffeeExtraShot.java Access DB: coffee.mdb|
Bonus credits [3 pts]: This app runs perfectly fine from the localhost but the animation is messed up when run from the my server. Why? Give the reason and provide a solution.
|Another shopping cart example from Hall (Core Servlets and JSP). This shows session tracking and shopping cart. Note that this web application resides in the coreservlets package under MyProject. Thus, the way to invoke a servlet in this app is:|
To make it easier for one to examine and use this sample app, I have zipped the Websphere workspace into WSADWork.zip. To use it, simply rename your H:WSADWork, say to H:WSADWorkOld, and unzip the above to your H: drive.
This is also available in T:itk353WSADWork as well.
|9. Majestic Video++ System||The project interchange file is available at t:itk353Majestic-ProjInterchange.zip. (It is also available at Majestic-ProjInterchange.zip) Simple import that into your workspace (File > Import > Project Interchange > select the zip file > check both the entries (Majestic and MajesticEAR) > OK). You need to also setup the Access database, which needs to be referred to by the DSN majesticDB. The Access file is availble at majestic.mdb. When all is done, simply run the index.jsp page.|