Murach's Java Servlets and JSP (2nd Edition)
How to develop JavaServer Pages

This chapter shows how to code JavaServer Pages (JSPs). In particular, it shows how to code a JSP that uses scriptlets, expressions, parameters, and regular Java classes to write data to a text file. To see how well this chapter works, you can download this chapter for free.

Chapter 5 How to develop JavaServer Pages
The Email List application 138
The user interface for the application 138
The code for the HTML page that calls the JSP 140
The code for the JSP 142
How to code a JSP 144
How to code scriptlets and expressions 144
How to use the methods of the request object 146
How to get the real path for a file 148
How to request a JSP 150
How to request a JSP with the HTTP Get method 150
How to request a JSP with the HTTP Post method 152
When to use the HTTP Get and Post methods 152
How to use regular Java classes with JSPs 154
The code for the User and UserIO classes 154
A JSP that uses the User and UserIO classes 158
How to use three more types of JSP tags 160
How to import classes 160
How to code comments in a JSP 162
How to declare instance variables and methods 164
How to work with JSP errors 166
How to fix common JSP errors 166
When and how to view the servlet that's generated for a JSP 168
t




Murach's Java Servlets and JSP

Learn more about this book

View the table of contents

Add this book to your cart

Download this chapter