Configuring JSP File

Prev Tutorial Next Tutorial

Configuring JSP File

Configuring a JSP into a web.xml file is optional because JSP is a public file to the web application.

A JSP called a public file and servlet is called a private file of the web application. Because JSP files stored in root directory of the web application and Servlet class file stored in sub directory of the web application. Because JSP is the public file, we can directly send a request from a browser by using its file name.

If we want ot configure a JSP in web.xml file the the xml elements are same as Servlet-configuration. We need to replace <servlet-class> element with <jsp-file>



Note: If we configure a jsp in web.xml then we can send the request to the jsp either by using jsp filename or by using its url-pattern.



Prev Tutorial Next Tutorial

Google Advertisements
Download Projects

Google Adsense Advertisements

Buy 3 Year Old Domain,, @$200

Buy This Ad Space @$50 per Month, Ad Size 300X250 Contact on: WhatsApp no. 8882538826

Yahoo Advertisements