• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Some more stuff for WCD Guys

 
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Guys

The following stuff from various simulators & Mock exams for you all!

1.The error-page tag can point to any valid resource
2.The init-param tag should not contain java code between its opening and closing brackets
3.The welcome-file tag can mark a servlet as the default item that is returned from a url
4.To rewrite a URL the encodeURL method of response must be called
5.The RequestDispatcher can be obtained from the ServletRequest or from the ServletContext objects. The difference is that from the request, the component url may be relative to the current resource. From the context, the url MUST be absolute, i.e. it MUST begin with a slash (/).
6.body of a call to a tag file cannot contain scripting
7.CLIENT-CERT authentication uses the HTTPS protocol to create a secure connection
8.The TagSupport class has an implicit pageContext field
9.The pageContext field has a getOut method
10.events in a servlets life: load,instantiate,init,service,destroy
11.Simple tags cannot have scriptlet code (JSP) within the body
12.Identify the valid return value of PageContext's getOut() method. � JspWriter()
13.GenericServlet & ServletContext class has log method for logging messages
14.By default Request Attributes and Local variables are Thread-safe.
15.We can set primitive�s/Strings into scope Attributes.

16.If you do not use the var attribute, then the text is automatically included at the location of the import tag. For example:
<c:import url="/test2.jsp" /> <- test2.jsp will be included here.
If you include the var attribute, the text is not included automatically. It is included only where you use the variable. For example:
<c:import url="/test2.jsp" var='text' scope='request' /> <- test2.jsp will NOT be included here.

...lot of other code

<c ut value='${text}' /> <- test2.jsp will be included here.


17.When a web application is deployed into a container, the following steps must be performed, in this order, before the web application begins processing client requests.

1. Instantiate an instance of each event listener identified by a <listener> element in the deployment descriptor.

2. For instantiated listener instances that implement ServletContextListener, call the contextInitialized () method.

3. Instantiate an instance of each filter identified by a <filter> element in the deployment descriptor and call each filter instance�s init() method.

4. Instantiate an instance of each servlet identified by a <servlet> element that includes a <load-on-startup> element in the order defined by the load-onstartup element values, and call each servlet instance�s init() method.

18.Variables created in a scriptlet are not directly accessible to EL
19.You cannot embed one tag inside another tag's attribute listEx- <myTL:getMenu subject='<myTL:getHeading report="1"/>'/> - NO
20.The prefix attribute of tablib directive is case-sensitive.
21.In the XML syntax, request time attributes are specified using %= and %.Ex: - <jsp:forward page="%=request.getParameter('redirectto')%" />Same As<jsp:forward page="<%=request.getParameter('redirectto')%>" />
22.You have a list (refers to an ArrayList<String> of attributes that you want to remove from the session. How will you do it?
Answer: We cannot delete all attributes at once. The only option is iteratation.
23.The return type of getAttribute() is Object in all scopes.
24.There is no method to delete all the Attributes from the session.

25. <filter-mapping>
<filter-name>SimpleFilter</filter-name>
<servlet-name>DestinationServlet</servlet-name>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>

Note that if you use a dispatcher element, then the filter will be invoked ONLY for those dispatcher elements that are listed. For example, in the above case since <dispatcher>INCLUDE</dispatcher> is absent, the filter will not be invoked if a rd.include(req, res) is used to call DestinationServlet.

26.SingleThreadModel is a marker interface.
27.Which of the following security mechanisms utilizes the concept of a realm? Basic/Digest/Form/client-cert - Digest
28.HttpSessionAttributeEvent/ HttpSessionBindingEvent � which one is dummy?Answer:
29.Data Integrity can be done throw HTTPS.
30.The default implementation of HttpServlet class's doHead() method calls the doGet() method.
31.Any page directive except import can only occur only once.Example: <%@ page import="java.util.*" autoFlush="true"%>
<%@ page import="java.io.*" autoFlush="false"%>The above JSP code is wrong, because autoFlush is repeated.
32.Form � the only security mechanisms available in the four to support the concept of realm.
33.Authentication techniques that are based on built in mechanisms of HTTP � Basic/Digest.
34.Local variables and Request attributes are only thread-safe by default.
35.getMaxInactiveInterval () returns an int value that represents TIME IN SECONDS
36.<c: set �> tag:
<c: set �> comes in two flavors var and target.
var is for setting attributes in various scopes.
target is for setting Bean/Map properties.
JSTL <set> tag can be used to set attributes, Bean and Map properties.]1.The error-page tag can point to any valid resource
2.The init-param tag should not contain java code between its opening and closing brackets
3.The welcome-file tag can mark a servlet as the default item that is returned from a url
4.To rewrite a URL the encodeURL method of response must be called
5.The RequestDispatcher can be obtained from the ServletRequest or from the ServletContext objects. The difference is that from the request, the component url may be relative to the current resource. From the context, the url MUST be absolute, i.e. it MUST begin with a slash (/).
6.body of a call to a tag file cannot contain scripting
7.CLIENT-CERT authentication uses the HTTPS protocol to create a secure connection
8.The TagSupport class has an implicit pageContext field
9.The pageContext field has a getOut method
10.events in a servlets life: load,instantiate,init,service,destroy
11.Simple tags cannot have scriptlet code (JSP) within the body
12.Identify the valid return value of PageContext's getOut() method. � JspWriter()
13.GenericServlet & ServletContext class has log method for logging messages
14.By default Request Attributes and Local variables are Thread-safe.
15.We can set primitive�s/Strings into scope Attributes.

