Solved

Help!  Tomcat Error message - environment variables

Posted on 2003-11-07
5
1,053 Views
Last Modified: 2012-05-04
Help!  I'm a microsoft girl and I'm not very familiar with this stuff!  I'm trying to get tomcat running on my IIS 5/Windows 2000 server.  The files for this were written by someone else and  have been moved from another server, where they were working, so I'm inclined to believe the code is just fine -- unless something changed in the folder structure or elsewhere between versions -- I notice servlet.jar seems to be missing and instead there is servlet-api.jar.

The version on the old server was 4.1.12 -- though I've tried reverting to the old version on the new server and still get the same error message.  I think it is something very basic -- env vars that I haven't set -- but I'm not sure what they should be.

I ran j2sdk-1_4_2_01-windows-i586-iftw.exe and then jakarta-tomcat-5.0.12.exe.

Unfortunately, something strange happened and I thought this worked the first time (maybe somehow it was still pointing at the old server, I don't know) so I thought it was working and let the old server get re-installed, so I don't have the old environment variables to compare.  =/

Can you clear this up for me?  What env vars do I have to set?  CATALINA_HOME?  JAVA_HOME?  Anything else?  What should I point classpath/path to?

Here's another question -- do I have to put the whole jar file and everything in the env vars, or can I just point them to the folder?  And, does tomcat care about a / on the end in the env vars?  (JAVA_HOME = c:\j2sdk1.4.2_01 or c:\j2sdk1.4.2_01\ ?)

Also -- the hello world examples ARE working.  The author of the code has a folder for mypackagename and it seems its the files in there having issues -- like the package thing might be causing problems??

Anyways, let me know if I can answer any more questions, I appreciate all your help since this is not my area of specialty.  Here is the error message I get.  (Jeez, I hope it's something simple...)


HTTP Status 404 - /mywebname/servlet/mypackagename.myfile
--------------------------------------------------------------------------------
type Status report
message /mywebname/servlet/mypackagename.myfile
description The requested resource (/mywebname/servlet/mypackagename.myfile) is not available.
0
Comment
Question by:kataragon
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:rootkiddy
ID: 9712418
It sounds like your problem isn't related to environment variables at all unless somone originally customized CATALINA_HOME before to point to another location for applications.  You may ask around to see if this might be the case.  By the 404 status code it isn't able to find this on the server.  Can you provide overview of directory structure where you deployed application and general location of tomcat installation (don't need everyfile just initial directory)?  Have you changed any configuration files in tomcat other than the configuration file within your application?
0
 

Author Comment

by:kataragon
ID: 9722899
C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\mywebname\
 
contains the following folders:

images
WEB-INF
jsp
servlets

The package and class files are located here:

WEB-INF\classes\mypackagename\myfile.java and myfile.class

As I recall, you don't put java files in logical locations -- so on the web, it is looking for /mywebname/servlet/mypackagename.myfile and that translates to some other location that apparently used to be WEB-INF\classes\mypackagename\myfile.java and myfile.class.

This code used to work -- the only thing that I can think of that could have changed was environment variables.  Is the location of this file correct??  Any suggestions are appreciated!
0
 
LVL 2

Accepted Solution

by:
rootkiddy earned 250 total points
ID: 9728228
Assuming no modifications have occured to the configuration files of tomcat then directory structure looks fine.  What does your web.xml file look like pertaining to this servlet?  I'm looking for how you have it registered along with the URL mapping.  Basically I'm looking at whether or not there is a mapping such that you can access this via /mywebname/servlet/mypackagename.myfile as this takes modification to web.xml to make that work.
0
 

Author Comment

by:kataragon
ID: 9733755
Hmm, I suppose that could be the problem also because I haven't done anthing to it.  =)  

I thought that was what the invoker did -- if you didn't specify a web.xml file in the mywebname folder, it would use the generic and automatically add the correct mapping for it -- I don't remember adding a mapping on the old server, and wasn't a big fan of doing that every time this guy wanted to add a new folder...   So, I just have the default web.xml in the conf folder.

I apologize for being so dumb about this stuff =)  I haven't made any mods -- I'm trying to use a very vanilla installation.

TIA...
0
 

Author Comment

by:kataragon
ID: 9733874
Oh, yay, I think I figured it out.  To make the invoker thing work, you have to uncomment two sections in that web.xml file.  Thank you!!!  
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now