JSP

JSP Projects

JSP Project

JSP Subjective Questions And Answers


Totel:69 Click: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
JSP Interview Questions And Answers

Page 1

A Cookie is a small piece of information or messages used to communicate between the web server and the web browser. Your browser stores each message in a small file, called cookie.txt. This information is exchanged between the browser and the server to remember some specific information.


How cookies Work : A command line in the HTML of a document tell the browser to set a cookie of a certain name or value. Here is an example of some script used to set a cookie. Set-Cookie: NAME=VALUE; expir es=DATE; path=PATH; domain=DOMAIN_NAME; secure Cookies are usually run from CGI scripts, but they can also be set or read by Javascript. 


Examples of cookies : 

    * Cookies are used to track web site activity.

    * Cookies are also used for online shopping.

    * Servers also use cookies to provide personalized web pages.


Cookie Security : The easiest way to secure yourself against the supposed dangers of cookies is to get one of the latest browser versions and turn cookies off.

JSP is a Java technology provides support to generate dynamic page using HTML, XML tag and scriptlets written in the Java programming language. JSP provides us a way to write Java code embedded into the HTML. JSP pages separate the page logic from its design and display.

JSP pages are compiled into servlets and may call JavaBeans components or Enterprise JavaBeans components to perform processing on the server.


JavaServer Pages has two subcategories :

 

  * Tag Libraries

  * JavaServer Pages Standard Tag Library(JSTL).

 

 Life cycle of JSP :

 

    * JSP page translation,

    * JSP page compilation,

    * load class,

    * create instance,

    * call the jspInit() method,

    * call the _jspService() method, and

    * call the jspDestroy() method. 

JSP(Java Server Pages) and Servlets, both are server side executed program and used to generate dynamic web page. Servlets are pure java classes and compiled directly into the .class whereas JSP page is a combination of HTML and java code. First of all JSP is translated into java file and then compiled into servlet. Functionally both are same. Both use the Servlet API to communicate with the web server and the client. Both require a container on the server, such as Tomcat, which provides the environment and VM for the Java program. Servlets are best suited for request processing, handling the business logic while JSP is suitable for content generating (client view). It is easy to include HTML tag in JSP rather than servlet.

JSP has its own tag library that you can use in any nuber of pages. You can also create your own tags (Cusustom tags), define attributes and body of the tags and then group your tags into collections called tag library.


To use custom JSP tags, you need to define three separate components:


  * Tag handler class.

  * Tag library descriptor file.

  * JSP file that uses the tag library.

When the first two components are done, you can use the tag by using taglib directive.


JavaBeans are Java utility classes you defined. Beans have a standard format for Java classes. Custom tags and beans accomplish the same goals � encapsulating complex behavior into simple and accessible forms.

Difference between custom JSP tags and beans :


  * Custom tags require more work to set up than do beans.

  * Custom tags can manipulate JSP content, beans cannot.

  * Custom tags usually define relatively self-contained behavior, whereas beans are often defined in one servlet and used in a different servlet or JSP page.


Goto Page:

1 2 3 4 5 6 7 8 9 10 11 12 13 14
JSP Objective Questions And Answers

JSP Objective Questions And Answers

JSP Interview Questions And Answers

JSP Interview Questions And Answers


R4R,JSP Objective fresher and experienced, JSP Subjective fresher and experienced ,JSP Interview Questions And Answers,JSP fresher and experienced,JSP Interview fresher and experienced ,JSP Questions fresher and experienced,JSP Answers fresher and experienced