By Ramakrishna on Nov 18, 2008 in define application scope | 0 Comments
Application Scope
If a single Java Bean Object that holds nothing specific to the client has to be used while processing multiple requests then we must use scope=”application”
For every application there will be several application preferences/setting we can store the application preferences as part of a table in DataBase as part of an XML file/as part [...]
By Ramakrishna on Sep 30, 2008 in Define Precompile of Jsp page | 0 Comments
Q) How do you precompile a jsp page?
A) To precompile a JSP page, access the page with a query string of ?jsp_precompile
http://www.javagalaxy.com:8080/RMI/index.jsp?jsp_precompile
the jsp page will not get executed by this action.
By Ramakrishna on Jul 7, 2008 in Jsp Inteview Questions | 0 Comments
Q) Can I invoke a JSP error page from a servlet?
A) Yes, you can invoke the JSP error page and pass the exception object to it from within a servlet. The trick is to create a request dispatcher for the JSP error page, and pass the exception object as a javax.servlet.jsp.jspException request attribute. However, note [...]
By Ramakrishna on Jul 7, 2008 in Jsp Inteview Questions | 0 Comments
Q) What is the difference between ServletContext and PageContext?
A) ServletContext: Gives the information about the container
PageContext: Gives the information about the Request
Q) What is the difference in using request.getRequestDispatcher() and context.getRequestDispatcher()?
A) request.getRequestDispatcher(path): In order to create it we need to give the relative path of the resource.
context.getRequestDispatcher(path): In order to create it we need to [...]