Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))

Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
Java module J901
Servlets
Exercises, examples and other material relating to training module J901. This topic is presented on public courses Learning to Program in Java, Java Bootcamp, Java Programming for the Web

Web applications in Java can be provided by Servlet classes running in a container on a web server. In this module, you'll learn how to write simple servlets that allow web users (whether or not they have Java in their browser) to interact with your Java applications.

Related technical and longer articles
Sessions in Servlets

Articles and tips on this subjectupdated
4432Java web application for teaching - now with sessions and clustering / load balancing demonstrations
I regret naming "latmjdemo" with that name when I prut together a web application for the Java version of our web deployemnt course. The nameing isn't random: • L - Linux, the operating system • A - Apache - the Apache httpd web server that's commonly used to front web sites • T - Tomcat ...
2015-02-19
 
3997Servlet v JSP (Java Server Page). What is the difference?
A servlet is a web program that generates output (normally HTML) and returns it to a browser. A JSP (Java Server Page) is a page of HTML ... with some extra bits of code where programatic elements are added as it's returned to the browser So on the surface, it looks like there's a fundamental difference. ...
2013-02-07
 
3044Changing a Servlet - more that just editing and compiling
If you're going to modify a servlet, you'll need to edit and recompile the classes that you're changing - and chances are that will include the main application class. Which means you need to have access to the source. Not a problem if you're a developer of the product, but could be an issue if it's ...
2010-11-12
 
2652Reading and writing cookies in Java Servlets and JSPs
Do you want to check (and perhaps set) cookies within a Java Servlet? I was looking around for good, straightforward examples today but found that most of the published code is only snippets rather than complete examples, or is over-complex for what should be a simple demo. First - do you really want ...
2010-02-26
 
1909javax.servlet cannot be resolved - how to solve
Two common problems in compiling Servlets for use within a Tomcat container ... PROBLEM: My Java Compile of a Servlet says "javax.servlet cannot be resolved" For example: [trainee@easterton sources]$ javac Smallest.java ---------- 1. ERROR in Smallest.java  (at line 2)    import javax.servlet.*;           ^^^^^^^^^^^^^ The import javax.servlet cannot be resolved ---------- 2. ERROR in Smallest.java  (at line 3)    import javax.servlet.http.*;           ^^^^^^^^^^^^^ The import javax.servlet cannot be resolved ---------- 3. ERROR in Smallest.java  (at line 5)    public class Smallest extends HttpServlet {                                  ^^^^^^^^^^^ HttpServlet cannot be resolved to a type ---------- 4. ERROR in Smallest.java  (at line 9)    public void doGet(HttpServletRequest request,                      ^^^^^^^^^^^^^^^^^^ HttpServletRequest cannot be resolved to a type ---------- 5. ERROR in Smallest.java  (at line 10)    HttpServletResponse response)    ^^^^^^^^^^^^^^^^^^^ HttpServletResponse cannot be resolved to a type ---------- 6. ERROR in Smallest.java  (at line 11)    throws IOException, ServletException                        ^^^^^^^^^^^^^^^^ ServletException cannot be resolved to a type ---------- 6 problems (6 errors)[trainee@easterton sources]$ SOLUTION: ...
2008-11-26
 
Examples from our training material
Lifeanswer.java   Basic Servlet - simple calculation and a visit counter
Maryland.java   Checking and setting cookies in a Servlet
Memo.java   Linking requests together via a session in a servlet
Noah.java   A simple servlet, and how to modify it
svl.html   Servlet demo - HTML form
svl_right.java   Servlet to read form and echo
symdyn.html   Dynamic operation of a Servlet
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from [here].
Topics covered in this module
What is a Servlet?.
Running the server.
A first servlet.
The HTML form.
The servlet.
Reusing a servlet.
Form and results in same window.
Interactive form.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Java,Ruby, Lua, Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre.


You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.info/resources/J901.html • PAGE BUILT: Sun Oct 11 14:50:09 2020 • BUILD SYSTEM: JelliaJamb