Creating a WAR file


This might not be in the correct section - unsure whether to put with the java stuff....

I have a static html site that needs to be deployed to an Oracle 9IAS (don't ask why) - I have downloaded all the files (and directory structure) from the windows server and would now like to package them up into a WAR file so I can deploy them.

What is the best way to do this?  They are just .html files and .jpg files - no .jsp, .java files at all.  Is there a tool I can use?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

what type of installtion is it? Oracle9iAS java edition or SE or EE or just OC4J standalone?
go to the folder where u have all the files and directory structure and you can just use
jar -cvf yourwebapp.war .

then if it is Oracle 9iAS you can use the EM application to deploy the war file.

Jackass03Author Commented:

I plan to deploy the war file using the Enterprise Manager Console....

How can I do - jar -cvf yourwebapp.war . ?

I'm on a win 2000 machine with new java stuff installed.....

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

if u r on windows u can just Zip ur Html files directory which should look like this:

-----> html files
-----> WEB-INF\web.xml

and rename the Zipped file to .war
Jackass03Author Commented:
Thanks for the quick response!

my directory is currently:

---->html files

There is no WEB-INF\web.xml - do I need to create this folder and file?  What should I put in web.xml?

ur web.xml will probably look like this:

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "">
<web-app id="WebApp">
just a little corretion:
>> <web-app id="WebApp">

to just be:
Jackass03Author Commented:

Thanks for all your help....

I have zipped up my root (which includes the WEB-INF folder with my other folders) and renamed as a .war extension.  In total its 19mb

I have then logged onto the Enterprise Manager Console and created a new OC4J instance and tried to deploy the WAR file.  I put the following in for App Name - web and '/web' for Map to URL.  It seems to load for a few mins and then goes to a page cannot be displayed error - maybe its timing out?

Any ideas?
asume the ORacle 9ias instance directory is on:
and assuming the OC4j instance u created called MyOC4J,
go to c:\oracle9iASInstance\dcm\bin

run a command like this:

dcmctl deployApplication -file pathToMyWar -a aName -co myOC4J -rc /web
after the commands run without error numbers then to check ur successfull deployment u can run:

dcmctl listApplications -co MyOC4J

u should see ur application listed, now try it from ur browser


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jackass03Author Commented:
All sorted - was a problem at my end with the file getting scanned when uploaded.

Had that resolved and it deployed via EMC in around 20 mins

Many thanks to petmagdy - you've been a star!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.