• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to create .war file

 
nishant vaishnaw
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as our old unix server is migration into new unix version and , we need to create the war file in order to get deployed into IBM websphare.
In existing system their is no war file .
please guide the command to generat the war for below file system:
$ cd /apps/ntac/untfrontend5.6.6
$ ls -ltr
total 10
drwxrwxr-x 2 ntac ntac 512 May 25 2007 properties
drwxrwxr-x 7 ntac ntac 512 Jul 10 2007 web
drwxrwxr-x 2 ntac ntac 512 Jul 17 2007 lib
drwxrwxr-x 2 ntac ntac 512 Nov 22 17:40 servlets
drwxrwxr-x 2 ntac ntac 512 Dec 19 19:42 logs


 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A war file is a zip file - you can use old zip tool to create it.
 
nishant vaishnaw
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for replying ,

as the existing files structure in unix dosen't have web.xml and web-inf , so it it mandatory to have web.inf or web.xml in .war file
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you need to create the WEB-INF/web.xml file. Alternatively, learn how to use the Ant build tool (which runs on all common operating systems) - it has facilities to create .war files.
 
nishant vaishnaw
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, what are the values i need to put in web.xml.
or directory structure , in other words where i need to copy my application folder in web.inf , can you please guide.
below are my application directory and file :
$ cd /apps/ntac/untfrontend5.6.6
$ ls -ltr
total 10
drwxrwxr-x 2 ntac ntac 512 May 25 2007 properties
drwxrwxr-x 7 ntac ntac 512 Jul 10 2007 web
drwxrwxr-x 2 ntac ntac 512 Jul 17 2007 lib
drwxrwxr-x 2 ntac ntac 512 Nov 22 17:40 servlets
drwxrwxr-x 2 ntac ntac 512 Dec 19 19:42 logs

 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know what you mean by "application folder". In web.xml you would declare your servlets, filters, mappings, security settings and a bunch of other stuff. If you're unfamilier with that file I advise to look for a tutorial on these things, it's way too much to cover in a forum post.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34072
334
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you running on the old server to serve that content? I ask because it might have an export utility.
 
nishant vaishnaw
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

in existing setup it is not using .war file only .jar files was deployeed in old version of IBM websphare.
and httpd modules are their where applicaiton path are configure in unix server.

Below is details of httpd.conf file :
<VirtualHost nus405.in.telstra.com.au:8094>
ServerAdmin webmaster@host.some_domain.com
DocumentRoot /apps/ntac/untfrontend/web
ServerName host.some_domain.com
ErrorLog /var/IBMHTTPD/logs/ntac-dev356_error_log
TransferLog /var/IBMHTTPD/logs/ntac-dev356_access_log
</VirtualHost>
 
Lawrence Xu
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which version is your old websphere version?
I think you may open websphere manage console
 
nishant vaishnaw
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The old version of websphare is 3.5.6


the new version where we are migration the code is :
•IBM HTTP Server and WAS Network Deployment v 7.0.0.3
•IBM WebSphere MQ v 7.0.0.2)


 
Ivan Jozsef Balazs
Rancher
Posts: 972
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is under the directory "web" ?

If you did not happen to have zip, you can use "jar" (part of the JDK).

 
nishant vaishnaw
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Under web these are the folder:
$ cd web
$ ls -ltr
total 56
drwxr-xr-x 2 ntac ntac 4096 Apr 21 2006 reports
drwxr-xr-x 7 ntac ntac 4096 Apr 21 2006 global
drwxr-xr-x 4 ntac ntac 4096 Apr 21 2006 help
drwxr-xr-x 3 ntac ntac 4096 Apr 21 2006 manual
-rwxr-xr-x 1 ntac ntac 1926 Apr 21 2006 index.html
drwxr-xr-x 3 ntac ntac 8192 Apr 23 2006 jsp


But no web-inf and no web.xml, please guide
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on the server and the Java EE version of the application. Latest versions do not mandate a web.xml for a war deployment.
 
nishant vaishnaw
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for guidance, the IBM Webspahre version is 8 and java 1.6, please guide the steps to place the file and create the .war file to deployee
 
nishant vaishnaw
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please duige the steps for creatig .war file for the existing structure( without web.inf & web.xml)$ cd /apps/ntac/untfrontend5.6.6
$ ls -ltr
total 10
drwxrwxr-x 2 ntac ntac 512 May 25 2007 properties
drwxrwxr-x 7 ntac ntac 512 Jul 10 2007 web
drwxrwxr-x 2 ntac ntac 512 Jul 17 2007 lib
drwxrwxr-x 2 ntac ntac 512 Nov 22 17:40 servlets
drwxrwxr-x 2 ntac ntac 512 Dec 19 19:42 logs
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic