2

I am new to Java and using Java 7. I have installed NetBeans 7.1 and opened a web project with default settings. Following image shows the settings. Even though Tomcat is pre-installed it is not showing the version. I need to buy a host for web application so I need to know which Tomcat version I have to get. So, it seems like I have Java 7 and Java EE 6, and which Tomcat version is suitable?

Please note I didn't install Tomcat. It is built-in in NetBeans and only have to activate

enter image description here

informatik01
  • 16,038
  • 10
  • 74
  • 104
Soldier
  • 539
  • 6
  • 11
  • 18
  • It seems to me that you are confusing Java (SE) 7 (SE = Standard Edition) with JavaEE (Enterprise Edition). The JavaEE 7 spec was only finalized last month IIRC, so tools and platforms probably don't support it yet. There is however no problem to run JavaEE 6 on Java 7 . – Mark Rotteveel May 19 '13 at 15:37
  • @MarkRotteveel: Thank you for the reply. So the TommCat version is 7 right? – Soldier May 19 '13 at 17:34
  • @Soldier Tomcat is not fully compliant Java EE Application Server. It is a **Servlet/JSP container** (read here: [Difference between an application server and a servlet container?](http://stackoverflow.com/a/5039371/814702) and also [here](http://stackoverflow.com/a/1697281/814702)). See the following page for the information related to Tomcat versions and the supported Servlet versions: [Apache Tomcat Versions](http://tomcat.apache.org/whichversion.html) – informatik01 Jun 14 '13 at 16:42

2 Answers2

2

Go to the TOMCAT_HOME/bin directory and look for the script named "version.sh".

For Java 7 suitable Tomcat version is 7

informatik01
  • 16,038
  • 10
  • 74
  • 104
michal
  • 1,796
  • 1
  • 13
  • 11
  • That folder is not there because I didn't install tomcat. It came built-in in netbeans – Soldier May 19 '13 at 15:16
  • @Soldier Check out the following [NetBeans 7.1 installation instructions](https://netbeans.org/community/releases/71/install.html#uninstall_sollinux). There see the table describing the **default installation locations** for the bundled Tomcat. And in your Tomcat installation directory find `bin` and there will be *version.sh* (for Linux/Unix/OS X) and `version.bat` (for Windows). And by the way NetBeans 7.3.1 is already out, with the support of recently launched [Java EE 7](http://www.oracle.com/technetwork/java/javaee/tech/index.html) – informatik01 Jun 14 '13 at 16:19
  • +1 for the right solution. As a side note, there is also `version.bat` in case it is Windows. And to be correct, it is not *which Tomcat for Java*, but *which Java JRE version to choose for Tomcat* (i.e. to be able to run Tomcat). For instance, Apache Tomcat 7.0 requires a Java Standard Edition RuntimeEnvironment (JRE) **version 6 or later** (read here: [RUNNING.txt](http://tomcat.apache.org/tomcat-7.0-doc/RUNNING.txt)) – informatik01 Jun 14 '13 at 16:50
  • Netbeans supports Tomcat 7.0.34. – Engineer2021 Oct 11 '13 at 19:46
1

Its better and suggested that you configure a local installed Tomcat address for netbeans.
And a suitable version is 7.0.23 or 7.0.40

Sam Su
  • 6,532
  • 8
  • 39
  • 80