What are the use of implicit objects in jsp?

Questions by basvoju

Showing Answers 1 - 5 of 5 Answers

RDM

  • Aug 2nd, 2006
 

reduce the complexity of the code,otherwise we haveto declare the object and we haveto use

  Was this answer useful?  Yes

niranjan

  • Aug 8th, 2006
 

The following are some of the implicit object swe have in jsp

request

response

page

application

session

pagecontext

  Was this answer useful?  Yes

Implicit objects let developers access container-provided services and resources. These objects are defined as implicit because you do not have to explicitly declare them. They are defined in every JSP page and used behind the scenes by the container whether you declare them or not -- although you cannot redeclare them. Because implicit objects are declared automatically, we need only use the reference variable associated with a given object to begin calling methods on it.Functional categories of implicit objects: * Session management: application, session, request, pageContext * Flow control: application, config, pageContext, request, session * Logging and exceptions: application, config, exception, pageContext, request, session * Input/output control: request, response, out * Initialization parameters: config

  Was this answer useful?  Yes

Chadan Reddy

  • May 16th, 2007
 

Little addition to JSP implicit Objects: Implicit Objects are 9:


request
response
page
application
session
pagecontext
exception
out
config


These simplify JSP code by providing ready state objects.
Ex: request.getElementById("xyz");
here you are using 'request' object without instantiating it because this object
is readily available for you.


Thanks
Chandan Reddy


  Was this answer useful?  Yes

swati pandey

  • Sep 30th, 2014
 

SP Implicit Objects are the Java objects that the JSP Container makes available to developers in each page and developer can call them directly without being explicitly declared. JSP Implicit Objects are also called pre-defined variables.

JSP supports nine Implicit Objects which are listed below:

Object Description
request - This is the HttpServletRequest object associated with the request.
response -- This is the HttpServletResponse object associated with the response to the client.
out -- This is the PrintWriter object used to send output to the client.
session -- This is the HttpSession object associated with the request.
application -- This is the ServletContext object associated with application context.
config -- This is the ServletConfig object associated with the page.
pageContext -- This encapsulates use of server-specific features like higher performance JspWriters.
page -- This is simply a synonym for this, and is used to call the methods defined by the translated servlet class.
Exception -- The Exception object allows the exception data to be accessed by designated JSP.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions