The values of <servlet-name> and <servlet-class> in web.xml file

Options
- must be same
- must not be same
- may be same
- None of the above


CORRECT ANSWER : may be same

Discussion Board
java

good for me

afework 01-20-2015 07:11 AM

Servlets

The values containing in web.xml for <servlet-name> and <servlet-class> is same and it is given as below:

<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>mysite.server.TeamServlet</servlet-class>
</servlet>
web.xml is used to define mappings between URL paths and the servlets that handle requests with those paths. Configuration of the web server is used to identify the servlet to handle a given request and call the class method that corresponds to the request method (e.g. the doGet() method for HTTP GET requests). Servlet runs on the server side and executes at the server side so it maps the URL to the servlet using the <servlet> element.

Rohit Sharma 11-27-2014 07:40 PM

Write your comments

 
   
 
 

Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement