Tomcat Addon

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Tomcat Addon

Postby confused2gether » 29. October 2007 16:01

I have the most recent XAMPP installed and I have just installed the Tomcat Addon since I need JSP support. The thing is, ive got my webapp in my htdocs folder for apache, and I want to leave it there, but I still dont get JSP support. I know this may seem like a noob quesiton but is there any other configs that I need to change? BTW I used the installer version of the Tomcat Addon. Any help or suggestions would be great.

::Update::
On localhost, I checked the tomcat and made sure that it is running and without errors. When I go to the demos link on the XAMPP localhost homepage, and go to Java, none of those examples work and they all yeild Error 404 Object Not Found!
confused2gether
 
Posts: 17
Joined: 29. October 2007 15:48

Postby Izzy » 30. October 2007 00:31

Any indication in the logs for the 404 errors?
xampp\apache\logs\error.log

Check the Windows Task Manager and see if the Tomcat service has started.
It runs on port 8080 so make sure nothing else is using that port.

Check the Tomcat logs.
xampp\tomcat\logs\

Check the java.conf file looks correct - path wise.
xampp\apache\conf\extra\java.conf

I have Tomcat installed 'out of the box' and running with no problems at all once I made sure I had the correct JDK installed as per the readme file.

Did you get any errors when installing?


===========================================
1. The new DeskTopXampp launch control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Make Richer Ajax Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby confused2gether » 30. October 2007 13:32

Izzy wrote:Any indication in the logs for the 404 errors?
xampp\apache\logs\error.log


This is all that is in the error logs, which if I add :8080 to those addresses that says that the file doesn't exist, they work just fine. Apache isnt forwarding requests to port 8080 like it should be:
[Mon Oct 29 11:33:44 2007] [notice] Apache/2.2.6 (Win32) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.4 configured -- resuming normal operations
[Mon Oct 29 11:33:44 2007] [notice] Server built: Sep 21 2007 00:29:38
[Mon Oct 29 11:33:44 2007] [notice] Parent: Created child process 4664
[Mon Oct 29 11:33:46 2007] [notice] Child 4664: Child process is running
[Mon Oct 29 11:33:46 2007] [notice] Child 4664: Acquired the start mutex.
[Mon Oct 29 11:33:46 2007] [notice] Child 4664: Starting 250 worker threads.
[Mon Oct 29 11:33:46 2007] [notice] Child 4664: Starting thread to listen on port 443.
[Mon Oct 29 11:33:46 2007] [notice] Child 4664: Starting thread to listen on port 80.
[Mon Oct 29 11:36:27 2007] [error] [client 127.0.0.1] File does not exist: D:/xampp/htdocs/examples, referer: http://localhost/xampp/java-example.php
[Mon Oct 29 11:39:37 2007] [error] [client 127.0.0.1] File does not exist: D:/xampp/htdocs/examples
[Mon Oct 29 11:47:04 2007] [error] [client 127.0.0.1] File does not exist: D:/xampp/htdocs/examples, referer: http://localhost/xampp/java-example.php
[Mon Oct 29 11:59:29 2007] [error] [client 127.0.0.1] File does not exist: D:/xampp/htdocs/jforum
[Mon Oct 29 11:59:35 2007] [error] [client 127.0.0.1] File does not exist: D:/xampp/htdocs/jforum
[Mon Oct 29 12:38:12 2007] [error] [client 127.0.0.1] File does not exist: D:/xampp/htdocs/jforum
[Mon Oct 29 13:05:16 2007] [error] [client 127.0.0.1] File does not exist: D:/xampp/htdocs/rootExample, referer: http://tomcat.apache.org/tomcat-3.2-doc ... howto.html
[Mon Oct 29 14:34:19 2007] [error] [client 127.0.0.1] File does not exist: D:/xampp/htdocs/xampp/function.mysql-connect, referer: http://localhost/xampp/cds.php
[Mon Oct 29 14:37:13 2007] [error] [client 127.0.0.1] File does not exist: D:/xampp/htdocs/examples, referer: http://localhost/xampp/java-example.php
[Mon Oct 29 14:37:27 2007] [error] [client 127.0.0.1] File does not exist: D:/xampp/htdocs/examples, referer: http://localhost/xampp/java-example.php
[Mon Oct 29 14:37:34 2007] [error] [client 127.0.0.1] File does not exist: D:/xampp/htdocs/examples, referer: http://localhost/xampp/java-example.php


Izzy wrote:Check the Windows Task Manager and see if the Tomcat service has started. It runs on port 8080 so make sure nothing else is using that port.


I have already checked this out and it is working and running because if I go to localhost:8080 I get the tomcat screen.

