Deploying JSPs and servlets on Parallels Pro is as easy as uploading a Web site using any FTP client. When you enable Tomcat for a site, Parallels Pro Control Panel creates a default Tomcat context, for the virtual site in the Web directory. The context path of each virtual site is /home/virtual/domainname/var/www/html/.
A new directory called WEB-INF
is created in this directory. The WEB-INF directory contains some configuration information for Tomcat and a directory in which servlet class files are placed for deployment.
As long as the file extension of the JSP file is .jsp, the Site Administrator can simply load a JSP page in the directory /var/www/html/
, and the Web server automatically passes it on to Tomcat for processing.
For example, if you have a file named test.jsp
, the Site Administrator can use an FTP client to upload the file in the directory /var/www/html/
. You can then access the dynamic JSP page through http://
<site name>/test.jsp
. The first time you access this page, Tomcat takes a few seconds to compile the page but subsequent accesses are much quicker. Compiling a servlet source Java file creates a servlet class file. Deploying a servlet on Parallels Pro includes uploading the servlet class file in /var/www/html/WEB-INF/classes/.
For example, if you have a file named test.class
, you would use an FTP client to upload the
file in /var/www/html/WEB-INF/classes/.
The servlet is executed through http://
<site name>/servlet/test.