+ All Categories
Home > Documents > Java Scwcd Dumps

Java Scwcd Dumps

Date post: 21-Oct-2015
Category:
Upload: jaikumar-mansukhani
View: 240 times
Download: 6 times
Share this document with a friend
Description:
Java Scwcd Dumps
Popular Tags:
13
1. Place the events in the order they occur Ans : 1 st ------------> JSP page is translated 2 nd ------------> JSP page is compiled 3 rd ------------> JSP page implementation class is loaded 4 th ------------> JSP page implementation is instantiated 5 th ------------> JspInit is called 6 th ------------> _jstService is called 7 th ------------> jstDestroy is called
Transcript
Page 1: Java Scwcd Dumps

1. Place the events in the order they occur

Ans : 1st ------------> JSP page is translated2nd ------------> JSP page is compiled3rd ------------> JSP page implementation class is loaded4th ------------> JSP page implementation is instantiated5th ------------> JspInit is called6th ------------> _jstService is called7th ------------> jstDestroy is called

Page 2: Java Scwcd Dumps

2. Place the code snippets in the proper order to construct the JSP code to import static content into a JSP page at translation-time.

Ans :

<% include file = ‘foo.jsp’ %>

Page 3: Java Scwcd Dumps

3. Place the appropriate element names on the left on the web application deployment descriptor on the right so that files ending in ".mpg" are associated with the MIME type "video/mpeg."

Ans :

< mine-mapping >

< extension > mpg </ extension >< mime-type > video/mpeg </ mime-type >

< mime-mapping >

Page 4: Java Scwcd Dumps

4. A servlet context listener loads a list of com.example.Product objects from a database and stores that list into the catalog attribute of the ServletContext object.

Place code snippets to construct a jsp:useBean standard action to access this catalog.

Ans :

id = ‘catalog’ type = ‘com.example.product’

scope = ‘application’

Page 5: Java Scwcd Dumps

5. Place the corresponding resources and directories in the proper web application deployment structure

Ans :

_____ |___JSP files Static content | |___WEB-INF

| |___classes

| |____ java and servlet classes | |____ lib | |____ JAR files | |____ web.xml

Page 6: Java Scwcd Dumps

6. Place the events in the order they occur.

Ans :

1st ----------> web container loads the servlet class

2nd ----------> web container instantiates the servlet

3rd ----------> web container calls the servlet’s init() Method

4th ----------> web container calls the servlet’s service() Method

5th ----------> web container calls the servlet’s destroy() Method

Page 7: Java Scwcd Dumps

7. Given a request from mybox.example.com, with an IP address of 10.0.1.11 on port 33086, place the appropriate ServletRequest methods onto their corresponding return values.

Ans :

Mybox.example.com ---------> get RemoteHost

10.0.1.11 ----------> get RemoteHost

33086 ----------> get ServerPort

Page 8: Java Scwcd Dumps

8. Place the code snippets in the proper order to construct the JSP code to includedynamic content into a JSP page at request-time.

Ans :

< jsp : include page = ‘foo.jsp’ />

Page 9: Java Scwcd Dumps

9. Place the servlet name onto every request URL, relative to the web applicationcontext root, that will invoke that servlet. Every request URL must be filled.

Ans :

/data/ -----------> DataServlet

/data/index.jsp -----------> DataServlet

/secure/command.do -----------> ControlServlet

/data/command.do -----------> DataServlet

/data.do -----------> ControlServlet

Page 10: Java Scwcd Dumps

10. Place the XML elements in the web application deployment descriptor solutionto configure a servlet context event listener named com.example.MyListener.

Ans :

< listener >

< listener-class > com.example.MyListener </ listener-class >

< listener >


Recommended