Any Web Application has a hierarchical structure (of folders) that is used for packaging the web applications.
The application needs a reference point within the hierarchical structure. Here, let's call it TOMCAT_HOME. This represents the root of your server (Tomcat) installation, not your Web application root.
When we talk of a Web application's context, we are referring to that Web application's root directory or path within a particular server. A special directory exists within the application hierarchy named WEB-INF. This directory contains all things related to the application that aren't in the document root of the application. It is this WEB-INF directory that is the Web application's root directory, also referred to as the context. The most important file here is web.xml, the name of the WebApp deployment descriptor.
Let us take a look at the various contents (files & folders) that will be present inside this WEB-INF directory:
1. /WEB-INF/web.xml - This is the Deployment Descriptor file
2. /WEB-INF/classes/ - This is the directory where all your java class files will be placed
3. /WEB-INF/lib/ - This is the folder where all your JAR files go.
The classes folder is where you will place the .class file of your Servlet to deploy it on a server
Tomcat is a server. It is used to deploy and run Servlets and not compile them. A Servlet is a java file and has to be compiled just like any other Java Class.
Java Servlet Development Kit is an integrated development kit used to build, test, and deploy Java Servlet applications. JSDK allows most standard Web server such as Netscape servers, IIS, Apache and others to load servlets . JSDK is a suite of software for easing the development of Java servlets.
No. But, knowledge of Servlets would be an added advantage if you are learning JSPs
No. I believe, servlets are much secure and more powerful than applets.
J2SE stands for Java 2 Standard Edition and I dont think Servlets are a part of it. Servlets are only part of the Java 2 Enterprise Edition.
JSPs can contain HTML, JavaScript, XML and Java Code whereas Servlets can contain only Java Code, making JSPs more flexible and powerful than Servlets. However, Servlets have their own place in a J2EE application and cannot be ignored altogether. They have their strengths too which cannot be overseen.
Yes, JSP (JavaServer Pages) and Servlets can be used together in a web application. Servlets handle the business logic and processing of requests, while JSP is used to create the user interface and generate dynamic content. Servlets can interact with JSP pages to pass data and control the flow of the application.
Yes. All sorts of web Applications/websites can be created using JSP and Servlets
Try the Head First JSP & Servlets book. It is a good book for learning them. You can also try the internet. You can get a lot of websites that give you tutorials on JSPs and Servlets. One of them is available in the related links section
You cannot. You display JSP Pages using the help of Servlets. Servlets are of the background classes and you cannot display them
Servlet is a Server side component, a servlet is a small pluggable extension to the server and servlets are used to extend the functionality of the java enabled server.
The speed difference is not usually significant, but the slight performance advantage goes to Servlets because, JSPs get converted to Servlets before execution and since Servlets do not have this conversion phase, they are a little and I mean only slightly little faster than JSPs