I have no experience working with Eclipse.
Try and have Tomcat working in XAMPP first if possible, then bring Eclipse into the equation. It may be possible that they will then work together. As it is right now it would be hard to define which of them to try and configure for best results.
The reason for starting Tomcat using the tomcat_start.bat file is it will return a more informative error message if it can't start.
Check, after you have started Tomcat, in the Task Manager for the running tomcat process - right click on the Task Bar>Processes tab look for tomcat.exe.
I believe that you should also start Tomcat as a service if you intend to use it regularly and especially during development but only after all is fine in XAMPP, see below.
Matt wrote:FYI, it looks like XAMPP Tomcat does not specify a port when viewing in a browser while Eclipse starts it off 8080.
readme-addon-tomcat.txt wrote:Tomcat Server Home = .\xampp\tomcat
Tomcat URL =
http://localhost:8080Tomcat Doc Root = .\xampp\tomcat\webapps
The default Tomcat Doc Root is all important just as it is in Apache as Tomcat will run apps with no problems inside this Doc Root, as does Apache serve files inside it's default DocumentRoot (
htdocs) - extra configuration in the form of a VirtualHost may be needed for access to files outside the Tomcat Doc Root (
again as does Apache) and a VirtualHost container will allow you to define a DocumentRoot to your Java project folder perhaps - not tested.
Drag the file
JkWorkersFile "C:/xampp/tomcat/conf/workers.properties" into your text editor for more reading and for some more port details but don't edit it unless you know what you are doing and that you make a backup first.
Go to
http://localhost and look for the Java item in the left menu of the Welcome Page - it will tell you if XAMPP has recognized Tomcat and what ports etc. are being used and has working examples if all is as it should be in XAMPP.
My partner Izzy wrote some useful
replies to Tomcat inquiries which might help.
Mounting your Java project folder correctly in the mod_jdk.conf file may solve your main problem.
In the mod_jdk.conf file you will see the section in code below and here you would add the folder you wish to mount, which in effect, is telling Tomcat where to look for files and if you put your Java project files in the .\xampp\tomcat\webapps tree then the path would be easily inserted in a JkMount line and Tomcat would find them all.
You can also experiment in here with the file path to your existing Java project if you prefer to keep it's location so Eclipse can also find it or change it's new location in Eclipse's configuration.
(
Perhaps the path should look similar to this JkMount "C:\Eclipse\workspace\Directory" - not tested)
- Code: Select all
JkMount /*.jsp ajp13
JkMount /examples/* ajp13
JkMount /jsp/* ajp13
JkMount /servlets/* ajp13
If your folder is outside the tomcat tree then perhaps use a VirtualHost by experimenting with the commented example but I have never had the need for nor have I experimented with this aspect - other examples of vhosts can be found in the httpd-vhosts.conf file but would need the...
<IfModule !mod_jk.c>
(
JkMount path inserted in here)
</IfModule>
...added to a Tomcat Java enabled vhost container.
Here is what my mod_jdk.conf file looks like and, as you can see, I have modified it somewhat to reflect the folder names in my Tomcat Doc Root (
the first forward slash indicate the Doc Root which is the .\xampp\tomcat\webapps folder).
- Code: Select all
JkMount /*.jsp ajp13
JkMount /examples/* ajp13
JkMount /java/* ajp13
JkMount /jsp-examples/* ajp13
JkMount /servlets-examples/* ajp13
JkMount /jforum/* ajp13
I place all my Java content in this Doc Root webapps folder.
If all is working as you intended in XAMPP then stop Tomcat and proceed, as it would be time to introduce Eclipse again into the equation.
Good luck.