Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WEb application deployment: tomcat 5.5.7

Status
Not open for further replies.

ejmelious

Programmer
May 24, 2005
5
US
I am attemtping to deploy a new web application in tomcat. Everything I do is wrong somehow. I have worked on this for hours now and I need help: This is my file heirarchy.
wamps/Tomcat5.5/webapps/bluegrass. Bluegrass is the name of the application. Inside bluegrass I have two jsp files stored (so far) and then a WEB-INF file. Inside WEB-INF I have my web.xml descriptor, my classes folder with one class, and a lib folder. I believe I have everything set up properly. When I go to deploy my new application I read the how to docs and it said to do this: ...config=file:/path/context.xml...I tried numerous inputs into the path area and nothing worked...

Any suggestions?
 
If your application is already in "webapps" (like it is), then it is already "deployed".

I don't bother with all that context.xml stuff - can't really see the point. I just create a .war file, then dump it in the webapps directory.

--------------------------------------------------
Free Database Connection Pooling Software
 
And how would I go about making a WAR file, I have read a little about them, but I am still unsure. I have one java servlet (class file) that runs everything and 6 jsp pages that are shoot offs of the servlet. They are all in my root folder or WEB-INF classes folder. If I store them in a war I dont have to do anything else? Where do I store the war file? My guess is in webapps.

Thanks
 
For building projects I use ant - so you have an arbitrary structure - probably containing your jsps, java code, images, web.xml etc - whatever structure works for you - and then use an to compile your code, and build a war file - which you then copy into your webapps directory - or even use ant to deploy it for you (though I don't personally bother with that).

It just separates your actual build area from your deployment area.

You can of course just use the "jar" tool to create a war file if your build area is in the directory structure that tomcat requires, by cd'ing to your particular dir and typing :

jar -cvf MyWepApp.war *



--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top