It's not a secret anymore!*
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
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Last Minute Reference" Watch "Last Minute Reference" New topic
Author

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 http://java.sun.com/products/jsp/pdf/card12.pdf
Thanks.

Deployment Descriptor DTD (web-app_2_3.dtd)
Legend:
? � 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?)>
filter*,
filter-mapping*,
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)>
resource-env-ref*,
resource-ref*,
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)>
env-entry*,
ejb-ref*,
ejb-local-ref*)>
_______________________________________________________________
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
getRealPath
getContext
getMimeType
getServletContextName getServerInfo
getMajorVersion getMinorVersion
}
public interface ServletRequest {
getAttribute getAttributeNames setAttribute removeAttribute
getCharacterEncoding setCharacterEncoding getContentLength getContentType
getInputStream getReader
getParameter getParameterNames getParameterValues getParameterMap
getRequestDispatcher
getProtocol getScheme
getServerName getServerPort getRemoteAddr getRemoteHost
getLocale getLocales
isSecure
}
public interface ServletResponse {
getOutputStream getWriter
isCommitted
getCharacterEncoding
setContentLength setCotentType
setBufferSize getBufferSize
flushBuffer resetBuffer reset
getLocale setLocale
}
public abstract class GenericServlet extends java.lang.Object
implements Servlet, ServletConfig, java.io.Serializable {
init init service destroy
log log
getInitParameter getInitParameterNames
getServletConfig getServletContext getServletInfo getServletName
}
public abstract class HttpServlet extends GenericServlet
implements java.io.Serializable {
doGet doPost doHead doPut doDelete doTrace doOptions
service service
getLastModified
}
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
addCookie
containsHeader
}
public interface HttpSession {
getAttribute getAttributeNames setAttribute removeAttribute
getMaxInactiveInterval setMaxInactiveInterval
invalidate
getServletContext
isNew
getId getCreationTime getLastAccessedTime
}
public interface Tag {
doStartTag doEndTag
setParent getParent
setPageContext
release
EVAL_PAGE SKIP_PAGE
EVAL_BODY_INCLUDE SKIP_BODY
}
public interface IterationTag extends Tag {
doAfterBody
EVAL_BODY_AGAIN
}
public interface BodyTag extends IterationTag {
doInitBody
setBodyContent
EVAL_BODY_BUFFERED
}
public class TagSupport extends java.lang.Object
implements IterationTag, java.io.Serializable {
findAncestorWithClass
}
public class BodyTagSupport extends TagSupport implements BodyTag {
getPreviousOut
}
Lee Xu
Ranch Hand

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

Joined: Jun 19, 2001
Posts: 137
Lee,
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
Greenhorn

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
saggi
Gagan Indus
Ranch Hand

Joined: Feb 28, 2001
Posts: 346
Adhithya
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="http://www.objectfirst.com/blog" 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
Adhithya
u can get free-space at : http://www.geocities.com
and then upload ur file at this free webspace
then u can provide all of us wid a URL of da sort : http://www.geocities.com/your-name/yournotes.zip
thankx
------------------
Gagan (/^_^\) SCJP2
Die-hard JavaMonk -- little Java a day , keeps u going .
Adithya Rayaprolu
Ranch Hand

Joined: Jun 19, 2001
Posts: 137
Hi,
You can access the document at http://www.geocities.com/sriadikav/LastMinuteReference.zip
HTH,
Adithya.
Gagan Indus
Ranch Hand

Joined: Feb 28, 2001
Posts: 346
Thankx so much Adithya !!
now we can right away print-out this for reference
Thankx
N good luck for ur future endeavours
------------------
Gagan (/^_^\) SCJP2
Die-hard JavaMonk -- little Java a day , keeps u going .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Last Minute Reference
 
Similar Threads
SRV.13.4.2 security-role
The Listener In the Tag Library Descriptor
is sibling elements in web.xml ordered?
The Order of the security-role Element in DTD
ELEMENT init-param(param-name, param-value, description?