805 OCPJP 6 Questions 788 SCJP 5 questions 650 OCPJWCD 5 questions 600 OCAJP 7 questions 610 OCPJP 7 questions 510 Upgrade to OCPJP 7 questions 900 Java J2EE Qns

Mock Questions

  scjp 1.5

  • Declarations, Initialization & Scoping
  • Method overriding or overloading
  • Inner Classes
  • Flow Control
  • Type Safe Enum
  • Enhanced for loop
  • Assertions
  • Exception
  • API Contents autoboxing & unboxing
  • File
  • Serializable
  • java.text and Locale
  • Regular Expression
  • Collections and Generics
  • Thread and Concurrency

  •   scjp 1.6

  • Declarations, Initialization & Scoping
  • Method overriding or overloading
  • Inner Classes
  • Flow Control
  • Type Safe Enum
  • Enhanced for loop
  • Assertions
  • Exception
  • API Contents autoboxing & unboxing
  • File
  • Serializable
  • java.text and Locale
  • Regular Expression
  • Collections and Generics
  • Thread and Concurrency
  • NavigableMap
  • NavigableSet
  • java.io.Console

  •   scwcd 1.5

  • Servlet Basic
  • The Structure and Deployment of Web Applications
  • The Web Container Model
  • Servlet event listeners
  • Session Management,session listeners
  • Servlet Filter
  • Web Application Security
  • j2ee patterns
  • JSP Directives
  • JSP page life cycle
  • JSP implicit objects
  • JSP include
  • Expression Language (EL)
  • JSTL
  • Building a Custom Tag Library
  • SCWCD : Custom Tag Library Mock Exam Practice Questions

    Questions no -1 
    A JSP file that uses a tag library must declare the tag library first. 
    The tag library is defined using the taglib directive - taglib uri="..." prefix="..." 
    Which of the following specifies the correct purpose of prefix attribute.
    
    
    
    
    
    options A)The prefix defines the name of the tag that may be used for a tag library. B)The prefix attribute defines the location of the tag library descriptor file. C)The prefix attribute should refer to the short name attribute of the tag library file that is defined by the uri attribute of taglib directive D)The prefix attribute is used in front of a tagname of a tag defined within the tag library. Correct answer is : D Explanations : If the taglib directive directive defines a prefix of "test", and a tag is called "mtag", then the tag is used as "test:mtag".
    Questions no -2 
    Given a tag handler defined with JSP which implements TagSupport and ONLY overrides doAfterBody with the following lines:
    
    public int doAfterBody() throws JspException {
      try { pageContext.getOut().print("Hi");}catch(IOException e) {}
      return SKIP_BODY;
    }
    
    What will be the result of a jsp with the following part?
    <prefix:sufix>
    <i>Hello</i> 
    </prefix:sufix>
    
    
    
    options A)The jsp page will print: Hello B)The jsp page will print: Hello Hi C)The jsp page will print: Hi Hello D)The jsp won't print anything Correct answer is : D Explanations : TagSupport.doStartTag by default returns SKIP_BODY and as it is not overridden the body is ignored.
    scjp 1.5 | scjp 1.6 | scwcd 1.5
    Java Certifications
    www.javacertifications.net