GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  Computer Associates  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 2 of 23    Print  
How can a Servlet call a JSP error page ?

(a) This capability is not supported.
(b) When the servlet throws the exception, it will automatically be caught by the calling JSP page.
(c) The servlet needs to forward the request to the specific error page URL. The exception is passed along as an attribute named "javax.servlet.jsp.jspException".
(d) The servlet needs to redirect the response to the specific error page, saving the exception off in a cookie.
(c)



  
Total Answers and Comments: 1 Last Update: February 03, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
February 03, 2006 18:01:20   #1  
mahender        

RE: How can a Servlet call a JSP error page ?(...
ans is B when exception thrown with the sevlet container will see with in the web.xml for error-page element if it is match with excption type then looks for value of element and display that error page.
 
Is this answer useful? Yes | No

 Related Questions

What exception is thrown when Servlet initialization fails ?(a) IOException (b) ServletException (c) RemoteException
(b) 

How can a Servlet call a JSP error page ?(a) This capability is not supported. (b) When the servlet throws the exception, it will automatically be caught by the calling JSP page. (c) The servlet needs to forward the request to the specific error page URL. The exception is passed along as an attribute named "javax.servlet.jsp.jspException". (d) The servlet needs to redirect the response to the specific error page, saving the exception off in a cookie.
(c) 

What is the key difference between using a and HttpServletResponse.sendRedirect()?(a) forward executes on the client while sendRedirect() executes on the server. (b) forward executes on the server while sendRedirect() executes on the client. (c) The two methods perform identically.
(b) 

Why DB connections are not written directly in JSPs ?(a) Response is slow (b) Not a standard J2EE architecture (c) Load Balancing is not possible (d) All the above (e) Both (b) and (c)

In JSP, how can you know what HTTP method (GET or POST) is used by client request ?(a) by using request.getMethod() (b) by using request.setMethod() (c) impossible to know
(a) 

Which method is called first each time a Servlet is invoked ?(a) Start() (b) Run() (c) Servive() (d) init()
(d) 

The time between Command Execution and Response is called ______(a) Granularity (b) Latency (c) Lag time
(c)EXPLANATION:Latency: Latency is a measure of the temporal delay. Typically, in xDSL, latency refers to the delay in time between the sending of a unit of data at the originating end of a connection 

Purpose of tag(a) used to incorporate Java applets into a Web page. (b) Downloads a plugin to the client Web browser to execute an applet or Bean. (c) Both (a) & (b)
(c)EXPLANATION:JSP Syntax : [ [ ]+ ] [ text message for user ] Description : The tag is replaced by either an or tag, whichever is most appropriate for the client Web browser (the tag 

transfers the control to the mentioned destination page. tag substitutes the output of the destination page. Control remains on the same page.  

Which of the following can not be used as the scope when using a JavaBean with JSP? (a) session (b) application (c) request (d) response
(d)  


 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

jQuery - Marking the Current Page

Learning jQuery Marking the Current Page Our pager can be made more user friendly by highlighting the current page number We just need to update the classes on the buttons every time one is clicked mosgoogle geshibot lang php" var pager ; for var page 0; page numPages; page pag
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 

What is Data Attribute Group

In data modeling, a logical data model is the representation of business data into a data model that can be the basis for the physical database implementation. It identifies a data "periodic table" which will be the basis for the business functions, processes and task to be perfor
 

What is Data Attribute

In the realm of computer science, a logical data model is the accurate representation of a data. These data need to be logically represented because later on they will be the basis for data modeling. Data modeling in turn will be the basis for database implementation as the computer needs to unders
 

How does the function call within function get evaluated?

Whenever we have more than one function which is called for a finite number of times then such a function gets evaluated from inside out. Let us understand this concept with an example. For instance consider a function sample called within it 4 times as given in program below: main() { int a=50;
 

How to call C header that is not provided generally by system in C++?

Headers can be called by using extern C Syntax of extern C is: extern "C" <function declaration> for example to call C functions from C++ we can write extern "C" { <function declaration> <function declaration> ...
 

What is difference between call by value and call by reference in function?

The arguments passed to function can be of two types 1. Values passed 2. Address passed The first type refers to call by value and the second type refers to call by reference. For instance consider program1 main() { int x=50, y=70; interchange(x,y); printf(“x=%d y=%d”,x,
 

JavaScript Exception Handling – Part II

JavaScript Exception Handling Part II In this JavaScript tutorial you will learn about exception handling viz try… catch finally statement and nested try… catch statements along with syntax and examples mosgoogle center try… catch finally Statement JavaScript has a
 

JavaScript Exception Handling – Part I

JavaScript Exception Handling Part I In this JavaScript tutorial you will learn about Exception Handling Catching errors in JavaScript Using try catch statement and throw in JavaScript along with syntax and examples mosgoogle center It is impossible for a programmer to write a program without erro
 

Related Categories
Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape