Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Help!  Tomcat Error message - environment variables

Posted on 2003-11-07
5
1,061 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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Magento error 9 75
htaccess file errors for 301 Redirect 4 88
.htaccess rewrite rule to 301 redirect canonical versions of homepage to root 4 111
Virtual host in apache 31 102
As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

829 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