• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

Can't Get Tomcat 4.1.18 running

 
Bartender
Posts: 1815
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I tried a "quick" upgrade from Tomcat 4.0.4 to 4.1.18, but have had nothing but problems.
I tried to install 4.1.18 as a Windows service (Windows 2K) and the basic JSP came up. However, my servlets were "unavailable" (404 error) eventhough the paths matched the old 4.0.4 installation where all worked.
The documentation is so sparse, I'm not sure what's wrong.
For example, when you install Tomcat as a Windows service, do you still need to set the environment variables like CATALINA_HOME and JAVA_HOME. I have both these set, but now it now doesn't work at all -- even with the index.jsp file.
I'm not sure what I did to screw it up, but something is definitely wrong here.
Anybody run into this issue?
Thanks in advance.
-- Mike.
 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I went through the similar situation not too long ago. Although this thread:
https://coderanch.com/t/82355/Tomcat/Installing-Tomcat-Windows
is regarding the tomcat 4.1.17 installation; nonetheless, I eventually got 4.1.18 installed following the same procedure.
You may write to me if the aforementitoned thread does not help.
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok this might seem far too obvious, but I'll admit that *I* made this mistake...

Is CATALINA_HOME pointing to your old version's install ?
 
Mike London
Bartender
Posts: 1815
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I re-installed Tomcat 4.1.18 again this morning and now have the original problem. Note that the same setup worked fine under 4.0.4.
The problem that remains is getting the servlets to work.
================================
I changed CATALINA_HOME to C:\Program Files\Apache\Tomcat 4.1 (to match the directory structure).
JAVA_HOME Points to C:\J2sdk1.4.1
================================
Here are some problem details:
When I do a http://localhost:8081/hello.jsp, all works fine.

(I changed the port to 8081 because of some conflict with 8080)
-----------------------
When I try to do a JSP page in a directory under root, all works fine too. Something like:
http://localhost:8081/webcalendar/Login.jsp
-----------------------
The problem comes in when this JSP tries to transfer control to a servlet, like it did successfully under 4.0.4. The URL that appears from the JSP code is:
http://localhost:8081/servlet/webcalendar.Controller
But here I get a 404 error -- "The requested resource (/servlet/webcalendar.Controller) is not available."
This "Controller.class" file is under WEB-INF\classes\webcalendar, so it should be found (like it was under 4.0.4).
Additionally, I can't run any other servlets either. It's like Tomcat can't find them eventhough they're in the same directory path (relative to the 4.1.18 installation as with the 4.0.4 installation).
This is quite strange and doesn't seem to match any threads posted.
Any ideas???
Thanks again for all the help up to this point.

-- Mike
 
Mike London
Bartender
Posts: 1815
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do I need to have a web.xml entry for the servlet to work under Tomcat 4.1.18?
I didn't have a web.xml under Tomcat 4.0.4, but perhaps 4.1.18 is more picky?
The problem is that I can't run a servlet like this (from a form action clause):
http://localhost:8081/servlet/webcalendar.Controller
when the Controller.class is in the directory:
C:\Program Files\Apache\Tomcat 4.1\webapps\ROOT\WEB-INF\classes\webcalendar
Same directory set up that worked under 4.0.4.
Thanks in advance for any help.
(JSP files work fine)
-- Mike
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's because as of 4.1.12, the /servlet mapping has been removed by default.

It is a security risk to use this type of dynamic non-aliased invocation.

To make it all work the way it did, you *can* enable the default mapping. I don't have an install on this system, but I think it's in the web.xml under conf.

It *is* buried in the Tomcat docs, btw. Search the readme for /servlet
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic