Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “As can be seen in the example, we generate an instance of JsonObject
by invoking the add()
method on an instance of JsonObjectBuilder
.”
A block of code is set as follows:
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Login Error</title> </head> <body> There was an error logging in. <br /> <a href="login.html">Try again</a> </body> </html>
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
package com.ensode.jakartaeebook.security.basicauthexample; //imports omitted for brevity @BasicAuthenticationMechanismDefinition @WebServlet(name = "SecuredServlet", urlPatterns = {"/securedServlet"}) @ServletSecurity( @HttpConstraint(rolesAllowed = "admin")) public class SecuredServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.getOutputStream().print( "Congratulations, login successful."); } }
Any command-line input or output is written as follows:
appclient -client simplesessionbeanclient.jar
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Now that we have created a customer, our Customer List page displays a data table listing the customer we just created.”
Tips or important notes
Appear like this.