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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
04-19-2006, 01:48 PM
|
#2
|
Member
Registered: Apr 2006
Posts: 170
Original Poster
Rep:
|
any help/ideas/suggestions?
Thnaks!
|
|
|
04-19-2006, 03:29 PM
|
#3
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
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...
|
|
|
04-19-2006, 04:19 PM
|
#4
|
Member
Registered: Apr 2006
Posts: 170
Original Poster
Rep:
|
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.
|
|
|
04-19-2006, 04:28 PM
|
#5
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
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...
|
|
|
04-19-2006, 08:02 PM
|
#6
|
Member
Registered: Apr 2006
Posts: 170
Original Poster
Rep:
|
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.
|
|
|
04-19-2006, 08:12 PM
|
#7
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
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...
|
|
|
04-19-2006, 08:52 PM
|
#8
|
Member
Registered: Apr 2006
Posts: 170
Original Poster
Rep:
|
Thanks!
I'll try it out and see how it goes.
|
|
|
04-19-2006, 09:51 PM
|
#9
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
Sounds good. May the Force be with You and don't forget your towel.
Peace...
|
|
|
04-20-2006, 01:14 AM
|
#11
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
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.
|
|
|
04-20-2006, 01:20 AM
|
#12
|
Member
Registered: Apr 2006
Posts: 170
Original Poster
Rep:
|
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!
|
|
|
04-20-2006, 01:37 AM
|
#13
|
Member
Registered: Apr 2006
Posts: 170
Original Poster
Rep:
|
|
|
|
04-20-2006, 01:41 AM
|
#14
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
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.
|
|
|
04-20-2006, 01:54 AM
|
#15
|
Member
Registered: Apr 2006
Posts: 170
Original Poster
Rep:
|
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 
|
|
|
All times are GMT -5. The time now is 11:53 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|