SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 86 | Next

Larry Brown, Marty Hall, and Yaakov Chaikin

"Core Servlets and JavaServer Pages, Volume 2"

w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

InitTest
coreservlets.InitServlet

firstName
Larry


emailAddress
ellison@microsoft.com



InitTest
/showInitValues



Listing 2.8 InitServlet.java (continued)
Chapter 2 ?–  Controlling Web Application Behavior with web.xml 60
Figure 2??“12 The InitServlet when correctly accessed with its custom URL.
Figure 2??“13 The InitServlet when incorrectly accessed with the default URL. Disable
the invoker servlet to avoid this problem.
Assigning JSP Initialization Parameters
Although the servlet specification provides a mechanism for assigning JSP initialization
parameters, in practice, this is discouraged and thus very rare. A much better
approach to loading initialization parameters is to use the Model-View-Controller
(MVC) architecture and do the initialization inside the init method of a servlet.
Providing initialization parameters to JSP pages differs in three ways from providing
them to servlets.


Pages:
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98