aspose file tools*
The moose likes Websphere and the fly likes how to create war files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "how to create war files" Watch "how to create war files" New topic
Author

how to create war files

Sanju
Ranch Hand

Joined: Jul 15, 2002
Posts: 53
hi friends....
How to create WAR files..and how to extract that files..


Thank you,<br />Sanju
riya s
Ranch Hand

Joined: Feb 28, 2003
Posts: 110
You can create a war file in Websphere by using the wizard or doint it yourself..
If you want to do it manually here is what you should do ..
1) Start AAT
2) On Welcome message click web module
3) Once you enter on the left you will see web components > right click it and say new component
4)Give the component a name(ideally same as your file name)
5) select servlet or jsp depending on what you want to add... Say you want to add JSP then you click JSP and click browse ...If you are using a package then let the root directory be that package name eg: if your package is priya then click c:\priya and make it root then select your jsp file and okay.. once you are back to your window click load on startup... So thats how you add a JSP. (If you click c:\ and then select the jsp from the tree then you webshere will create a directory of that name which is something you dont want for jsps)
6) For servlets you can do the same thing..click servlet and then if you have package priya then you can just have c:\ in root and select priya folder from tree then the component inside it so that the servlet will be created in a folder called priya.
7) You need to do servlet mapping for servlets.. Once you added all components then you can click servlet mapping from your original application assembler window and you can click new and give the name of the servlet.. or if you have your servlet as priya_shah.java and your form uses priyashah as the name you can give priya shah as the name .. remember once you select your servlet mapping you can give the name but start with a /
8) If you have other class files like beans etc add them using classes option under files
9) save the file.. You have your war..
Hope this helps
Sanju
Ranch Hand

Joined: Jul 15, 2002
Posts: 53
thank you priya...
I dont know that much abt WAR files...I think this is more usefull for Websphere. I have doubt..this is for only websphere. or I saw in sun one server also. whats the main use abt this files.. plz explain.. at the same time which version is usefull for J2ee. I Think version5.0 is userfriendly.. what abt below 4.0 versions..
riya s
Ranch Hand

Joined: Feb 28, 2003
Posts: 110
I dont know that much abt WAR files...I think this is more usefull for Websphere.
>That is correct. These are instructions for websphere since this is websphere forum....what are you using ?
I have doubt..this is for only websphere. or I saw in sun one server also. whats the main use abt this files..
>war files are used to hold jsp,servlets and other files like javabeans, etc used by your application... Earlier we just used servlets and jsp and used web servers but now since the past two years the concept of application servers has suddenly come out... Application servers are mostly used with Java and J2EE applications and Webservers are used by ASP etc.. Microsoft doesnt talk about Application Servers...
In a Application server there can be many application and not just one... So you have to create a ear file from a war file.. which is enterprise application archive file... like war is web archive file... EAR files can hold more than one war file... and you can add extra classes in your EAR file etc if you want them to be shared by the WAR files..
It is a little confusing in the beginning especially with websphere.. So you should read some tutorials to really understand this from the java.sun.com website on j2ee.. they have the deatiled description of war and ear files...
at the same time which version is usefull for J2ee. I Think version5.0 is userfriendly.. what abt below 4.0 versions..
>> I dont know which version of what ? Websphere 5.0 is the latest version but we have not bought it yet so I am still using 4.0... 4.0 supports older api and 5.0 the newerones...
I hope I answered your questions.
Sanju
Ranch Hand

Joined: Jul 15, 2002
Posts: 53
Thank you so much priya..
actuall I am new for websphere... I like to work there.. but I tried to start the admin server..and http server. plz can you send any documentation or corrct urls for websphere. I have some idea in weblogic 7.0. I tried so many times in websphere5.0 ..why that is now working..whats problem for that.. is there any download problem..or ?
riya s
Ranch Hand

Joined: Feb 28, 2003
Posts: 110
http://www7b.software.ibm.com/wsdd/
- here u can see tutorials etc
Also see
http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/

http://www-106.ibm.com/developerworks/forums/dw_forum.jsp?forum=168&cat=9
Sanju
Ranch Hand

Joined: Jul 15, 2002
Posts: 53
hi priya..
Thank you very much..for ur response..now I am going to see this URLS..
 
 
subject: how to create war files