DD

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Four steps which must be completed by the container before request servicing can begin

1. Listenet instantiation from <listener> element 2. Context instantiation 3. Filter initialization 4. Servlet initialization in order specified in <load-on-startup>

ServletContext parameters in DD

<contex-param> <param-name> <param-value> <contex-param>

provides user friendly name

<display-name>

web app is suitable to be distributed across distributed network, such as cluster of load balancing server. Omit if not. If yes <di></di> or <di/>

<distributable>

Specify error pages in DD

<error-page> <error-code> or <exception-type> <location> context relative URL to the error page or servlet

Filter mapping in DD

<filter-mapping> <filter-name> <url-pattern> map fileter against URL - or - <servlet-name> filter to be invoked when the given servlet is executed <dispatcher> FORWARD, INCLUDE, REQUEST, ERROR - if no element is provided, default is applied to request only

filter declaration in DD

<filter> <filter-name> Logical name <filter-class> fully qualified name <init-param> init parameters (accessed by FilterConfig) </filter>

Icons in DD

<icon> reference for the image <small-icon> GIF or JPEG <large-icon> GIF or JPEG

JSP in DD

<jsp-config> <jsp-property-group> inside the <jsp-config-element> <url-pattern>archives/*<url-pattern> There may be multiple <url-pattern> elements <page-encoding> character encoding used to encode the JSP which is to be parsed <el-ignored> <scripting-invalid> <is-xml> denotes a group of JSP as being XML-formatted documents and not JSP pages <include-prelude> headers , context relative path <include-coda> footers, context relative path, could be many elements, performed in order

taglin declaration in DD

<jsp-config> <taglib> <taglib-uri> must be unique for for every <taglib> declaration <taglib-location> context-relative location of TLD file or JAR file containing TLD

Listener

<listener> <listener-class> the only mandatory element - fully qualified name

Content type in DD

<mime-mapping> <extension>txt <mime-type>text/plain

Servlet mapping in DD

<servler-mapping> <servlet-name> <servlet-url> or <jsp-page> </servlet-mapping>

Servlet declaration in DD

<servlet> <servlet-name> <servlet-class> or <jsp-file> -> Location of JSP file is context relative <init-param> -> Accesses by ServletConfig < load-on-startup> -> 0 and more <run-as> <security-role-ref> </servlet>

Session timeout in DD

<session-config> <session-timeout> min, 0 or negative never time out </session-config>

Specify default files

<welcome-file-list> <welcome-file>

How JSPs are configured

JSP's are configured in groups, properties applied to each of the group of JSPs separately from any other group. An individual JSP in a group may override the general properties defined in that group for itself by including configuration information in one of its page directives

when the container forwards to an error page, it set the following request-scope attributes

javax.servlet.error.status_code( Integer) javax.servlet.error.exception_type(Class) javax.servlet.error.error_message(String) - error message supplied by servlet/jsp or a default javax.servlet.error.error.exeption(Throwable) - exception instance caused error javax.servlet.error.error_request_uri(String) - URI of resource caused error javax.servlet.error.servlet_name(String) - logical name of servlet caused error


Ensembles d'études connexes

Ch 25: Management of Patients with Complications of Heart Disease

View Set

Fundamentals of Nursing: Week 12

View Set

Business Skills and Environment Part 1

View Set

Fundamentals Ch. 44 Pain Management

View Set

Web Development / React Fundamentals

View Set

Personality psych ch.12 the humanistic approach relevant research

View Set

Principles of Finance Exam 1 - UARK (Kefu Wu)

View Set

Piper School: Abraham Lincoln and the Civil War

View Set

CISCO Chapter 6 Exam Flash Cards

View Set