LinuxQuestions.org
Help answer threads with 0 replies.
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 04-18-2006, 11:04 PM   #1
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Rep: Reputation: 30
Tomcat + Apache work 2gether on FC5


Hello,

I was wondering if anybody can tell if this is a good walk through for the task.
http://tomcat.apache.org/tomcat-3.2-...operation_need

Thanks.
 
Old 04-19-2006, 01:48 PM   #2
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
any help/ideas/suggestions?

Thnaks!
 
Old 04-19-2006, 03:29 PM   #3
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
What is "the task"? Are you in need of a J2EE server? Are you asking if it's better to run Tomcat standalone or with a web server front-end (Apache, IIS, whatever)? What questions do you have?

Peace...
 
Old 04-19-2006, 04:19 PM   #4
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
Hello,

I have jsp pages and servlets along with them.
As I understand Fedora's server - Apache can serve only static pages such as html.
I have read that to run jsp with servlets i.e. Java I need to have Tomcat integrated together with Apache.
Originally I developed everything using Tomcan and WinXP platform.
Now, I loaded everything onto Fedora Core 5 and it is not working because Tomcat is not there.

I am not sure what the best solution is. I do not know if I can run Tomcat without Apache or if I have to run the together.
I have seen that many people say about intergration that I have mentioned but it is poorely documented.
So if anyone has experience doing that I'd appreciate if you could share it with me and rest of us who are challenged with the same task.

Thanks in advance.
 
Old 04-19-2006, 04:28 PM   #5
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Thanks for the background. The short answer is: you can either run Tomcat standalone, meaning it will serve its own HTTP requests, or you can connect it with your existing Apache web server.

I've done both to test various configurations in preparation of supporting a webapp the company I work for developed.

I would suggest running Tomcat standalone first, to get your JSP and servlets running. Then you can easily configure "mod_jk" (do a Google search on that and on "mod_jk2") to connect your existing Apache web server to Tomcat.

The Tomcat documentation should instruct you on getting Tomcat up standalone and your research on mod_jk should lead to doc to help you get that running. I also suggest reading the Tomcat mailing list archives since there is extensive discussion there on the pros and cons of running Tomcat standalone vs connected to a web server front-end.

Good luck!

Peace...
 
Old 04-19-2006, 08:02 PM   #6
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
Thanks for the input!
From your point of view what do you think is better - run Tomcat standalone or connect it to Apache?
Do you have a concrete info such as a guide how to configure Tomcat standalone?

Thank you.
 
Old 04-19-2006, 08:12 PM   #7
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by thisObject
Thanks for the input!
From your point of view what do you think is better - run Tomcat standalone or connect it to Apache?
"better" is a subjective term.

About how many users do you plan to serve? Will the content being served be primarily static (HTML files, etc) or dynamic (JSP or other content generated by servlets)? The way you access Tomcat from the browser would be the same.

I would start out usnig Tomcat in standalone mode and see how that works out, then you can decide if you need or prefer to use Apache as your front-end.

Quote:
Do you have a concrete info such as a guide how to configure Tomcat standalone?
Again, the Tomcat doc is straightforward and should answer your questions. You edit a file or two and fire it up and deploy your webapp.

The Tomcat mailing list has TONS of great info.

Peace...
 
Old 04-19-2006, 08:52 PM   #8
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
Thanks!

I'll try it out and see how it goes.
 
Old 04-19-2006, 09:51 PM   #9
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Sounds good. May the Force be with You and don't forget your towel.

Peace...
 
Old 04-20-2006, 01:08 AM   #10
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
http://tomcat.apache.org/tomcat-5.5-doc/setup.html

where should I put tomcat folder? should it be in /home/mylogin/public_html?

thanks!
 
Old 04-20-2006, 01:14 AM   #11
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
You could but you can install it whereever you like. Read this to get info on "Directories and Files". Tomcat is the server, so you install it where you want the server to live. Have you read on mod_jk or mod_jk2 at all? You use the mod_jk(2) connector to connect Apache to Tomcat, so your Tomcat installation isn't related to Apache at all. Stick Tomcat where you would install a server and go from there.

EDIT: Also, be sure to read the RUNNING.txt file, as referenced in the Setup doc you linked to.

Peace...

Last edited by tomdkat; 04-20-2006 at 01:15 AM.
 
Old 04-20-2006, 01:20 AM   #12
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
cool,

I went through it and no error messages! AMAZING
so how do I run my jsp pages now? I should put them in webapps folder but how would I access them through my domain name? Let's say I have a jsp page that I want to access like this
http://www.mydomain.net
Now I have a dummy html page sitting in /home/mylogin/public_html folder
how do I link this up?
I know that Tomcat can be anywhere the thing is that I want to have jsp pages in public_html folder in order to access them using above url.

Thanks!
 
Old 04-20-2006, 01:37 AM   #13
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
now when I type http://localhost:8080 it redirects me to http://p2p.cs.mu.oz.au/software/Localhost/
?
 
Old 04-20-2006, 01:41 AM   #14
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
You will need to check your local hosts file (/etc/hosts) to see if localhost is actually defined. A quick and dirty test:

$ ping localhost

If you do not get replies from 127.0.0.1, localhost isn't defined. Also, make sure your browser isn't using a proxy server.

You can also test Tomcat by pointing your browser at: http://127.0.0.1:8080

As for deploying JSP pages, why ask me when you can read the JSP howto.

Let me know if your localhost:8080 test works. If it does, you're on your way.

EDIT: Here is the index of the Tomcat FAQ.

Peace...

Last edited by tomdkat; 04-20-2006 at 01:42 AM.
 
Old 04-20-2006, 01:54 AM   #15
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
Here is what I have:

1. ping localhost -> ping: unknown host localhost
2. http://127.0.0.1:8080 works fine. I see Tomcat default page

my /etc/hosts file:
127.0.0.1 localhost.localdomain www.mydomain.net
71.142.79.209 mydomain.net mydomain

Thanks for your help
 
  


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
Running jsps in user home directory doesn't work (Apache Tomcat and mod_userdir) jimieee Linux - Networking 0 03-23-2005 10:12 AM
how to get apache and tomcat work together chinaundead Programming 7 12-06-2004 10:33 PM
Tomcat 5.5.1 and Apache 2 kpmaddenuk Linux - Software 2 10-30-2004 05:55 AM
Why use Apache with Tomcat rather than just Tomcat itself? davee Linux - Software 1 08-21-2003 09:47 PM
Apache,Tomcat prowzen Linux - Software 0 05-09-2001 06:23 PM

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

All times are GMT -5. The time now is 05:13 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