Posts Tagged Difference

Fully qualified V/S unqualified name in java

November 24, 2011
Fully qualified V/S unqualified name in java

Lets make it clear what is meant by fully qualified name & unqualified name in Java, and how to get them inside Java code Consider a small example: package org.bss.pkg;   Class Member {   private int id;   public int getId() { return id; }   public void setId(int id) { this.id = id; [...]

Difference between ServletRequest.getRequestDispatcher and ServletContext.getRequestDispatcher

October 26, 2011
Difference between ServletRequest.getRequestDispatcher and ServletContext.getRequestDispatcher

If you use ServletRequest.getRequestDispatcher: you can use absolute path like “/index.jsp“, which forwards request to “http://www.myapp.com/index.jsp” from the request received directory or you can use relative path like “index.jsp”, which forwards request to “index.jsp” which is relative to the request received servlet. For example, if you receive your request on “http://www.myapp.com/mymodule/”, RequestDispatcher requestDispatcher = request.getRequestDispatcher(“index.jsp”); [...]

 

If you have a Tip, Comment, Article or anything you want to share, please send it to: i@poisure.com