?
Solved

Creating a WAR file

Posted on 2004-11-04
10
Medium Priority
?
1,076 Views
Last Modified: 2013-12-01
Hi

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?

Thanks
0
Comment
Question by:Jackass03
  • 5
  • 4
10 Comments
 
LVL 13

Expert Comment

by:petmagdy
ID: 12495547
what type of installtion is it? Oracle9iAS java edition or SE or EE or just OC4J standalone?
0
 
LVL 8

Expert Comment

by:kiranhk
ID: 12498986
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.

0
 

Author Comment

by:Jackass03
ID: 12502147
Hi

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.....

Thanks
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 13

Expert Comment

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

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

and rename the Zipped file to .war
0
 

Author Comment

by:Jackass03
ID: 12502282
Thanks for the quick response!

my directory is currently:

root
---->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?

Thanks
0
 
LVL 13

Expert Comment

by:petmagdy
ID: 12502310
ur web.xml will probably look like this:

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="WebApp">
      <display-name>AnyName</display-name>
      <welcome-file-list>
            <welcome-file>index.html</welcome-file>
            <welcome-file>index.htm</welcome-file>
            <welcome-file>default.html</welcome-file>
            <welcome-file>default.htm</welcome-file>
      </welcome-file-list>
</web-app>
0
 
LVL 13

Expert Comment

by:petmagdy
ID: 12502317
just a little corretion:
>> <web-app id="WebApp">

to just be:
<web-app>
0
 

Author Comment

by:Jackass03
ID: 12502449
Hi

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?
0
 
LVL 13

Accepted Solution

by:
petmagdy earned 200 total points
ID: 12502498
asume the ORacle 9ias instance directory is on:
c:\oracle9iASInstance
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

0
 

Author Comment

by:Jackass03
ID: 12545321
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!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses
Course of the Month15 days, 7 hours left to enroll

840 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