I have been learning JSP , servlets ,by installing Apache Tomcat, and practicing it on pc. It works fine.
However, my desire is to test JSP , servlets on live web environment . I already have a (Apache) web server space and currently it supports Perl and PHP scripting language by default.
What should I do to make it run JSP,servlets pages too ?
- How to install tomcat application on this web space ? Will it work .
- How to install jre ??
- How to set the environment variables, we set in our home computer ?
Is it something which ,only, web hosting companies could provide and we cannot do anything about it. It might sound stupid but I am just curious .
- Adarsh Agarwal
| The person who asks is a fool for 5 minutes, the one who does not ask is fool for a lifetime |
Apache web server does not support JSPs and Servlets. You would need to install Tomcat or the like. How to install it and how to install a JRE are going to vary by your hosting company. Do they allow you to install software? Do they give you access to FTP? Do they give you access to a command line?
I realize these are things you might not know yet, but they show you what you'll need to look up.
I'm continually amazed that there isn't more confusion between the Apache HTTP webserver and Apache Tomcat. But Apache HTTP (commonly known simply as "Apache") has no Java capabilities at all.
Apache Tomcat, on the other hand is written in Java to run Java.
Apache HTTP and Tomcat are often paired, as that allows a mix of Java and non-Java webapps to run on the same server and answer on the same ports (80 and 8443). This is done by using one of the available Apache-to-Tomcat tunnel channels. The two in most common use are mod_jk and mod_proxy. Both are installed as Apache modules and configured to route selected traffic to Tomcat. Tomcat has a corresponding receiving channel (coyote) which generally listens on port 8009. Other servers can also proxy for Tomcat, but Apache is one of the favorites.
To get Apache and Tomcat running on your own hardware is not difficult as long as you have sufficient RAM and CPU capabilities. And most systems today do.
Running Tomcat on an external leased host is often a bigger challenge. Since the overall system requirements for Apache+Tomcat are significantly more than for Apache-only, the cheaper services have not historically been suitable. Also, they normally pre-install the software off a limited list. Which typically includes Apache, but not Tomcat. Furthermore, unless the account has a login shell, you will find it difficult to install and manage Tomcat. The web-based control panels rarely have the features needed.
Sources may include data from the Fakebook Research Foundation with support from Gargle University
I do some of my very best work in water. Like this tiny ad: