This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Is tomcat necessary? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Is tomcat necessary?" Watch "Is tomcat necessary?" New topic
Author

Is tomcat necessary?

Jason Kwok
Ranch Hand

Joined: Mar 31, 2005
Posts: 126
I'm still rather new to writing servlets and creating websites, and so far every web application I've made in Java and JSP run on stand-alone tomcat. In short, it was never available on the internet, just my own pc.

Now I've written a small web app that is going on a real server running Microsoft IIS 6.0 I believe. I've already uploaded my servlets and jsp files into the current directory where the existing website already resides.

My problem is that the jsp pages and servlets aren't recognised and cannot be used for some reason. I then installed tomcat, placed my web app in the web app folder and pointed the server to publish content coming out of my web app folder and still no results.

Any suggestions to help solve this problem would be very greatly appreciated!!
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3712
    
    5

Microsoft IIS does not support jsps natively. Its a completely different technology and Microsoft would prefer you use ASP (competition to JSP). The best you can do is have IIS pass through via a Tomcat connection bridge where IIS handles regular web pages and Tomcat is running but only handles JSP/servlets.

There's a number of online tutorials on how to set this type of bridge up. I'd recommend though you use Apache instead of IIS (if possible) since that is more compatible with Tomcat.


My Blog: Down Home Country Coding with Scott Selikoff
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61457
    
  67

Or save yourself a load of headaches and just use Tomcat. It's just as good at serving static resources as it is dynamic ones.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jason Kwok
Ranch Hand

Joined: Mar 31, 2005
Posts: 126
Thank you both for the quick responses!! My web app is running on my university's server and they have installed IIS 6.0. Being so new and inexperienced with all of this, I believed the system admin when he told me it should be no problem running the servlets and jsp on the current server.

to Scott: Is there somewhere you can direct me to find a tomcat connection bridge tutorial? I searched this forum quickly and found no appropriate results.

to Bear: I have tomcat version 4.1... would I need 5.5 to allow it to serve online as opposed to just my pc? Or is 4.1 ok and I'm just missing out on how to use this functionality? So far, I just start tomcat and then run my servlets through http://localhost:8080/myWebApp.

Again, your help is greatly appreciated guys!!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61457
    
  67

Either of Tomcat 4 or 5 works just fine.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

http://tomcat.apache.org/faq/connectors.html


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Jason Kwok
Ranch Hand

Joined: Mar 31, 2005
Posts: 126
Thanks again guys for all your help, I'll read up more on tomcat!!
 
 
subject: Is tomcat necessary?