Izzy wrote:Check the Tomcat logs. xampp\tomcat\logs\


There isn't any errors in the logs or anything out of the ordinary. Is there something that I should be looking for?

Izzy wrote:Check the java.conf file looks correct - path wise.
xampp\apache\conf\extra\java.conf


Hmm....I don't seem to have that file in the location that you gave me. The only thing that is Java related in that folder right now is mod_jk which the file looks like this:

<IfModule !mod_jk.c>
LoadModule jk_module modules/mod_jk.so
</IfModule>

<IfModule mod_jk.c>
JkWorkersFile "D:/xampp/tomcat/conf/workers.properties"
JkLogFile "D:/xampp/tomcat/logs/mod_jk.log"
JkLogLevel info
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# Alias /examples "D:/xampp/tomcat/webapps/examples"

#<Directory "D:/xampp/tomcat/webapps/examples">
# Options All
# </Directory>

JkMount /*.jsp ajp13
JkMount /examples/* ajp13

#<VirtualHost 127.0.0.1:80>
# DocumentRoot D:/xampp/tomcat/webapps/examples
# ServerName test
# JkMount /*.jsp ajp13
# JkMount /servlet/* ajp13
# Alias /examples "D:/xampp/tomcat/webapps/examples"

# <Directory "D:/xampp/tomcat/webapps/examples/">
# Options All
# Order allow,deny
# Allow from all
# </Directory>
# </VirtualHost>
</IfModule>



Izzy wrote:I have Tomcat installed 'out of the box' and running with no problems at all once I made sure I had the correct JDK installed as per the readme file. Did you get any errors when installing?


I followed the instructions to the very end and never got any errors. Initially I was having issues with Tomcat not starting up but I fixed that. I don't think though overall that the issue is with Tomcat at all because I know it works by itself but I think the problem lies within Apache not forwarding the requests to tomcat if I need them, while still retaining the port 80.


===========================================
1. The new DeskTopXampp launch control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Make Richer Ajax Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================[/quote]
confused2gether
 
Posts: 17
Joined: 29. October 2007 15:48

Postby Izzy » 30. October 2007 14:29

In the xampp\apache\conf\httpd.conf file round about line 519 is there an entry like this with an include path underneath it?
# Java Tomcat

What is the include path and file name and is the include path uncommented?


===========================================
1. The new DeskTopXampp launch control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Make Richer Ajax Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby confused2gether » 30. October 2007 14:36

Izzy wrote:In the xampp\apache\conf\httpd.conf file round about line 519 is there an entry like this with an include path underneath it?
# Java Tomcat

What is the include path and file name and is the include path uncommented?


No I do not have line that looks like that. The only thing pertaining to Java that is near that line is line 522 which is the following

Code: Select all
Include conf/extra/mod_jk.conf


I'm guessing that links to the mod_jk.conf file which may be what you are asking to look at which that config file looks like this:

Code: Select all
<IfModule !mod_jk.c>
    LoadModule jk_module modules/mod_jk.so
</IfModule>

<IfModule mod_jk.c>
JkWorkersFile "D:/xampp/tomcat/conf/workers.properties"
JkLogFile "D:/xampp/tomcat/logs/mod_jk.log"
JkLogLevel info
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# Alias /examples "D:/xampp/tomcat/webapps/examples"

#<Directory "D:/xampp/tomcat/webapps/examples">
#       Options All
#   </Directory>

JkMount /*.jsp ajp13
JkMount /examples/* ajp13

#<VirtualHost 127.0.0.1:80>
#  DocumentRoot D:/xampp/tomcat/webapps/examples
#  ServerName test
#  JkMount /*.jsp ajp13
#  JkMount /servlet/* ajp13
#  Alias /examples "D:/xampp/tomcat/webapps/examples"

 #  <Directory "D:/xampp/tomcat/webapps/examples/">
 #       Options All
 #       Order allow,deny
 #       Allow from all
 #   </Directory>
# </VirtualHost>
</IfModule>
confused2gether
 
Posts: 17
Joined: 29. October 2007 15:48

Postby Izzy » 30. October 2007 15:16

That conf file is fine, IIRC I renamed that file for my own purposes some time back but the content is the same.

I did notice this in the error log that seems to be your problem:
File does not exist: D:/xampp/htdocs/examples and the others that are similar, referring to this path.

You seem to have a path anomaly somewhere.

Can you check your DocumentRoot in the httpd.conf file?

Did you run the setup_xampp.bat when installing XAMPP and again after installing TomCat to set the paths?


===========================================
1. The new DeskTopXampp launch control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Make Richer Ajax Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby confused2gether » 30. October 2007 15:44

Izzy wrote:That conf file is fine, IIRC I renamed that file for my own purposes some time back but the content is the same.

I did notice this in the error log that seems to be your problem:
File does not exist: D:/xampp/htdocs/examples and the others that are similar, referring to this path.

You seem to have a path anomaly somewhere.

Can you check your DocumentRoot in the httpd.conf file?

Did you run the setup_xampp.bat when installing XAMPP and again after installing TomCat to set the paths?


I used the installer version of XAMPP for the initial installation and I was under the impression that I only had to run setup_xampp.bat if I was using the zipped version. But I havent run that file after doing the Tomcat addon installation either so let me try that and see if that may take care of it.
confused2gether
 
Posts: 17
Joined: 29. October 2007 15:48

Postby confused2gether » 30. October 2007 15:49

I ran the setup_XAMPP.bat file and selected 5 so that it has MOD-JDK support and it still hasnt fixed the issue.

I still get the following error:
Code: Select all
[Tue Oct 30 10:48:17 2007] [error] [client 127.0.0.1] File does not exist: D:/xampp/htdocs/examples, referer: http://localhost/xampp/java-example.php


But I can still go to port 8080 with that same exact address and it comes up just fine. Still seems that apache isnt forwarding the request somewhere to port 8080 to use the servlet.
confused2gether
 
Posts: 17
Joined: 29. October 2007 15:48

Postby Izzy » 30. October 2007 15:52

Try restarting Apache then try again.


===========================================
1. The new DeskTopXampp launch control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Make Richer Ajax Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby confused2gether » 30. October 2007 16:05

Ok well those links finally do work now. But now I am half way there because my site still seems to not work with forwarding the jsp request to tomcat.

I have a program located in the htdocs folder called jForum and you have to run http://localhost/jForum/install.jsp for the first run and when i try to run it, it will not work and I get the following error in the web browser:

Code: Select all
HTTP Status 404 - /jforum/install.jsp

type Status report

message /jforum/install.jsp

description The requested resource (/jforum/install.jsp) is not available.
Apache Tomcat/6.0.13


but of course, if I put that exact file into Tomcat's webapp folder and run it under localhost:8080/jforum/install.jsp, it runs fine. Is there any other directory mappings that I need to run?
confused2gether
 
Posts: 17
Joined: 29. October 2007 15:48

Postby Izzy » 30. October 2007 16:34

The clue is in the xampp\readme-addon-tomcat.txt file.

Put the jForum directory in the webapps directory and call it without the :8080

http://localhost/jForum/install.jsp

Java bits and bobs go in there not in the htdocs directory as they are now handled by TomCat not Apache.

Apache only needs to know where TomCat is to do the parsing of the Java code - you fixed that by setting the paths with the bat file.


===========================================
1. The new DeskTopXampp launch control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Make Richer Ajax Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby confused2gether » 30. October 2007 16:44

It now loads up that page but it will only read that file and it will not display any pictures associated with it and when I proceed to another page it errors out saying that it doesnt exist which it does though. What it seems to be doing is now its only looking at that one jsp file and thats it.
confused2gether
 
Posts: 17
Joined: 29. October 2007 15:48

Postby confused2gether » 30. October 2007 16:52

ok well i went back and I made a copy in both the htdocs & the webapps folder of all of the files and the front install page now shows up correctly but once i click next to progress to the next page, it dies with a 404 error, which may or may not be apaches fault but i know it works. ill fool around with it for a bit and see if there is anything different i should be doing.
confused2gether
 
Posts: 17
Joined: 29. October 2007 15:48

Postby Izzy » 30. October 2007 16:54

I am having a break now as it is 2 am here and as soon as I get time tomorrow I will download the jForum and see what makes it tick on my XAMPP installation.

I will get a better idea of what is happening when I get my hands on it - very hard to try and imagine what's actually happening without seeing it live.


===========================================
1. The new DeskTopXampp launch control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Make Richer Ajax Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby confused2gether » 30. October 2007 17:00

thank you so much once again for all of your help.

To get jForum, go to here:

http://jforum.net/download.jsp

and at the bottom of the page, download the ZIP package.

From there you extract the zip package into the web directory and then you use MySQL and create a blank new database called jforum. Once you do that, go to your browser and do:

http://localhost/jforum/install.jsp

follow the prompts and it should install, but I never get past the first page with XAMPP but I do if I use Tomcat only. Also, I extracted the files only into the webapps folder and only text showed up for the install page, but as soon as I extracted another copy into the htdocs, the pictures and CSS styles showed back up on that homepage but I still couldnt go anywhere with it past that first page.
confused2gether
 
Posts: 17
Joined: 29. October 2007 15:48

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 76 guests