Results 1 to 2 of 2
  1. #1
    JavaJunkie is offline Member
    Join Date
    Apr 2009
    Posts
    12
    Rep Power
    0

    Default Implicit objects

    Hi,

    could anyone please clarify me following line about implicit objects in JSP:

    Implicit Objects are Java objects that the JSP Container provides to a developer to access them in their program using JavaBeans and Servlets.


    what they mean by using JavaBeans and Servlets here?

    Thanks in advance.

  2. #2
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    843
    Rep Power
    6

    Default

    Implicit objects are Java object which are available on the fly.No need to create traditionally.

    Example:
    In Jsp "out" is available and we can directly use and print
    out.println("Hai")
    out:This denotes the Output stream in the context of page. The class or the interface name of the Out object is jsp.JspWriter. The Out object is written: Javax.servlet.jsp.JspWriter


    But,in case of servlets we need to create the outputstream object like this below.It is not avilable on the fly.See the below statement.We need to create the "out" object explicitly like this below.

    response.setContentType("text/html");
    PrintWriter out = response.getWriter();

    Go thru this link below for Servlets/jsp
    http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/
    Ramya:cool:

Similar Threads

  1. Replies: 1
    Last Post: 01-22-2009, 05:25 PM
  2. 1 to 1 Objects
    By this.that in forum New To Java
    Replies: 4
    Last Post: 08-07-2008, 11:09 PM
  3. JSP implicit objects
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-26-2007, 11:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •