Thursday, March 3, 2011

Setting and using Apache Tomcat/5.0.28 in windows

1. Install the tomcat in windows by selecting port 8090. Do not change any location.
2. Start the tomcat server. If it gets started, no problem. Otherwise check the log in C:\Program Files\Apache Software Foundation\Tomcat 5.0\logs
If you find
[2009-01-16 11:22:19] [1343 prunsrv.c] [debug] Procrun log initialized
[2009-01-16 11:22:19] [info] Procrun (2.0.4.0) started
[2009-01-16 11:22:19] [info] Running Service...
[2009-01-16 11:22:19] [1166 prunsrv.c] [debug] Inside ServiceMain...
[2009-01-16 11:22:19] [info] Starting service...
... [error] The specified module could not be found.
[2009-01-16 11:22:19] [994 prunsrv.c] [error] Failed creating java
C:\Program Files\Java\jre1.6.0_07\bin\client\jvm.dll
[2009-01-16 11:22:19] [1269 prunsrv.c] [error] ServiceStart returned 1
[2009-01-16 11:22:19] [info] Run service finished.
[2009-01-16 11:22:19] [info] Procrun finished.
[2009-01-16 11:24:41] [1343 prunsrv.c] [debug] Procrun log initialized
[2009-01-16 11:24:41] [info] Procrun (2.0.4.0) started
[2009-01-16 11:24:41] [info] Debugging Service...
[2009-01-16 11:24:41] [1166 prunsrv.c] [debug] Inside ServiceMain...
[2009-01-16 11:24:41] [info] Starting service...
...[174 javajni.c] [error] The specified module could not be found.


Then follow steps from 3 to  6.

3. Copy msvcr71.dll from java’s bin directory to tomcat’s bin folder.
4. Add java’s bin directory to windows %path% environment variable.
5. Copy msvcr71.dll from java’s bin directory to windows\system32 folder.
6. Make sure your tomcat’s pointing to correct jvm.dll folder.
7. set the classpath using
set CLASSPATH="C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\jsp-api.jar";"C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar"

8. Restart the server. Put a JSP file in C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT
9. access the file through browser using http://localhost:8090/file.jsp
10. If you get error like:
Unable to find a javac compiler;com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK

follow the remaining steps
11. Copy tools.jar from into your TOMCAT_HOME/common/lib folder.

No comments:

Post a Comment

Android aar deployment in Maven - 2022

Introduction If you are working on android library project, you might be wondering how to publish it on Maven like this . Earl...