The advanced tutorials on this page were originally based on Marty's book
More Servlets and JavaServer Pages, but have evolved significantly
to incorporate new technologies and approaches. They have been tested by Marty in live training courses
in the US, Canada, Australia, Puerto Rico, Japan, Mexico, and the Philippines. Also see
the beginning and intermediate servlet and JSP tutorials for topics like
setting up Eclipse, deploying apps, servlet basics, cookies, session tracking, JSP scripting, file inclusion, and much more.
In addition,
the training materials home page has tutorials on many other Java-related topics.
The PDF versions of the tutorials are freely available to anyone for personal use. These versions contain
the complete text of the PowerPoint slides, and are what you want if your goal is to learn or review the technology.
As a courtesy, we also make the original PowerPoint slides available to university faculty for no charge.
See the J2EE instructor materials page for details.
To arrange a servlet & JSP course at your organization based on these materials, contact
info@coreservlets.com. These courses can be customized to
use any combination of the materials on the J2EE tutorials site,
and new materials can be added for specific client needs. To learn more details about the instructor,
the curriculum for the live training courses, or the public course schedule, please see
http://courses.coreservlets.com.
If you find these free tutorials helpful, we would appreciate it if you would
link to us.
tomcat-users.xml.
Simple Tomcat-specific username/password/role file. For real apps, always use an
encrypted file: this is just for testing. Drop this file in the
Tomcat "conf" folder. If you are running Tomcat manually, this is
tomcat-install-dir/conf. If you are running Tomcat within Eclipse,
this is something similar to eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/conf.
The advantages of declarative security usually outweigh the disadvantages. But not always.
Combination security: mixing server-managed and servlet-managed (programmatic) security
Solve one of the drawbacks of declarative security with only a little bit of extra work.
Pure programmatic security
Solve the other drawbacks, but with a very lot of extra work.
Source code:
hotdotcom-internal.zip.
Web app used for the first set of examples in this section (using
isUserInRole for container-managed security with some programmatic security). Bundled as
an Eclipse project.
stocks.zip.
Web app used for the second set of examples in this section (using
pure programmatic security and tracing SSL info). Bundled as
an Eclipse project.
tomcat-users.xml.
Simple Tomcat-specific username/password/role file. For real apps, always use an
encrypted file: this is just for testing. Drop this file in the
Tomcat "conf" folder. If you are running Tomcat manually, this is
tomcat-install-dir/conf. If you are running Tomcat within Eclipse,
this is something similar to eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/conf.
In this section, this file applies only to the hotdotcom-internal app, not the stocks app.
spring-blank.zip.
Basic starting point for Spring apps: an Eclipse project
with the required JAR files, a blank applicationContext.xml,
the Spring IDE project nature,
and nothing else. Copy and rename this when you start new
Spring-based apps.