|Home |Login |Registration |Struts Step by Step Tutorial |Hibernate Step by Step Tutorial |Spring Step by Step Tutorial |JSP Step by Step Tutorial |JDBC Step by Step Tutorial |Web Services Step by Step Tutorial |EJB fundamentals | ORACLE Step by Step Tutorial | SCJP 5.0 and SCJP 6.0 Study Guide | SCWCD 5.0 Study Guide | SCJP Tips
Java mock test | SCJP mock test | SCJP DUMP | SCBCD mock test |Java online test exam | JSP online test | ORACLE online test | Hibernate online test | Servlet online test | Struts online test | EJB online test | C online test | C++ online test | Aptitude online test

Java interview questions | JSP interview questions | ORACLE interview questions | Hibernate interview questions | Servlet interview questions | Struts interview questions | JDBC interview questions | C/C++ interview questions | Spring interview questions | JMS interview questions | Informatica interview questions | EJB interview questions | OOPS and Design Pattern interview questions
1600 PMP mock questions 1400 CAPM mock questions 800 SCJP 6 mock questions 600 OCAJP 7 mock questions 590 OCPJP 7 mock questions 556 SCWCD 5 mock questions 500 OCEJWCD 6 mock questions pdfDownload (java,struts, hibernet etc) JobsJobs and Walkins

 

Recent Questions

  • Exception handling in Servlet and JSP specifications view answer
  • Details about load on startup (load-on-startup tag) in Servlet ? view answer
  • What's the difference between init() & init(ServletConfig) and Which is better ? view answer
  • Servlet Life Cycle ? view answer
  • Q. Can we override init() or init(ServletConfig) method of HttpServlet ? Which is better ? view answer
  • Q. Can we override service method in HttpServlet ? view answer
  • Q.What is the difference between init() and init(ServletConfig) ? view answer
  • Q.How to upload an File/image from servlet/jsp into server from clients machine? view answer
  • What's the difference between init() & init(ServletConfig) in genericServlet ? view answer
  • Q.What is the difference between ServletContext and PageContext? view answer
  • Q.What is the difference in using request.getRequestDispatcher() and context.getRequestDispatcher()? view answer
  • Q.Difference forward() and response.sendRedirect() . view answer
  • Q.Can we use the constructor, instead of init(), to initialize servlet? view answer
  • Q.Explain the life cycle of Servlet? view answer
  • Q.Why don't we write a constructor in a servlet? view answer
  • Q.When we don't write any constructor for the servlet, how does container create an instance of servlet? view answer
  • Q.Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()? view answer
  • Q.Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time? view answer
  • Q.Request parameter How to find whether a parameter exists in the request object? view answer
  • What is new in ServletRequest interface ? view answer
  • Q.Given the request path below, which are context path, servlet path and path info? /bookstore/education/index.html view answer
  • Q.When a client request is sent to the servlet container, how does the container choose which servlet to invoke? view answer
  • Q.What is servlet container? view answer
  • Why IllegalStateException in jsp/servet? view answer
  • Q.How do I upload a file in a servlet app? view answer
  • Q.What's the difference between response.sendRedirect() and requestDispatcher.forward() ? view answer
  • Q.How do I implement security for my web application ? view answer
  • Q.How can I use servlets with protocols other than HTTP, e.g. FTP? view answer
  • Q.What happens if i call destroy() from init()? view answer
  • Q.Why can't a container call constructor having parameters? view answer
  • Q.Why do servlets have an init method? Can't we make use of the servlet constructor for initialization? view answer
  • Q.Explain the life cycle methods of a Servlet. view answer
  • Q.Explain the directory structure of a web application view answer
  • Q.What are the common mechanisms used for session tracking? view answer
  • What is load-on-startup in servlet ? view answer
  • Q. What is the difference between the getRequestDispatcher(String) and getNamedDispatcher(String) methods in the ServletContext Class? view answer
  • Q: What is the difference between Difference between doGet() and doPost()? view answer
  • Q. What is the difference between ServletContext and ServletConfig? view answer
  • Q: What is the difference between HttpServlet and GenericServlet? view answer
  • Q.What is the difference between the getRequestDispatcher(String path) method of ServletRequest interface and ServletContext interface? view answer

!!! Servlet Frequently Asked Questions !!!

Q.What is the difference between the getRequestDispatcher(String path) method of ServletRequest interface and ServletContext interface?

SCWCD 1.5 Exam Kit

!!!Answer!!!- From Technical Expert

