JSP Interview Questions

[b]1) Explain and state about JSP?[/b]
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.

[b]2) Explain about the process of compilation with regard to JSP?[/b]
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.

[b]3) Give an outline or the steps involved in a JSP?[/b]
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.

[b]4) Explain about the include directive?[/b]
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.

[b]5) Explain about autoflush?[/b]
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.

[b]6) Explain the benefits of JSP?[/b]
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.

[b]7) Explain about the reusability of JSP?[/b]
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.

[b]8) Explain and state the three basic Java scripting elements?[/b]
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.

[b]9) Explain about JSP actions?[/b]
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.

[b]10) Explain about JSP standard Tag library?[/b]
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.

[b]11) Why model view controller paradigm should be used?[/b]
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.

[b]12) Explain the four types of data variables which happen during the server request?[/b]
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.

[b]13) Explain about translation and execution of Java Server pages?[/b]
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.

[b]14) Explain the differences between ASP and JSP?[/b]
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.

[b]15) Explain about the role of servlets in JSP pages?[/b]
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.

[b]16) What is the different form in which application logic is present?[/b]
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.

[b]17) Explain about the java server Plugin?[/b]
Plugin makes a developer to embed applets into a web page.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值