This site is 100% ad supported. Please add an exception to adblock for this site.

SCWCD Exam Questions

Terms

undefined, object
copy deck
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
- getPageCotext
- getParent
- doStartTag
* returns SKIP_BODY |
EVAL_BODY_INCLUDE
- doEndTag
* returns EVAL_PAGE |
SKIP_PAGE
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
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>

Deck Info

38

permalink