The servletRequest's getRequestDispatcher() can take a relative path while ServletContext's getRequestDispatcher() can not(can only take relative to the current context's root). For example with ServletContext both request.getRequestDispatcher("./jsp/jsppage.jsp") -
evaluated relative to the path of the request request.getRequestDispatcher("/jsp/jsppage.jsp") -
evaluated relative to the root are all valid with ServletContext only
context.getRequestDispatcher("/jsp/jsppage.jsp") is valid but not context.getRequestDispatcher("./jsp/jsppage.jsp"). that is it can not evaluate a path other than context root.


get details http://techforum360.com/forum/viewthread?thread=28

Answered By : null Replied Date : Feb 21 2012
Answer :


Answered By : null Replied Date : Feb 7 2012
Answer :


Answered By : null Replied Date : Jan 24 2012
Answer :


Answered By : null Replied Date : Jan 11 2012
Answer :


Answered By : null Replied Date : Nov 6 2011
Answer :


Answered By : null Replied Date : Oct 17 2011
Answer :


Answered By : null Replied Date : Oct 16 2011
Answer :


Answered By : null Replied Date : Jul 8 2011
Answer :


Answered By : null Replied Date : Jun 22 2011
Answer :


Answered By : null Replied Date : Jun 18 2011
Answer :


Answered By : null Replied Date : Jun 17 2011
Answer :


Answered By : null Replied Date : Jun 1 2011
Answer :


Answered By : null Replied Date : Apr 26 2011
Answer :


Answered By : null Replied Date : Apr 13 2011
Answer :


Answered By : null Replied Date : Apr 12 2011
Answer :


Answered By : null Replied Date : Apr 6 2011
Answer :


Answered By : null Replied Date : Apr 4 2011
Answer :


Answered By : null Replied Date : Mar 25 2011
Answer :


Answered By : null Replied Date : Mar 11 2011
Answer :


Answered By : null Replied Date : Mar 4 2011
Answer :


Answered By : null Replied Date : Feb 20 2011
Answer :


Answered By : null Replied Date : Feb 17 2011
Answer :


Answered By : null Replied Date : Feb 15 2011
Answer :


Answered By : null Replied Date : Jan 15 2011
Answer :


Answered By : null Replied Date : Jan 2 2011
Answer :


Answered By : null Replied Date : Dec 28 2010
Answer :


Answered By : null Replied Date : Dec 26 2010
Answer :


Answered By : null Replied Date : Dec 26 2010
Answer :


Answered By : null Replied Date : Dec 25 2010
Answer :


Answered By : null Replied Date : Dec 19 2010
Answer :


Answered By : null Replied Date : Dec 6 2010
Answer :


Answered By : null Replied Date : Nov 29 2010
Answer :


Answered By : null Replied Date : Nov 25 2010
Answer :


Answered By : null Replied Date : Nov 12 2010
Answer :


Answered By : null Replied Date : Nov 7 2010
Answer :


Answered By : null Replied Date : Nov 7 2010
Answer :


Answered By : null Replied Date : Nov 7 2010
Answer :


Answered By : null Replied Date : Nov 7 2010
Answer :


Answered By : null Replied Date : Nov 7 2010
Answer :


Answered By : null Replied Date : Nov 6 2010
Answer :


Answered By : null Replied Date : Oct 30 2010
Answer :


Answered By : null Replied Date : Oct 30 2010
Answer :


Answered By : null Replied Date : Oct 30 2010
Answer :


Answered By : null Replied Date : Sep 28 2010
Answer :


Answered By : null Replied Date : Aug 21 2010
Answer :


Answered By : null Replied Date : Aug 14 2010
Answer :


Answered By : null Replied Date : Aug 6 2010
Answer :


Answered By : null Replied Date : May 8 2012
Answer :


Answered By : null Replied Date : Jul 27 2012
Answer :


Answered By : null Replied Date : Aug 20 2012
Answer :


Answered By : null Replied Date : Sep 5 2012
Answer :


Answered By : null Replied Date : Oct 10 2012
Answer :


Answered By : null Replied Date : Oct 19 2012
Answer :


Answered By : null Replied Date : Nov 9 2012
Answer :


Answered By : null Replied Date : Nov 26 2012
Answer :


Answered By : null Replied Date : Dec 24 2012
Answer :


Answered By : null Replied Date : Feb 11 2013
Answer :


Answered By : null Replied Date : Apr 2 2013
Answer :


Answered By : null Replied Date : Apr 15 2013
Answer :


 

You can also contribute to this answer:

Your Name:
Answer:

 
Ask Question and get answer from Expert.
View Answers List from Expert.

The information you are posting should be related to java and ORACLE technology. Not political.