JSP interview questions

  • Can you make use of a ServletOutputStream object from within a JSP page?
  • Can a JSP page instantiate a serialized bean?
  • Is it possible to share an HttpSession between a JSP and EJB? What happens when I change a value in the HttpSession from inside an EJB?
  • What is the page directive is used to prevent a JSP page from automatically creating a session?
  • How do you prevent the Creation of a Session in a JSP Page and why?
  • How do I include static files within a JSP page?
  • How can I implement a thread-safe JSP page?
  • How do I mix JSP and SSI #include?
  • Can a JSP page process HTML FORM data?
  • What JSP lifecycle methods can I override?
  • How do I perform browser redirection from a JSP page?
  • Is there a way to reference the “this” variable within a JSP page?
  • Can I stop JSP execution while in the midst of processing a request?
  • How do I use comments within a JSP page?
  • How do I prevent the output of my JSP or Servlet pages from being cached by the browser?
  • How does JSP handle run-time exceptions?
  • How do I use a scriptlet to initialize a newly instantiated bean?
  • How can I enable session tracking for JSP pages if the browser has disabled cookies?
  • How can I declare methods within my JSP page?
  • How can I set a cookie and delete a cookie from within a JSP page?
  • Is there a way I can set the inactivity lease period on a per-session basis?
  • How does a servlet communicate with a JSP page?
  • How do I have the JSP-generated servlet subclass my own custom servlet class, instead of the default?
  • How do you pass control from one JSP page to another?
  • How do you restrict page errors display in the JSP page?
  • How do you call stored procedures from JSP?
  • How do you connect to the database from JSP?
  • What is Declaration?
  • What is difference between scriptlet and expression?
  • What is jsp:use bean. What are the scope attributes & difference between these attributes?
  • What are the implicit objects in JSP & differences between them?
  • What are Custom tags. Why do you need Custom tags. How do you create Custom tag?
  • What is the difference between include directive & jsp:include action?
  • What are advantages of JSP?
  • What is JSP?
  • Can a single JSP page be considered as a J2EE application?
  • How to call EJB from JSP.
  • What is the architecture of JSP?
  • What is the difference between servlet session and jsp session?
  • Why should we setContentType() in servlet ?what is the use of that method?
  • When jsp is compiled into servlet, where the servlet is actually stored(storage location)?
  • How to generate BAR & PIE Graphs using JSP code…?
  • What is the diff. b/n declaring members in and declaraing in jspinit() method ?
  • How to check the value in the text field is not a number
  • What is the difference between , pagedirective include, action tag include ?
  • What are the default objects provided by JSP container? Other than page, request, session and context objects.
  • What is the default scope of jsp tags?
  • When many Users are browsing the same application at the same time and they click the “Submit” button will many objects be created for each and every User?
  • What is the difference between Difference between doGet() and doPost()?
  • How do we perform redirect action without using response.sendRedirect(” “);
  • A] Is the response.sendRedirect ends the existing session? B] If I logged in to a site ( say a.com) & then in same browser window I type the url for another site (say b.com), then does my session gets ended on first site ( a. com ) ?
  • How to overwrite the init and destroy method in a jsp page.
  • Where do we use hidden variables and url rewriting? and wat is the difference between them?
  • What is the difference between session and cookie ?
  • How to pass java script array to jsp page?
  • What is the difference betweeen JSP forward and servlet forward methods?
  • Where can we find the compiled file of jsp in the directory struture.
  • How we abort jsp page from a servlet
  • What is difference between getAttribute() and getParameter()?
  • What is the diff. b/w PAGE,APPLICATION and SESSION implicit objects of JSP?
  • Wat is the difference between and in jsp..wen translate into servlet..wer it is stored in servlet..can we create global variables in jsp..if yes then how??
  • How can i restrict the user from Clicking of Back button in any browser
  • In one class i stored the key and values in the hashmap.so using key value i have to check wheter the value for key is correct or not.so how to retreive the key and values in jsp page
  • What is the differnce between application server and web server
  • What is use of implict Objects?why the container is given those one?
  • How to delete cookies in JSP?
  • In Oracle table some fields are “null”.By default it will show as “null” in JSP page text box.But i dont want that. I want as blank textbox.What i can do for that?
  • In Internet explorer if we give a jsp , How the server will know it has to execute?
  • How the jsp changes will be effected in servlet file after converting?
  • When to use struts technology? What type of applications are developed using struts frame work?
  • What is the need of taglibraries?
  • Explain online banking system using java.that means i need architecture of online banking system.please sir i want full details
  • Text in textarea cant be copy by anyone while it is running in the browser (i.e,the text cant be copy and then paste on the other page) give me suggestion?
  • How can i clear values in sessions. if i open a jsp page it is containing previous values. then i need to open a new page then only i am getting a fresh page
  • What data is stored in the variable appname when we give the folowing statement String appname=(”manager”.equalsIgnoreCAse(request.getContextPath()))?”/manager”:”/portal”;
  • Web browser concept using jsp
  • Why we can’t implement interface in JSP? Why we can only extend classes in JSP?
  • How can we implement logoutpage using jsp ..? and Is there any method to force the browser to show the same page again and again after logout..?
  • How to Upload a textfile from JSP to Servlet
  • My html form contains an INPUT “text” element that accepts Date, i want to catch that date and want to query it using JSP? In short, how can i use that HTML form element with Prepared Statements in JSP?
  • Types of indexing used in oracle applications ? and when and how we decide to implement indexing to database ?
  • What is the need of implicit objects?
  • When we design some login form how we manage security for those forms?which technology used for that purpose?
  • How Do you implement interface in JSP?
  • How can initialize interface in JSP?
  • How do u maintain a Session?
  • What is the differences between JSP LifeCycle and Servlet LifeCycle?
  • Can I call an interface in a JSP?
  • What is the Difference between sendRedirect() and Forward?
  • I want to place two buttons one for save and one for delete.i am using DispatchAction as controller,how can i find which button i am pressing and how to diffrentiate?
  • What is the difference betweeen a statis and dynamic include?
  • How can my JSP communicate with java class file
  • I want to accomplish the following scenario: 1) user submits a jpg/gif file from an html form (using in the form, the user can browse to a file of their choice) 2) upload the jpg/gif file through a combination of Java and JSP’s 3) put the jpg/gif into a database on a server and/or into a folder on my local system.
  • How to pop up a jsp page?refreshing every two seconds.
  • What is difference between scriptlet and expression
  • Can you make use of a ServletOutputStream object from within a JSP page?
  • Can a JSP page instantiate a serialized bean?
  • Is it possible to share an HttpSession between a JSP and EJB? What happens when I change a value in the HttpSession from inside an EJB?
  • What is the page directive is used to prevent a JSP page from automatically creating a session?
  • How do you prevent the Creation of a Session in a JSP Page and why?
  • How do I include static files within a JSP page?
  • How can I implement a thread-safe JSP page?
  • How do I mix JSP and SSI #include?
  • Can a JSP page process HTML FORM data?
  • What JSP lifecycle methods can I override?
  • How do I perform browser redirection from a JSP page?
  • Is there a way to reference the “this” variable within a JSP page?
  • Can I stop JSP execution while in the midst of processing a request?
  • How do I use comments within a JSP page?
  • How do I prevent the output of my JSP or Servlet pages from being cached by the browser?
  • How does JSP handle run-time exceptions?
  • How do I use a scriptlet to initialize a newly instantiated bean?
  • How can I enable session tracking for JSP pages if the browser has disabled cookies?
  • How can I declare methods within my JSP page?
  • How can I set a cookie and delete a cookie from within a JSP page?
  • Is there a way I can set the inactivity lease period on a per-session basis?
  • How does a servlet communicate with a JSP page?
  • How do I have the JSP-generated servlet subclass my own custom servlet class, instead of the default?
  • How do you pass control from one JSP page to another?
  • How do you restrict page errors display in the JSP page?
  • How do you call stored procedures from JSP?
  • How do you connect to the database from JSP?


No comments:

Post a Comment