File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Last Minute Reference Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Last Minute Reference" Watch "Last Minute Reference" New topic

Last Minute Reference

Adithya Rayaprolu
Ranch Hand

Joined: Jun 19, 2001
Posts: 137
Hi all,
I prepared this for my reference. I personally dislike remembering all the methods in an interface/class and the elements and their mandatory sub elements in DTD. But since in the exam, we are being asked about these, I prepared this document. Hope it will be of some help to who are preparing for the exam. This does not include JSP syntax, but you can refer to JSP Syntax Guide at

Deployment Descriptor DTD (web-app_2_3.dtd)
? � Optional (0 or 1)
* � Any number (0 - n)
+ � 1 or more (1 - n)
No following character � Required (1)
<!ELEMENT web-app
(icon?, display-name?, description?, distributable?,
context-param*, <!ELEMENT context-param (param-name, param-value, description?)>
listener*, <!ELEMENT listener (listener-class)>
servlet*, <!ELEMENT servlet (icon?, servlet-name, display-name?, description?, (servlet-class|jsp-file),
init-param*, <!ELEMENT init-param (param-name, param-value, description?)>
load-on-startup?, run-as?,
security-role-ref*)><!ELEMENT security-role-ref (description?, role-name, role-link?)>
servlet-mapping*, <!ELEMENT servlet-mapping (servlet-name, url-pattern)>
session-config?, <!ELEMENT session-config (session-timeout?)>
mime-mapping*, <!ELEMENT mime-mapping (extension, mime-type)>
welcome-file-list?, <!ELEMENT welcome-file-list (welcome-file+)>
error-page*, <!ELEMENT error-page ((error-code | exception-type), location)>
taglib*, <!ELEMENT taglib (taglib-uri, taglib-location)>
security-constraint*, <!ELEMENT security-constraint (display-name?,
web-resource-collection+, <!ELEMENT web-resource-collection
(web-resource-name, description?,
url-pattern*, http-method*)>
auth-constraint?, <!ELEMENT auth-constraint (description?, role-name*)>

user-data-constraint?)> <!ELEMENT user-data-constraint (description?,
transport-guarantee)> NONE, INTEGRAL, or CONFIDENTIAL.
login-config?, <!ELEMENT login-config
(auth-method?, "BASIC", "DIGEST", "FORM", or "CLIENT-CERT"
realm-name?, Only for BASIC
form-login-config?)><!ELEMENT form-login-config (form-login-page, form-error-page)>
security-role*, <!ELEMENT security-role (description?, role-name)>
Element | Mandatory sub elements
web-app | ----------
context-param | param-name, param-value
listener | listener-class
servlet | servlet-name, servlet-class | jsp-file
init-param | param-name, param-value
security-role-ref | role-name
servlet-mapping | servlet-name, url-pattern
session-config | --------
error-page | error-code | exception-type, location
taglib | taglib-uri, taglib-location
security-constraint | web-resource-collection
web-resource-collection| web-resource-name
auth-constraint | ---------
user-data-constraint | transport-guarantee
login-config | ---------
form-login-config | form-login-page, form-error-page
security-role | role-name
mime-mapping | extension, mime-type
welcome-file-list | welcome-file

Tag Library Descriptor
<!ELEMENT taglib
(tlib-version, jsp-version, short-name, uri?, display-name?,
small-icon?, large-icon?, description?,
validator?, <!ELEMENT validator (validator-class,
init-param*, <!ELEMENT init-param (param-name, param-value, description?)>
description?) >
listener*, <!ELEMENT listener (listener-class) >
tag+ <!ELEMENT tag (name, tag-class, tei-class?,
body-content? tagdependent | JSP | empty,
display-name?,small-icon?, large-icon?, description?,
variable*, <!ELEMENT variable ( (name-given | name-from-attribute),
variable-class?, de-clare?, scope?, description?) >
attribute*, <!ELEMENT attribute (name,
required? , true | false | yes | no
rtexprvalue?, true | false | yes | no
type?, description?) >
example?) >
) >
Element Mandatory sub elements
taglib tlib-version, jsp-version, short-name, tag
tag name, tag-class
attribute name
public interface Servlet {
init service destroy
getServletConfig getServletInfo
public interface ServletConfig {
getInitParameter getInitParameterNames
getServletContext getServletName
public interface ServletContext {
getAttribute getAttributeNames setAttribute removeAttribute
getInitParameter getInitParameterNames
getRequestDispatcher getNamedDispatcher
getResource getResourceAsStream getResourcePaths
log log
getServletContextName getServerInfo
getMajorVersion getMinorVersion
public interface ServletRequest {
getAttribute getAttributeNames setAttribute removeAttribute
getCharacterEncoding setCharacterEncoding getContentLength getContentType
getInputStream getReader
getParameter getParameterNames getParameterValues getParameterMap
getProtocol getScheme
getServerName getServerPort getRemoteAddr getRemoteHost
getLocale getLocales
public interface ServletResponse {
getOutputStream getWriter
setContentLength setCotentType
setBufferSize getBufferSize
flushBuffer resetBuffer reset
getLocale setLocale
public abstract class GenericServlet extends java.lang.Object
implements Servlet, ServletConfig, {
init init service destroy
log log
getInitParameter getInitParameterNames
getServletConfig getServletContext getServletInfo getServletName
public abstract class HttpServlet extends GenericServlet
implements {
doGet doPost doHead doPut doDelete doTrace doOptions
service service
public interface HttpServletRequest extends ServletRequest {
getMethod getRequestURI getRequestURL getQueryString
getAuthType getRemoteUser isUserInRole getUserPrincipal
getHeader getHeaders getHeaderNames getDateHeader getIntHeader
getContextPath getServletPath getPathInfo getPathTranslated
getSession getSession getRequestSessionId getCookies
isRequestedSessionIdValid isRequestedSessionIdFrom(Cookie|URL)
public interface HttpServletResponse extends ServletResponse {
setHeader addHeader setIntHeader addIntHeader setDateHeader addDateHeader
setStatus sendError sendError sendRedirect
encodeURL encodeRedirectURL
public interface HttpSession {
getAttribute getAttributeNames setAttribute removeAttribute
getMaxInactiveInterval setMaxInactiveInterval
getId getCreationTime getLastAccessedTime
public interface Tag {
doStartTag doEndTag
setParent getParent
public interface IterationTag extends Tag {
public interface BodyTag extends IterationTag {
public class TagSupport extends java.lang.Object
implements IterationTag, {
public class BodyTagSupport extends TagSupport implements BodyTag {
Lee Xu
Ranch Hand

Joined: Aug 24, 2001
Posts: 77
Thanks for your notes. It is helpful.
Adithya Rayaprolu
Ranch Hand

Joined: Jun 19, 2001
Posts: 137
Good to know that it is helpful to you. But this has not come in the exact format that I intended it to be. You may have to reformat it. Thanks.
Poonam Akash
Ranch Hand

Joined: Jul 26, 2001
Posts: 100
Hi Adithya,
thanx 4 being so helpful to us..learning DTD element was always being a hactic job 4 me..and now i have got the idea 4 doing it..
Thanx again,

Poonam Akash,<br />Sun Certified Java Programmer,<br />Sun Certified Web Component Developer.<br />Good luck may be an opportunity that keep the door open,BUT hardwork always keeps the door open!!
Saggi Gupta

Joined: Sep 15, 2001
Posts: 16
Thanks for listing it up.
I think it wud be ultimate if Pradeep's team come up with the exclusive quiz on this buggy topic as suggested by rajat.
Best wishes to all
Gagan Indus
Ranch Hand

Joined: Feb 28, 2001
Posts: 346
thankx for sharing a useful document
( well , can u upload original document somewhere , for downloading by all of us. I mean instead of we all re-formatting it . )
Thankx in advance
Gagan (/^_^\) SCJP2
Die-hard JavaMonk -- little Java a day , keeps u going .

Gagan (/^_^\) SCJP2 SCWCD IBM486 <br />Die-hard JavaMonk -- little Java a day, keeps you going.<br /><a href="" target="_blank" rel="nofollow">My Blog</a>
Adithya Rayaprolu
Ranch Hand

Joined: Jun 19, 2001
Posts: 137
Originally posted by Gagan Indus:
well , can u upload original document somewhere , for downloading by all of us. I mean instead of we all re-formatting it .

It is a good idea to upload the document, but I do not yet have any web site of my own. I do not know where to put this document.
Gagan Indus
Ranch Hand

Joined: Feb 28, 2001
Posts: 346
u can get free-space at :
and then upload ur file at this free webspace
then u can provide all of us wid a URL of da sort :
Gagan (/^_^\) SCJP2
Die-hard JavaMonk -- little Java a day , keeps u going .
Adithya Rayaprolu
Ranch Hand

Joined: Jun 19, 2001
Posts: 137
You can access the document at
Gagan Indus
Ranch Hand

Joined: Feb 28, 2001
Posts: 346
Thankx so much Adithya !!
now we can right away print-out this for reference
N good luck for ur future endeavours
Gagan (/^_^\) SCJP2
Die-hard JavaMonk -- little Java a day , keeps u going .
jQuery in Action, 2nd edition
subject: Last Minute Reference