16.If you do not use the var attribute, then the text is automatically included at the location of the import tag. For example:
<c:import url="/test2.jsp" /> <- test2.jsp will be included here.
If you include the var attribute, the text is not included automatically. It is included only where you use the variable. For example:
<c:import url="/test2.jsp" var='text' scope='request' /> <- test2.jsp will NOT be included here.

...lot of other code

<c ut value='${text}' /> <- test2.jsp will be included here.


17.When a web application is deployed into a container, the following steps must be performed, in this order, before the web application begins processing client requests.

1. Instantiate an instance of each event listener identified by a <listener> element in the deployment descriptor.

2. For instantiated listener instances that implement ServletContextListener, call the contextInitialized () method.

3. Instantiate an instance of each filter identified by a <filter> element in the deployment descriptor and call each filter instance�s init() method.

4. Instantiate an instance of each servlet identified by a <servlet> element that includes a <load-on-startup> element in the order defined by the load-onstartup element values, and call each servlet instance�s init() method.

18.Variables created in a scriptlet are not directly accessible to EL
19.You cannot embed one tag inside another tag's attribute listEx- <myTL:getMenu subject='<myTL:getHeading report="1"/>'/> - NO
20.The prefix attribute of tablib directive is case-sensitive.
21.In the XML syntax, request time attributes are specified using %= and %.Ex: - <jsp:forward page="%=request.getParameter('redirectto')%" />Same As<jsp:forward page="<%=request.getParameter('redirectto')%>" />
22.You have a list (refers to an ArrayList<String> of attributes that you want to remove from the session. How will you do it?
Answer: We cannot delete all attributes at once. The only option is iteratation.
23.The return type of getAttribute() is Object in all scopes.
24.There is no method to delete all the Attributes from the session.

25. <filter-mapping>
<filter-name>SimpleFilter</filter-name>
<servlet-name>DestinationServlet</servlet-name>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>

Note that if you use a dispatcher element, then the filter will be invoked ONLY for those dispatcher elements that are listed. For example, in the above case since <dispatcher>INCLUDE</dispatcher> is absent, the filter will not be invoked if a rd.include(req, res) is used to call DestinationServlet.

26.SingleThreadModel is a marker interface.
27.Which of the following security mechanisms utilizes the concept of a realm? Basic/Digest/Form/client-cert - Digest
28.HttpSessionAttributeEvent/ HttpSessionBindingEvent � which one is dummy?Answer:
29.Data Integrity can be done throw HTTPS.
30.The default implementation of HttpServlet class's doHead() method calls the doGet() method.
31.Any page directive except import can only occur only once.Example: <%@ page import="java.util.*" autoFlush="true"%>
<%@ page import="java.io.*" autoFlush="false"%>The above JSP code is wrong, because autoFlush is repeated.
32.Form � the only security mechanisms available in the four to support the concept of realm.
33.Authentication techniques that are based on built in mechanisms of HTTP � Basic/Digest.
34.Local variables and Request attributes are only thread-safe by default.
35.getMaxInactiveInterval () returns an int value that represents TIME IN SECONDS
36.<c: set �> tag:
<c: set �> comes in two flavors var and target.
var is for setting attributes in various scopes.
target is for setting Bean/Map properties.
JSTL <set> tag can be used to set attributes, Bean and Map properties.

 
Shashidhar Yarabati
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry guys
I tried a lot to put in some order. But I couldn't able to put the above in nice format.

Apologies for that...
 
Every plan is a little cooler if you have a blimp. And a tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic