• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Last Minute Reference

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
}
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Adithya,
Thanks for your notes. It is helpful.
 
Adithya Rayaprolu
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 .
 
Adithya Rayaprolu
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
You can access the document at http://www.geocities.com/sriadikav/LastMinuteReference.zip
HTH,
Adithya.
 
Gagan Indus
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 .
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic