Archive for the Tomcat Category

Check Tomcat,Java,JSP And Servlet Version Online

If you  recently  installed Apache-Tomcat on your system and wants to check  the Java, JSP , Servlet and Tomcat versions then just put the below code in .jsp file ::



Apache-Tomcat Version : <%=getServletConfig().getServletContext().getServerInfo()%> <br>

Servlet Version : <%= session.getServletContext().getMajorVersion() %>.<%= session.getServletContext().getMinorVersion() %><br>

JSP Version : <%= JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %><br>

Java Version : <%= System.getProperty("java.version")%><br>


And now you can access the above information online as .

How to enable Tomcat Manager

Tomcat Manager Web application is packaged with the Tomcat server and you can access Tomcat Manager by browsing the URL http://yourserverip:8080/manager.


Tomcat Manager allows you the ability to start , stop, reload , deploy and undeploy a Web Application.


By default Tomcat Manager access is not configured and you have to setup a admin user to access Tomcat Manager on a newly installed tomcat server.
Continue reading How to enable Tomcat Manager

Neither the JAVA_HOME nor the JRE_HOME environment variable is defined.

If  you are getting the  above error while stopping  or starting Tomcat  service from shell as ./  or ./ then it  means that the


variable is either not defined or incorrectly defined.
You can fixed this by running the below commands from Shell as root user :

[email protected][#] which java

you will get the below output :

then run this command

[email protected][#] export JAVA_HOME=/usr/local/jdk

after that try running the command

[email protected][#] cd /usr/local/jakarta/tomcat/bin
[email protected][#] ./ or ./

you will get the output for ./
Using CATALINA_BASE: /usr/local/jakarta/tomcat
Using CATALINA_HOME: /usr/local/jakarta/tomcat
Using CATALINA_TMPDIR: /usr/local/jakarta/tomcat/temp
Using JRE_HOME: /usr/local/jdk
Aug 3, 2010 11:46:26 AM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop: Connection refused
at Method)
at org.apache.catalina.startup.Catalina.stopServer(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.apache.catalina.startup.Bootstrap.stopServer(
at org.apache.catalina.startup.Bootstrap.main(

and for ./
Using CATALINA_BASE: /usr/local/jakarta/tomcat
Using CATALINA_HOME: /usr/local/jakarta/tomcat
Using CATALINA_TMPDIR: /usr/local/jakarta/tomcat/temp
Using JRE_HOME: /usr/local/jdk
Using CLASSPATH: /usr/local/jakarta/tomcat/bin/bootstrap.jar

That’s all you are done.