What is the difference between servlet config and servlet
context.

Answer Posted / khushbu ajmera

A: ServletContext: Defines a set of methods that a servlet
uses to communicate with its servlet container, for example,
to get the MIME type of a file, dispatch requests, or write
to a log file.The ServletContext object is contained within
the ServletConfig object, which the Web server provides the
servlet when the servlet is initialized

ServletConfig: The object created after a servlet is
instantiated and its default constructor is read. It is
created to pass initialization information to the servlet.

Is This Answer Correct ?    13 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you invoke a servelt?

630


Explain load on start-up and its importance?

601


Explain the working of service() method of a servlet.

508


Which is the methods of generated servlet?

686


how the HTML data stored in web server?

1955






I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>

2534


Describe in brief RequestDespatcher?

596


What is load-on-startup in servlet?

589


In the servlets, we are having a web page that is invoking servlets ,username and password? which is checks in database? Suppose the second page also if we want to verify

588


What is pure servlet?

700


Why servlet is mostly used?

750


Difference between get and post in java servlets?

550


What do you mean by request dispatcher in servlet?

615


What are the difference between session and cookies in servlet? Explain

566


Differentiate between get and post?

684