`
opportunity
  • 浏览: 11841 次
  • 性别: Icon_minigender_2
  • 来自: 火星
社区版块
存档分类
最新评论

JSP Interview Questions

 
阅读更多
1) Explain and state about JSP?
Java server pages are meant to generate dynamic content in response to the user query. This technology helps you to interact with the user very effectively. Certain Java code elements and predefined actions are embedded into the functioning of the pages which help in generating dynamic content in static pages.

2) Explain about the process of compilation with regard to JSP?
A JSP complier helps to compile Java server pages into Java servlets. In turn this JSP compiler will generate a Java code which is compiled by a Java Compiler. It can generate byte code for the servlet directly. Java server pages can be modified on the fly which helps to provide a faster output without many modifications or reloads.

3) Give an outline or the steps involved in a JSP?
Java server page can be broken down into following contents: -
1) Static data
2) Directives of JSP such as include
3) Scripting elements and variables
4) JSP actions
5) Library and custom tags.
Java server pages directive controls the functioning of servlets.

4) Explain about the include directive?
This directive informs the JSP compiler about inclusion of a complete file for processing. Include directive helps in pasting or copying a full file into the compiler for processing. Files which have include directive have the extension jspf.

5) Explain about autoflush?
This command is used to autoflush the contents. If a value of true is used it indicates to flush the buffer whenever it is full. In case of false it indicates that an exception should be thrown whenever the buffer is full. If you are trying to access the page at the time of conversion of a JSP into servlet will result in error.

6) Explain the benefits of JSP?
These are some of the benefits due to the usage of JSP they are
• Portability, reusability and logic components of the language can be used across various platforms.
• Memory and exception management.
• Has wide range of API which increases the output functionality.
• Low maintenance and easy deployment.
• Robust performance on multiple requests.

7) Explain about the reusability of JSP?
Reusability is much required because it decreases the cost of development. These pages rely on reusable cross platform components. Java beans and Java beans components are used to perform complex functions with minimum ease. These components are cross platform which gives the leverage to share and use components.

8) Explain and state the three basic Java scripting elements?
The three basic Java scripting elements are declaration tag, scriptlet tag and expression tag. Declaration tag allows the developer to insert a variable definition inside the body of the servlet. Scriptleg allows contained statements and declaration allows methods.

9) Explain about JSP actions?
JSP actions are nothing but XML tags which extract the functionality of the web server. These actions are executed at run time. Some of the JSP actions are either developed by a developer or they are just built in functions.

10) Explain about JSP standard Tag library?
This tag forms the component of the java web application development platform. This adds a specification to the JSP tag thus giving it much more functionality to perform various tasks such as XML data processing, loops and internationalization and conditional execution.

11) Why model view controller paradigm should be used?
Model view controller paradigm should be used to separate three different view of the coding they are presentation, computer data storage and request processing. When the request is passed the control is transferred to the JSP. There are various platforms to split the model, design and data from the page.

12) Explain the four types of data variables which happen during the server request?
The four types of data variables happening during request are page scope, request scope, application scope and session scope. These objects act according to the scope specified to them. Some objects are accessible only in the page requested.

13) Explain about translation and execution of Java Server pages?
A java server page is executed within a Java container. A Java container converts a Java file into a servlet. Conversion happens only once when the application is deployed onto the web server. During the process of compilation Java compiler checks for modifications if any modifications are present it would modify and then execute it.

14) Explain the differences between ASP and JSP?
The biggest difference between both of these technologies lies with the design of the software. JSP technology is server and platform independent whereas ASP relies primarily on Microsoft technologies.

15) Explain about the role of servlets in JSP pages?
Whenever a JSP page is called it is first compiled into a servlet. Servlets help in building dynamic content in static pages. JSP is an extension of server technology. It is much easier to maintain pages with JSP technology.

16) What is the different form in which application logic is present?
Application logic is present in three different forms such as
1) Java scriplets
2) External functions are called by JSP tags.
3) Tags of JSP are customized. It gives the author access to Java Beans to perform basic functionality.

17) Explain about the java server Plugin?
Plugin makes a developer to embed applets into a web page.
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics