top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

slim and trim tomcat - which java is needed

+1 vote
361 views

We have discovered that under the conf/localhost and webapps directories, all of the release directories and xml files can be removed, leaving just the application(s) you want running. I could b wrong but I think this also closes some possible security issues, besides keeping a smart-cookie from playing with the examples ...

However I am totally unclear which (if any) java pieces need to be on a distribution machine. Obviously a source machine needs the Java JDK. On a distribution machine, apache compiles JSP code initially so it needs something.

One person told me the JRE should be enough, but another said that Apache/Tomcat actually comes with it's own compiler, and yet another says to have the JDK. On my Fedora-18 distribution (before I put in the JDK), there is at least one java compiler (/etc/alternatives/javac).

So do we need the JRE or the JDK or can Tomcat work without either on a non-sofware development box?

posted Dec 15, 2013 by Satish Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Read the RUNNING.txt file in the standard Tomcat distribution. If you're using a third-party repackaged version, you'll need to contact the supplier of that version. Strongly recommend that you use real Tomcat download, since the third-party ones often turn things into mush.

You should also look at this:
http://tomcat.apache.org/tomcat-7.0-doc/security-howto.html

And the security-related items here:
http://wiki.apache.org/tomcat/HowTo

answer Dec 15, 2013 by Mandeep Sehgal
Similar Questions
+2 votes

I'm receiving the following exception:

java.net.SocketException: "Permission denied": connect

when instantiating a Socket from a servlet:

final Socket smtpSocket = new Socket(mailTransportHost, mailTransportPort);

This application was running as a service under Windows Server 3003 R2 32-bits. After migrating it to Windows Server 2008 R2 64-bit, I cannot longer establish connection with the smtp server.

This only happen when running Tomcat as a service. Running as a standalone (starting it up using startup.bat) works fine. No exception instantiating Socket, emails are sent.

Environment:

 - Windows Server 2008 R2 64-bit
 - Tomcat 7.0.39
 - jdk1.6.0_33-x64
...