Depending on whether it is the bash shell (the first) or * csh (the second). In WinXX must be given a similar order. Finally to run the server, paying attention to the case it is installed using the RPM, do:
Code:
[yo@mimaquina yo]$ /etc/rc.d/init.d/tomcat4 start
In other cases, it will go to the bin directory of the distribution and run ./startup.sh or startup if it is Windows. By default, the server is configured to launch on port 8080 or 8180 (depending on the version). If all went well, we operate on our computer to Tomcat, and entering a URL such as http://localhost:8080 or http://localhost:8180 (if you want to use addresses below 1000 will have to be root).
er is working effectively. The main problem is that it fails silently Tomcat: running things, and seems to have started, but, however, has not done so. To see if you are working you have different choices: Use netstat to see if the port is busy and someone is listening to it (and if the Tomcat, the better, if not, why has failed because it has not been able to occupy the port ), listen carefully to see if your hard disk to start the tomcat has given vidilla, which indicates that you are actually working, look to see if there is something in the webapps directory, because if there is not, going to failure context or something, how easy it is, joer, there is no damn page, my!. It is also interesting to try to run the examples: if fail servlets JSPs but is not found the tools.jar file, which, despite its name, which compiles the JSPs. Finally, we should look in the catalina log in log / catalina_log. [Date]. Txt and if it has started correctly, something like this:
Code:
3/11/2002 8:33:13 HttpConnector Opening server socket on all available IP addresses 11/03/2002 8:33:15 HttpConnector [10001] Starting thread to post HttpProcessor 3/11/2002 8:33:15 [10001] [0] Starting thread back
If you just put the first message, crappy, it has not initiated any strand, which are actually serving the JSPs. If there's nothing like that, look for error messages in the log subdirectory, sometimes indicate that some file missing or While there is a problem of versions of the Java virtual machine.
Once installed, and has been proven to work correctly, you can try changing your setting, especially considering the number of visitors expected. Most configuration changes are made on the conf / server.xml. To change the port that is heard and the number of available servers minimum and maximum, we must change the following order:
Code:
<Connector className="org.apache.catalina.connector.http.HttpConnector" port=" 10001 "minProcessors=" 2 " maxProcessors=" 5 " enableLookups="true" redirectPort="8543" acceptCount="10" debug="0" connectionTimeout="60000"/>
The Tomcat configuration is done on a file that uses XML. With it, identifies a number of components: servers, connectors and containers, the configuration is greatly simplified since the previous version, but introduces new elements: the valves and motors. Tomcat for each server defines a set of connectors, whereby different classes respond to different ports, and are responsible for serving, the containers or engines are within the connectors, and are responsible for handling all requests for service. Unless to be used for particular applications (such as Cocoon), do not worry much about it. In some case, you just have to change the minimum number of processors (or threads serving requests) and the maximum, not to overburden the system if they have limited main memory. The bottom line is 2, and the maximum is up to 65535, or until the memory hold (which will not last long). As for the port, you can use any, if not already used, and always run from root, if you are not root, you use ports over a thousand. Once done, you have to reboot the server to take the new changes:
Code:
[yo@mimaquina yo]$ /etc/rc.d/init.d/tomcat4 restart
To save resources, you can delete stuff from that file. For example, if it is a development server, no need for apache connectors or connections using SSL. You can drop the service, Apache Tomcat, removing everything from the label and back label Service. You can also eliminate the AJP connectors, SSL, "proxied", and test, indicated with a comment, just below the normal connector (non-SSL HTTP/1.1). You can save a few more resources by starting the JVM in a way that limits the size of the heap and the stack, but do not save too much space. A running Tomcat not take never less than 90 megs (which you can see the top or gtop running either from the command line, ps-exfua. You can also add a new context to the server, especially if we want our applications do not mix with the other applications in the context root (those in the ROOT directory. This may be added, just after the line which defines this context, the following:
Code:
<Context path="/micontexto" docBase="micontexto" debug="0"/>
Once the application can be hosted on a server that offers this service. For example, Verio offers solutions based on the Solaris operating system (the price should be consulted). There are also free alternatives, though not eternal as in the case of GeoCities. One is iSavvix Devspace , which allows free hosting JSPs with tag libraries and even XSLT, what does not, is that you upload their own classes, although you can use different class libraries on the site. Alternatively, WebAppCabaret , which gives several alternative servlet container: Tomcat and NGASI, Enterprise Java Beans, MySQL databases, but all this for only 15 days beyond that, you need to recruit the premium service, from $ 3. Finally, MyCGIserver also allows free hosting, you have to answer a question related to servlets, but it is usually easy to find the answer.
Bookmarks