Hi Ranchers,
In SCWCD, there would be around 5 to 7 questions testing the API skills irrespective of the topics. Here I have summarized all the inputs in a single document in the most memorable manner. This would help you to familiarize before giving an exam but I am pretty sure that one needs to acquire more information of these API. Please look at the way it is organized.
It is not complete UML for APIs, but still the most basics are covered.
The one highlighted in blue color are more expected one than the normal. But it does not mean that the normal can be left out.
Not all the classes and interfaces are listed here.
It carries most important one from both Servlets and Jsps. Tag class hierarchies are also added.
Source:
I have not missed any questions from this; I hope everyone will also do so.
<type>javax.servlet.Servlet
void init(ServletConfig config)
void service(ServletRequest req,ServletResponse res)
ServletConfig getServletConfig()
String getServletInfo()
void destroy()
<type>
javax.servlet.ServletConfig
String getInitParameter()
Enumeration getInitParameterNames()
ServletContext getServletContext()
String getServletName()
javax.servlet.GenericServlet
{abstract}
void init()
void init(ServletConfig config)
abstract void service(ServletRequest,ServletResponse)
String getInitParameter()
Enumeration getInitParameterNames()
ServletConfig getServletConfig()
ServletContext getServletContext()
String getServletInfo()
String getServletName()
void destroy()
void log(String msg)
void log(String msg, Throwable t)
javax.servlet.http.HttpServlet
{abstract}
void service(ServletRequest req,ServletResponse res)
protected void service(HttpServletRequest req,HttpServletResponse res)
protected void doGet(HttpServletRequest req,HttpServletResponse res)
protected void doPost(HttpServletRequest req,HttpServletResponse res)
protected void doPut(HttpServletRequest req,HttpServletResponse res)
protected void doHead(HttpServletRequest req,HttpServletResponse res)
protected void doTrace(HttpServletRequest req,HttpServletResponse res)
protected void doOptions(HttpServletRequest req,HttpServletResponse res)
protected void doDelete(HttpServletRequest req,HttpServletResponse res)
protected long getLastModified(HttpServletRequest req)
<type>
javax.servlet.ServletRequest
Object getAttribute(String str)
Enumeration getAttributeNames()
void setAttribute(String str,Object obj)
void removeAttribute(String str)
String getParameter(String str)
String[] getParameterValues(String str)
Enumeration getParameterNames()
Map getParameterMap()
ServletInputStream getInputStream()
BufferedReader getReader()
RequestDispatcher getRequestDispatcher(String path)
int getContentLength()
String getContentType()
int getLocalPort()
String getLocalName()
String getLocalAddr()
int getServerPort()
String getServerName()
int getRemotePort()
String getRemoteAddr()
String getRemoteHost()
String getCharaceterEncoding()
void setCharacterEncoding(String str)
Local getLocale()
Enumeration getLocales()
String getProtocol()
String getScheme()
String getRealPath()
boolean isSecure()
<type>
javax.servlet.http.HttpServletRequest
String BASIC_AUTH
String DIGEST_AUTH
String CLIENT_CERT_AUTH
String FORM_AUTH
String getAuthType()
String getContextPath()
Cookie[] getCookies()
long getDateHeader(String name)
String getHeader(String name)
Enumeration getHeaderNames()
Enumeration getHeaders(String name)
int getIntHeader(String name)
String getMethod()
String getPathInfo()
String getPathTranslated()
String getQueryString()
String getRemoteUser()
String getRequestedSessionId()
String getRequestURI()
StringBuffer getRequestURL()
String getServletPath()
HttpSession getSession()
HttpSession getSession(boolean create)
java.security.Prinicipal getUserPrincipal()
boolean isRequestedSessionIdFromCookie()
boolean isRequestedSessionIdFromURL()
boolean isRequestedSessionIdValid()
boolean isUserInRole(String role)
<type>
javax.servlet.ServletResponse
void flushBuffer()
int getBufferSize()
String getCharacterEncoding()
String getContentType()
Locale getLocale()
ServletOutputStream getOutputStream()
PrintWriter getWriter()
boolean isCommitted()
void reset()
void resetBuffer()
void setBufferSize(int a)
void setCharacterEncoding(String str)
void setContentLength(int a)
void setContentType(String str)
void setLocale(Locale locale)
<type>
javax.servlet.http.HttpServletResponse
void addCookie(Cookie cookie)
void addDateHeader(String name, long date)
void addHeader(String name, String value)
void addIntHeader(String name, int value)
boolean containsHeader(String name)
String encodeRedirectURL(String url)
String encodeURL(String url)
void sendError(int statusCode) – For static status codes refer member variables.
void sendError(int statusCode, String msg)
void sendRedirect(String path)
void setDateHeader(String name, long date)
void setHeader(String name, String value)
void setIntHeader(String name, int value)
void setStatus(int sc) – For static status codes refer member variables.
<type>
javax.servlet.ServletConfig
String getInitParameter()
Enumeration getInitParameterNames()
ServletContext getServletContext()
String getServletName()
<type>
javax.servlet.ServletContext
Object getAttribute(String str)
Enumeration getAttributeNames()
void setAttribute(String str,Object obj)
void removeAttribute(String str)
String getInitParameter()
Enumeration getInitParameterNames()
void log(String msg)
void log(String msg, Throwable t)
ServletContext getContext(String uriPath)
int getMajorVersion()
int getMinorVersion()
String getMimeType()
String getRealPath(String path)
RequestDispatcher getRequestDispatcher(String path)
RequestDispatcher getNamedDispatcher(String name)
URL getResource(String path)
InputStream getResourceAsStream(String path)
Set getResorcePaths(String path)
String getServletInfo()
String getServletContextName()
<type>
javax.servlet.http.HttpSession
Object getAttribute(String str)
Enumeration getAttributeNames()
void setAttribute(String str,Object obj)
void removeAttribute(String str)
ServletContext getServletContext()
long getCreationTime()
long getLastAccessedTime()
int getMaxInactiveInterval()
void setMaxInactiveInterval(int interval)
void invalidate()
boolean isNew()
String getId()
<type>
javax.servlet.Servlet
void init(ServletConfig config)
void service(ServletRequest req,ServletResponse res)
ServletConfig getServletConfig()
String getServletInfo()
void destroy()
<type>
javax.servlet.jsp.JspPage
void jspDestroy()
void jspInit()
<type>
javax.servlet.jsp.HttpJspPage
void _jspService(HttpServletRequest req,HttpServletResponse res)
javax.servlet.jsp.JspContext
{abstarct}
abstract Object findAttribute(String name)
abstract Object getAttribute(String name)
abstract Object getAttribute(String name,int scope)
abstract Enumeration getAttributeNamesInScope(int scope)
abstract int getAttributesScope(String name)
abstract Object removeAttribute(String name)
abstract Object removeAttribute(String name,int scope)
abstract void setAttribute(String name,Object value)
abstract void setAttribute(String name,Object value, int scope)
abstract JspWriter getOut()
abstract ExpressionEvaluator getExpressionEvaluator()
abstract VariableResolver getValueResolver()
JspWriter popBody()
JspWriter pushBody(Writer writer)
javax.servlet.jsp.PageContext
{abstract}
abstract void forward(String relativeUrlPath)
ErrorData getErrorData()
abstract Exception getException()
abstract Object getPage()
abstract ServletRequest getRequest()
abstract ServletResponse getResponse()
abstract ServletConfig getServletConfig()
abstract ServletContext getServletContext()
abstract HttpSession getSession()
abstract void include(String relativeUrlPath)
abstract void include(String relativeUrlPath, boolean flush)
abstract void handlePageException(Throwable t)
abstract void handlePageException(Exception e)
BodyContent pushBody()
abstract void release()
<type>
javax.servlet.Filter
void destroy()
void doFilter(ServletRequest req,ServletResponse res,FilterChain chain)
void init(FilterConfig filterConfig)
<type>
javax.servlet.FilterChain
void doFilter(ServletRequest req,ServletResponse res,FilterChain chain)
<type>
javax.servlet.FilterConfig
String getInitParameter()
Enumeration getInitParameterNames()
ServletContext getServletContext()
String getFilterName()
<type>
javax.servlet.jsp.tagext.JspTag
<type>
javax.servlet.jsp.tagext.SimpleTag
void setJspContext(JspContext context)
void setParent(JspTag Parent)
void setJspBody(JspFragment jspBody)
void doTag()
void getParent()
javax.servlet.jsp.tagext.SimpleTagSupport
void setJspContext(JspContext context)
void setParent(JspTag Parent)
void setJspBody(JspFragment jspBody)
void doTag()
void getParent()
static JspTag findAncestorWithClass(JspTag from, Class klass)
protected JspFragment getJspBody()
protected JspContext getJspContext()
<type>
javax.servlet.jsp.tagext.JspTag
<type>
javax.servlet.jsp.tagext.Tag
static int SKIP_BODY
static int EVAL_BODY_INCLUDE
static int SKIP_PAGE
static int EVAL_PAGE
void setPageContext(PageContext pc)
void setParent(Tag t)
int doStartTag()
int doEndTag()
Tag getParent()
void release()
<type>
javax.servlet.jsp.tagext.IterationTag
static int EVAL_BODY_AGAIN
int doAfterBody()
<type>
javax.servlet.jsp.tagext.BodyTag
static int EVAL_BODY_BUFFERED
void doInitBody()
void setBodyContent(BodyContent b)
javax.servlet.jsp.tagext.TagSupport
protected PageContext pageContext
protected String id
String getId()
void setId(String id)
Object getValue(String k)
Enumeration getValues()
void setValue(String k, Object v)
void removeValue(String k)
javax.servlet.jsp.tagext.BodyTagSupport
protected BodyContent bodyContent
BodyContent getBodyContent()
JspWriter getPreviousOut()