Re: servlet config and servlet context
Servlet Context
ServletContext interface is a window for a servlet to view its
environment. A servlet can use this interface to get information such
as initialization parameters for the web application.
The context is initialized at the time of the web application is loaded
Servlet Config
To retrieve initial parameters, we need the ServletConfig object passed
by the servlet container to the servlet.
I hope i have'nt confused you with my language.
Murali
Gowri wrote:
can anyone tell me in easy language and with goodexamples why
servletconfig and servletcontext are used.
.
Relevant Pages
- Problem with the deployment of Servlet (Cont)
... The location you've stored the html and the servlet class, ... <!-- loaded into this instance of Tomcat. ... <!-- must uncomment these mappings (or add them to your application's ... (comp.lang.java.programmer) - Problem with deployment of Servlet
... I am starting to use servlet but I face the very obstacle that I can't load ... <!-- loaded into this instance of Tomcat. ... <!-- must uncomment these mappings (or add them to your application's ... (comp.lang.java.programmer) - Re: scope of servletContext
... It also might or might not attempt to carry over servlet context attributes, in which case it is unlikely to succeed with any attribute that is not Serializable. ... The worst possible case is that on a hot redeployment your thread continues to run, but the new servlet context has no reference to it. ... but if reliable scheduling of the job is more important than the web interface to it then that's an argument in favor of standalone scheduling. ... (comp.lang.java.programmer) - Re: Get ServletContext
... I would like to know if there is a convenience method for obtaining ... the servlet context for an application. ... about how this can be done via the servlet config object. ... like to set a XSLT transformer object as an application level ... (comp.lang.java.programmer) - Re: RequestDispatcher and usage of forward slash
... RequestDispatcher dispatcher =request.getRequestDispatcher("/ ... I found that the servlet invokes the viewPostedData.jsp with the given ... I believe if you *do* use /, then it is relative to the servlet context, but I could be wrong, I don't often mess with that level, leaving it happily abstracted by Spring :-) ... (comp.lang.java.programmer) |
|