tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Brewer" <j...@3brewers.org>
Subject Expanding WAR file in "home" directory
Date Sat, 26 Nov 2005 03:39:39 GMT
This is probably too basic a question to ask here, and it is definitely a long question because
I feel it needs a lot of explaination so I beg your forgiveness in advance and advise you
to please just skip it if you have no tolerance for new users with stupid questions. I have
spent most of my free time the past three days trying to find an answer and am on the verge
of despair and I've avoided coming to your wonderful forum until I reached the point where
there was simply no other hope. If you can't help me I've got to just quit and get on with
building the website with or without WAR files so that I get the thing built at all. 

I have a tomcat website from a reputable host (godaddy.com). When I FTP into it I arrive at
the "home" directory. I can create sub-directories and navigate "down" from the "home" directory,
but I can't navigate upwards. If I upload an index.html file into this directory then open
a browser and go to www.mydomain.com it returns the index.html file. I've up loaded a JSF
"project" to the site and it all works fine.

I have never used WAR files before, but would like to try. I'm using a product called MyEclipse
to create my web files and "build" my WAR file.

When I create a WAR file containing my index.html page (and my test JSF "project" pages and
classes and xml files) then upload that WAR file to my server and wait for a few minutes my
WAR file is expanded into a new sub-directory with the same name as my WAR file, which we'll
call "mywarfile" for the sake of the example. When I open my browser and go to www.mydomain.com
there is nothing there becuase my index.html file now exists in a subdirectory called mywarfile.
If I go to www.mydomain.com/mywarfile I can see my index.html page. 

It seems to me that I want my WAR file to expand into the "home" directory, so that my index.html
file ends up at www.mydomain.com/index.html and not at www.mydomain.com/mywarfile/index.html.
But there doesn't seem to be any way to do this and every time I bring the question up everyone
tends to treat me like a crazy uncle at Thanksgiving dinner. 

So I'm pretty sure I am not understanding something very fundamental about WAR files that
everyone else seems to understand. 

Is it appropriate, common, good practice to package all of one's web files (for a small website)
up into a WAR file and deploy it to one's server? If so, how do people get their index files
and other "home"-directory-level files to expand into their "home" directories (i.e. the same
directory into which they upload their WAR files)?

Or are WAR files just used for smaller pieces of one's website? For example if I had a homepage
and an "about us" page and a "contact us" page all in the "home" directory and then a blog
applicaiton in a sub-directory and a photo album in another sub-directory, would it be a standard/common
practice to just upload the "home"-level pages up to the server individually and use the WAR
files for only the blog and photo album.

Thanks in advance to any who stuck it out this far and still have any patience left to help
out this pathetic ex ASP developer in search of a worthier medium.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message