IT Community - Software Programming, Web Development and Technical Support

Jsp interview Questions And Answers

This is a discussion on Jsp interview Questions And Answers within the Java Server Pages (JSP) forums, part of the Web Development category; Identify the advantages of JSP over Servlet? a) Embedding of Java code in HTML pages b) Platform independence c) Creation ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Java Server Pages (JSP)

Register FAQ Members List Calendar Mark Forums Read
  #21 (permalink)  
Old 12-23-2007, 09:15 PM
shaalini shaalini is offline
D-Web Analyst
 
Join Date: Apr 2007
Posts: 342
shaalini is on a distinguished road
Default Re: Jsp interview Questions And Answers

Identify the advantages of JSP over Servlet?

a) Embedding of Java code in HTML pages
b) Platform independence
c) Creation of database-driven Web applications
d) Server-side programming capabilities
__________________
Shaalini.S
Be the Best of Whatever you are...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #22 (permalink)  
Old 12-23-2007, 09:17 PM
shaalini shaalini is offline
D-Web Analyst
 
Join Date: Apr 2007
Posts: 342
shaalini is on a distinguished road
Default Re: Jsp interview Questions And Answers

Write the following code for a JSP page:
<%@ page language = "java" %>

<HTML>
<HEAD><TITLE>RESULT PAGE</TITLE></HEAD>
<BODY>
<%

PrintWriter print = request.getWriter();
print.println("Welcome");

%>
</BODY>
</HTML>
Suppose you access this JSP file, Find out your answer.
a) A blank page will be displayed.
b) A page with the text Welcome is displayed
c) An exception will be thrown because the implicit out object is not used
d) An exception will be thrown because PrintWriter can be used in servlets only
__________________
Shaalini.S
Be the Best of Whatever you are...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #23 (permalink)  
Old 12-23-2007, 09:19 PM
shaalini shaalini is offline
D-Web Analyst
 
Join Date: Apr 2007
Posts: 342
shaalini is on a distinguished road
Default Re: Jsp interview Questions And Answers

What are all the different scope values for the <jsp:useBean> tag?

<jsp:useBean> tag is used to use any java object in the jsp page. Here are the scope values for <jsp:useBean> tag:
a) page
b) request
c) session and
d) application
__________________
Shaalini.S
Be the Best of Whatever you are...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #24 (permalink)  
Old 12-23-2007, 09:19 PM
shaalini shaalini is offline
D-Web Analyst
 
Join Date: Apr 2007
Posts: 342
shaalini is on a distinguished road
Default Re: Jsp interview Questions And Answers

What is expression in JSP?
Answer: Expression tag is used to insert Java values directly into the output. Syntax for the Expression tag is:
<%= expression %>
An expression tag contains a scripting language expression that is evaluated, converted to a String, and inserted where the expression appears in the JSP file. The following expression tag displays time on the output:
<%=new java.util.Date()%>
__________________
Shaalini.S
Be the Best of Whatever you are...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Interview Questions & Answers H2o Interview Questions & Answers and Tips 102 04-07-2008 07:26 AM
ASP.NET 2.0 Interview Questions And Answers S.Vinothkumar Interview Questions & Answers and Tips 150 01-11-2008 02:14 AM
CSS Interview Questions And Answers Sabari Interview Questions & Answers and Tips 137 11-25-2007 09:38 PM
HR Interview Questions with Answers Sabari Interview Questions & Answers and Tips 63 11-23-2007 06:13 AM
.Net Interview Questions & Answers Venkat Interview Questions & Answers and Tips 100 11-13-2007 06:55 AM


All times are GMT -7. The time now is 10:50 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0