JSP Java Interview Questions – Set 10

What do you understand by client side and server side templating The modern Rich Internet Applications (RIA) use the design concept of “single page web design”, where a single rich page makes ajax based service calls to render different sections of a page instead of the traditional approach of loading a new page of each user action.The “single page web design” … Read more

JSP Java Interview Questions – Set 09

What types of comments are available in the JSP? There are two types of comments that are allowed in the JSP. They are hidden and output comments. A hidden comment does not appear in the generated HTML output, while output comments appear in the generated output. Example of hidden comment: < % – – This … Read more

JSP Java Interview Questions – Set 08

How do you restrict page errors display in the JSP page You first set “Errorpage” attribute of PAGE directory to the name of the error page (ie Errorpage=”error.jsp”)in your jsp page .Then in the error jsp page set “isErrorpage=TRUE”. When an error occur in your jsp page it will automatically call the error page. How … Read more

JSP Java Interview Questions – Set 07

How can I set a cookie and delete a cookie from within a JSP page Cookie mycook = new Cookie(“name”,”value”); response.addCookie(mycook); Cookie killmycook = new Cookie(“mycook”,”value”); killmycook.setMaxAge(0); killmycook.setPath(“/”); killmycook.addCookie(killmycook); What is JavaServer Pages Standard Tag Library (JSTL A tag library that encapsulates core functionality common to many JSP applications.JSTL has support for common, structural tasks … Read more

JSP Java Interview Questions – Set 06

What is JSP directive A JSP element that gives an instruction to the JSP container and is interpreted at translation time. How will you handle the runtime exception in your jsp page The errorPage attribute of the page directive can be used to catch run-time exceptions automatically and then forwarded to an error processing page. … Read more

JSP Java Interview Questions – Set 05

Can a JSP page process HTML FORM data Yes. However, unlike Servlet, you are not required to implement HTTP-protocol specific methods like doGet() or doPost() within your JSP page. You can obtain the data for the FORM input elements via the request implicit object within a scriptlet or expression as. Is there a way to … Read more

JSP Java Interview Questions – Set 04

What are the life-cycle methods of JSP Life-cycle methods of the JSP are: jspInit(): The container calls the jspInit() to initialize the servlet instance. It is called before any other method, and is called only once for a servlet instance. _jspService(): The container calls the _jspservice() for each request and it passes the request and … Read more

JSP Java Interview Questions – Set 03

Name one advantage of JSP over Servlets Can contain HTML, JavaScript, XML and Java Code whereas Servlets can contain only Java Code, making JSPs more flexible and powerful than Servlets. However, Servlets have their own place in a J2EE application and cannot be ignored altogether. They have their strengths too which cannot be overseen. What … Read more

JSP Java Interview Questions – Set 02

What is JSP? JSP is a dynamic scripting capability for web pages that allows Java as well as a few special tags to be embedded into a web file (HTML/XML, etc). The suffix traditionally ends with .jsp to indicate to the web server that the file is a JSP files. JSP is a server side … Read more

JSP Java Interview Questions – Set 01

What is backing bean ? A JavaBeans component that corresponds to a JSP page that includes JavaServer Faces components. The backing bean defines properties for the components on the page and methods that perform processing for the component. This processing includes event handling, validation, and processing associated with navigation. What does web module contain?The web … Read more