Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/39

Click to flip

39 Cards in this Set

  • Front
  • Back
web app: deployment descriptor: Example <session-config> element.
<session-config>
<session-timeout>
WholeNumberMinutes
</session-timeout>
</session-config>

//if 0 or less - never times out
web app: deployment descriptor: Deployment Descriptor Elements Directly Under <web-app>
<servlet>
<servlet-mapping>
<context-param>
<listener>
<error-page>
<security-constraint>
<login-config>
<security-role>
API: JSP: implicit objects: methods of JSPWriter
- clear - clearBuffer
- close - flush
- getBufferSize - getRemaining
- isAutoFlush - newLine
- print - println
API: JSP: exceptions: methods of JspTagException
- constructors
* ()
* (String)
web app: deployment descriptor: Example <login-config> element: BASIC
<login-config>
<auth-method>
BASIC
</auth-method>
<realm-name>
BasicRealm
</realm-name>
</login-config>
web app: deployment descriptor: Example <web-resource-collection> element
<web-resource-collection>
<web-resource-name>SalesInfo
</web-resource-name>
<url-pattern>/salesinfo/*</url-pattern>
<http-method>POST</http-method>
</web-resource-collection>
API: JSP: exceptions: methods of JspException
- constuctors
* ()
* (String)
* (String, Throwable)
* (Throwable)
- public Throwable
getRootCause();
web app: deployment descriptor: Example <security-role> element
<security-role><role-name>mgr</role-name><security-role>
<servlet>
...
<security-role-ref>
<role-name>mgr</role-name>
<role-link>manager</role-link>
</security-role-ref>
</servlet>
web app: deployment descriptor: Example <taglib> element
<taglib>
<taglib-uri>
abs or rel URI
</taglib-uri>
<taglib-location>
/WEB-INF/tlds/xyz.tld
</taglib-location>
</taglib>
API: JSP: TagExt: methods of BodyTagSupport
**extends Tag, impl. BodyTag**
- doAfterBody
- doInitBody
- doStartTag
- doEndTag
- getBodyContent
- getPreviousOut
- setBodyContent
Design Patterns
- Value Objects:Composition
* create properties on dummy object to pass one, rather than many objects
- MVC: Model-View-Controller
* separate layout from functionality from data
- Data Access Objects: wrap JDBC
- Business Delegate: your methods call business methods
API: JSP: TagExt: methods of BodyTag
**extends IterationTag**
- doStartTag
- doInitBody
web app: deployment descriptor: Example <servlet-mapping>
<servlet-mapping>
<servlet-name>
name used in servlet elmt.
</servlet-name>
<url-pattern>
/catalog | *.snp
</url-pattern>
</servlet-mapping>
custom tag: TLD: example <tag> element
<tag>
<name>tagName</name>
<tag-class>full.name.of.handler</tag-class>
<tei-class>onlyIfUsingTEI</tei-class>
<body-content>tagdependent|JSP|empty</body-content>
<variable>...</variable>
<attribute>...</attribute>
</tag>
web app: deployment descriptor: Example <servlet> element using JSP
<servlet>
<servlet-name>name</servlet-name>
<jsp-file>pathToFile</jsp-file>
<init-param>
<param-name>n</param-name>
<param-value>v</param-value>
</init-param>
</servlet>
API: JSP: TagExt: methods of Tag
**implements Tag**
- findAncestorWithClass
- getID
- getValue
- getValues
- removeValue
- setValue
API: JSP: contract: methods of JSPEngineInfo
- getSpecificationVersion
web app: deployment descriptor: Example <login-config> element: FORM
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/page.jsp</form-login-page>
<form-error-page>/error.jsp</form-error-page>
</form-login-config>
</login-config>
API: JSP: TagExt: methods of BodyContent
**extends JspWriter**
- clearBody
- flush
- getEnclosingWriter
- getReader
- getString
- writeOut
API: JSP: implicit objects: methods of PageContext
- find/remove/set/getAttribute
- getAttributesScope
- getAttributeNamesInScope
- getOut/Exception/Page/ Request/Response/Session/
ServletConfig/ServletContext
- forward
- include
- handlePageException
custom tag: TLD: Example <attribute> element
<attribute>
<name>beanName</name>
<required>true|false|yes|no</required>
<rtexprvalue>true|false|yes|no</rtexprvalue>
<type>java.util.Date</type>
</attribute>
web app: deployment descriptor: Example <taglib> element
<taglib>
<taglib-uri>
/myPRlibary
</taglib-uri>
<taglib-location>
/WEB-INF/tlds/lib.tld
</taglib-location>
</taglib>
API: JSP: contract: methods of JSPFactory
- getDefaultFactory
- getEngineInfo
- getPageContext
- releasePageContext
- setDefaultFactory
web app: deployment descriptor: Example <listener> element
<listener>
<listener-class>
fullyQualifiedClassName
</listener-class>
</listener>
API: Servlet: methods of ServletContext
- getAttribute - getAttributeNames
- getContext - getInitParameter
- getInitParameterNames - getMimeType
- getNamedDispatcher - getRealPath
- getRequestDispatcher - getResource
- getServerInfo - log
web app: deployment descriptor: Example <security-constraint> element
<security-constraint>
<web-resource-collection>
<auth-constraint>
<user-data-constraint>
</security-constraint>
web app: Describe the structure of a web application.
*.war: jar with WAR extension
- root: jsps, html, etc.
- WEB-INF: not accessible
to clients
- web.xml: deployment
descriptor
- classes : loose cls
- lib: supporting jars
API: JSP: TagExt: methods of Tag
- getPageCotext
- getParent
- doStartTag
* returns SKIP_BODY |
EVAL_BODY_INCLUDE
- doEndTag
* returns EVAL_PAGE |
SKIP_PAGE
web app: deployment descriptor: Deployment Descriptor Elements
* Servlet Context Init Params
* Session Configuration
* Filters & Mappings
* Listeners
* Servlets & Mappings
* MIME type mappings
* Error Pages
* Security
* Tag Libraries
web app: deployment descriptor: Example <error-page> element: error code
<error-page>
<error-code>404</error-code>
<location>
404.html
</location>
</error-page>
web app: deployment descriptor: Example <error-page> element: exception
<error-page>
<exception-type>
java.io.IOException
<exception-type>
<location>
/missing.html
</location>
</error-page>
API: Servlet: methods of ServletConfig
- getInitParameter
- getInitParameterNames
- getServletContext
- getServletName
web app: deployment descriptor: Example <user-data-constraint> element
<user-data-constraint>
<transport-guarantee>
CONFIDENTIAL | NONE |
INTEGRAL
</transport-guarantee>
</user-data-constraint>
//CONF or INT usually trigger SSL
API: JSP: TagExt: methods of IterationTag
**extends TAG**
- doAfterBody
* returns EVAL_BODY_AGAIN |
SKIP_BODY
API: JSP: contract: methods of JSPPage
- jspInit()
- jspDestroy()
web app: deployment descriptor: Example <auth-constraint> element
<auth-constraint>
<role-name>mgr</role-name>
<auth-constraint>
On which objects can you call getRequest Dispatcher?
- ServletContext
- ServletRequest
API: JSP: contract: methods of HttpJspPage
- _jspService(req,resp)
web app: deployment descriptor: Example <servlet> element
<servlet>
<servlet-name>name</servlet-name>
<servlet-class>fullyQualifiedName</servlet-class>
<init-param>
<param-name>n</param-name>
<param-value>v</param-value>
</init-param>
</servlet>