LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-07-2004, 05:21 AM   #1
aSimpleTux
LQ Newbie
 
Registered: Sep 2004
Posts: 1

Rep: Reputation: 0
Suse 9.1 - Can't get Tomcat work


Hi Everybody!
I have a problem with Tomcat and Suse 9.1. I'm searching since 2 days in the web but can't find an answer. Hope somebody can help me here!

I installed with yast2 apache, php, tomcat (with connector) and all the stuff for a webserver. PHP is working fine, but i can't get jsp work with my apache.
I startet tomcat after installation with rctomcat start and "netstat -tpan | grep 80" says that it is running. But when i want to run a jsp file in htdocs (localhost) it is shown as a simple text file without compiling it! I don't know if htdocs is the right directory for jsp but i think it should.
I also tried port 8080 (firewall is configured) but nothing...
Does someone know what to do? Is htdocs the right place?
Would be very happy for any help!!!
 
Old 09-27-2004, 11:11 PM   #2
jandersen78
LQ Newbie
 
Registered: Sep 2004
Location: Provo, UT
Distribution: Fedora Core 2
Posts: 15

Rep: Reputation: 0
It sounds like the JK connector isn't configured correctly. If you have the jsps in your htdocs directory and apache isn't configured to send those requests to tomcat (through the jk connector) you'll see that unparsed jsp code. Tomcat, even on port 8080 probably won't see this file because it's root directory by default isn't htdocs but rather its own webapps directory.

I haven't worked with SUSE but I just set up Apache, JK, and tomcat on a debian box with Apache1.3 (having done this previously on fedora with Apache 2) and there was a fair bit more to do beyond simply downloading the required packages.

Here's basically what I had left to do :

* create a conf file that is included in httpd.conf with these contents (adapted to your install):

Load mod_jk module
LoadModule jk_module /usr/lib/apache/1.3/mod_jk.so
# Declare the module for <IfModule directive>
AddModule mod_jk.c
# Where to find workers.properties
JkWorkersFile /etc/libapache-mod-jk/workers.properties
# Where to put jk logs
JkLogFile /var/log/apache/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
# Send servlet for context /examples to worker named worker1
JkMount /examples/servlet/* local
# Send JSPs for context /examples to worker named worker1
JkMount /examples/*.jsp local
# Special directive provided by mod_jk that tells Apache to
# forward requests (maybe only JSP requests, I'm not sure) in
# these directories to Tomcat.ajp13 is the protocol used to
# talk to Tomcat.
JkMount /struts-examples/* local

* modify the workers.properties referenced above to create a worker called local as in the following:

# Tomcat and Java configuration
#
workers.tomcat_home=/usr/share/tomcat4
workers.java_home=/usr/lib/j2se/1.4
ps=/
worker.list=local
# Definition for local worker using AJP 1.3
#
worker.local.type=ajp13
worker.local.host=localhost
worker.local.port=8009

* check /etc/tomcat4/server.xml and make sure the ajp13 connector is uncommented
* run apachectl configtest and make sure it looks ok
* restart tomcat first so apache will be able to bind to the process: /etc/init.d/tomcat4 restart
* restart apache: apachectl restart
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
installing java (trying to get tomcat to work) twistedrhymes Linux - Software 1 07-03-2005 12:00 PM
tomcat on suse 9.3 - admin tool does not work; it shows a blank page nicolasdiogo Linux - Networking 3 06-14-2005 02:15 AM
how to get apache and tomcat work together chinaundead Programming 7 12-06-2004 10:33 PM
Getting MySQL to work with Tomcat Travis86 Linux - Software 3 07-14-2004 11:18 PM
JDBC with Tomcat and DB2 just won't work. proto_frosty Linux - Enterprise 0 06-28-2004 07:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration