Thursday, 29 January 2015

Useful UNIX Commands

Frequently used UNIX commands
  • cat 
  • cd 
  • chmod 
  • directory
  • compress 

Friday, 21 November 2014

JSP Life Cycle

We can divide the whole life cycle into following phases-
  1. Translation
  2. Compilation
  3. Loading
  4. Creating Instance
  5. Initialization
  6. Request Processing
  7. Destroy
Now we will look into each step in a bit detail.

Tuesday, 18 November 2014

param attribute in JSP

To understand param attribute,we will have to know its need. What is the benefit we are getting by using this.To understand that lets explore some scenarios.
Suppose you are going directly from HTML form to JSP,then how can we set bean property
with the request parameter?
We can do it by using standard action tag and scripting.
Lets have a look.

Saturday, 15 November 2014

jsp exception implicit object

exception is an implicit object of java.lang.Throwable type.
It is available only on the error jsp pages and not on all normal jsp pages.
It is used to get exception details.

jsp page implicit object

page is an implicit object of type Object class.
It serves as a reference to the generated servlet.
It is very rarely used.

Friday, 14 November 2014

jsp pageContext implicit object

pageContext is an implicit object of type PageContext class.
It can be used to get,set and remove attributes from these scopes-
  •  page
  •  request
  •  session
  •  application

Thursday, 13 November 2014

jsp session implicit object

session is an implicit object of type HttpSession.
The session object is used to track session between requests sent by a single user.
it can also be used to get,set and remove attributes in session scope.

Popular method of implicit object session(description as per javadoc)

jsp application implicit object

application is an implicit object of type ServletContext.
This object is a bit different.As the name indicates,it is for the whole application.
It is created only once by the web container that can be used on all the jsp pages.
It can be used to get,set and remove the attributes from the application scope.
This object is used to get the initialization parameters declared in the web.xml file(Deployment Descriptor).