Showing posts with label Tomcat. Show all posts
Showing posts with label Tomcat. Show all posts
Sunday, January 26, 2014
Tomcat Installation in windows and unix
Tomcat Installation ways for running on different platforms :
Tomcat Installation in windows :
1)Installing Tomcat on Windows using the Windows installer.
It's a Wizard base interface and functionality is similar to other wizard based installers. .
Installation as a service: Tomcat will be installed as a Windows service Using the checkbox on the component page sets the service as "auto" startup.
Tray icon: When Tomcat is run as a service, there will not be any tray icon present when Tomcat is running. the tray icon will be used even if Tomcat was installed as a service.
2)Installing Tomcat in windows exatracing the zip file : you can download the tomcat zip file from the apache tomcat mirror and Extract the tomact zip file .
Tomcat Installation on unix :
you can download the tomcat source tarball (apache-tomcat-7.0.50.tar.gz) from the apache tomcat mirror and Extract the tomact zip file as below .
gunzip apache-tomcat-7.0.50.tar.gz
tar -xvf apache-tomcat-7.0.50.tar
Tomcat Configuration Files
As a Tomcat administrators you must familiarize yourself some of the concepts and files about Tomcat Container .
Tomcat Directories and Files :
1)bin - Startup, shutdown, and other scripts.
2)conf - Configuration files and related DTDs. (server.xml , tomct-users.xml , content.xml)
server.xml : The most important file in here is server.xml. It is the main configuration file for the Tomcat container.
tomct-users.xml : Users are defined in tomcat-user.xml file to access the tomcat container manager webapp .
content.xml : The contents of this file will be loaded for each web application .
3)logs - Log files are here by default.
4)webapps - Webapps folder is for deploying you webapps .
All configuration files is read at container startup, that any change to the files restart of the container is necessary to reflect the changes .
Tomcat Installation : http://jeeservers.blogspot.in/2014/01/tomcat-installation-in-windows-and-unix.html
Friday, January 17, 2014
Step by step Enabling CGI configuration in Tomcat 6
1)The CGI is a way for a web server to interact with external content-generating programs, which are often referred to as CGI(Common Gateway Interface) programs
2)CGI support can be added when you are using Tomcat as your HTTP server and require CGI support.
3)Tomcat CGI support is implemented using the servlet class org.apache.catalina.servlets.CGIServlet. This servlet is mapped to the URL pattern "/cgi-bin/*".
Note : By default CGI support is disabled in Tomcat.
How To Enabe CGI (Common Gateway Interface) :
1) Uncomment the CGIServlet from web.xml file under TOMCAT_HOME/CONF folder that's commented by default .
2) Uncomment mapping for the CGI Gateway servlet from web.xml file under TOMCAT_HOME/CONF folder that's commented by default .
3) Add the priviliged ="true" in context.xml file under TOMCAT_HOME/CONF folder.
Note : you may see the below eror if you not added priviliged ="true" in context.xml .
PM org.apache.catalina.startup.HostConfig checkResources
WARNING: Error during context [] restart
java.lang.SecurityException: Servlet of class org.apache.catalina.servlets.CGIServlet is privileged and cannot be loaded by this web application
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1146)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993))
4) Restart the Tomcat server to Pick up the new configuration
5) Create a cgi folder under your webapps/xxxx/WEB-INF and place your CGI scripts in cgi folder .
6) access the url http://webservicesm.blogpsot.in:8080/cgi-bin/test.pl
2) Uncomment mapping for the CGI Gateway servlet from web.xml file under TOMCAT_HOME/CONF folder that's commented by default .
3) Add the priviliged ="true" in context.xml file under TOMCAT_HOME/CONF folder.
Subscribe to:
Comments (Atom)