JSP Tutorial





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
JSP Tutorial
Introduction Introduction
Installing JDK-Windows Installing JDK-Windows
Installing JDK-Linux Installing JDK-Linux
Installing Tomcat Installing Tomcat
Simple Program in JSP Simple Program in JSP
Pre-defined Variables Pre-defined Variables
Syntax of Tags Syntax of Tags
JSP Expression Language JSP Expression Language
JSP EL Operators JSP EL Operators
EL Implicit Variables EL Implicit Variables
Scopes Scopes
Using Arrays Using Arrays
Methods Methods
JSP Elements JSP Elements
Including Beans Including Beans
JSTL Tags JSTL Tags
Custom Tags Custom Tags
Session Session in JSP
Handling Cookies Handling Cookies
JSP Application Structure JSP Application Structure
Configuring web.xml Configuring web.xml
Tomcat Configuration Tomcat Configuration
JSP Examples JSP Examples
Forums Ask Your Doubts
Feedback Feedback
 






outsourced web hosting support

Web Application Structure in JSP Page


Tutorials Jsp

Topic

How to integrate a web application with Tomcat Server?
Creating and Deploying War Files using JSP.



Explanation
Creating a WAR file:

WAR file or Web Archive Resource file used to run an web application. To create a war file for an application name "hiox".

  • Open the Commad Prompt
  • Goto to webapps/hiox
  • Use the "jar" command like "jar -cvf hiox.war *"
  • now "hiox.war" file can be used from any server
Deploying the WAR file:
  • Copy the "*.war" file to the "webapps" folder of the Tomcat server.
  • Restart the Tomcat server.
  • WAR file will get deployed automatically

To integrate any application using a Tomcat server an folder for that application should be created inside the "webapps" folder.


In the above example we have created a folder named "SampleApps" inside the "webapps" folder.


The files for an application is stored indside the respective folder, along with a folder "WEB-INF" which is mandatory.

Now, the following screenshot shows the folders "lib", "classes" and a file "web.xml".


The "lib" folder is used to store the ".jar" files that are specific to a application.


The "classes" folder can contain "classes" or it can have subfolders for packages like "pack" below which contains the compiled java class files.



The "web.xml" file is used to define information about servlets, url mapping for normal and error pages, it is also used specify the welcome page or the index page etc. All together this file explains creating and deploying web applications using JSP.




A Note
JSP(Java Server Pages) is one of the most used Server Side Programming Language in the world. Simple introduction, basic program codes with examples. Begin coding your own JSP scripts with this online tutorial. Hope you enjoy this tutorial. Do send your feedback or suggestions on this JavaServer Pages tutorial. This is a copyright content.


Other Links

web hosting