cancel
Showing results for 
Search instead for 
Did you mean: 

Deploying a WAR to the J2EE Server - Suggestions Plz.

Former Member
0 Kudos

Hi,

I have a WAR file from my previous project, I would like to deploy it to my SAP WAS can some one tell me how I can do it also is there is way to Deploy a JAR file to a Server or to upload it there so all my applications can use it in the future without me having to add it to the Lib folder of my projects, I would appreciate any help.

Best Wishes,

John.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

John

1. Create Enterprise Project

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/08/51ec41b9a24f4a8359c61ae4a02db1/frameset.htm">Step for Creating Enterprise App</a>

2. Select the .ear file present in the node

3. Right the .ear and Select <b>Deploy to J2EE Server</b>

Hope this helps !!!

Thanks

Former Member
0 Kudos

Hi Jack,

I have a WAR, any steps on how to import it.

Best Wishes,

John.

Former Member
0 Kudos

John

Take a copy of War and convert the .war to .zip file.

Now you can import .ZIP without any problem...

On NWDS , File --> Import --> ZIP

Hope this helps !!!

Thanks

Message was edited by: Jack

deepa_prabhu
Participant
0 Kudos

Hi John,

Open the source of application.xml in the EAR project and the add the following

<module>

<web>

<web-uri>sampleweb.war</web-uri>

<context-root>sampleweb</context-root>

</web>

</module>

Replace your war file name and context root in the above snippet and add it in your application.xml as follows...

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"

"http://java.sun.com/dtd/application_1_3.dtd">

<application>

<display-name>sample</display-name>

<description>EAR description</description>

<module>

<web>

<web-uri>sampleweb.war</web-uri>

<context-root>sampleweb</context-root>

</web>

</module>

</application>

Once you do it, your war is referred in ear and u can seperately deploy the war and ear and it will be recognized.

Hope this will solve your problem..

You may reward points if the solution helped..

Thanks and regards

Deepa Jampunathan

Former Member
0 Kudos

Hi Deepa,

Thanks for that detail, I still donot know how to Deploy a WAR file directly to the SAP WAS 6.40.

I have also tried to change the .war ext to to .zip but it does not work, can you please suggest how to DEPLOY the WAR file directly to the Server, or how I can import and existing war file.

Best Wishes,

John.

Former Member
0 Kudos

Hi John

Just to clear your confusion , Whenever you want to deploy any web application you have to create a EAR project ( if using NWDS ) and then add the WAR project to the EAR project and deploy that EAR project

You cannot deploy a war file directly in SAP web AS

Regarding creation of the EAR , you already have this details in the previous threads

Hope this helps, please reward points for helful answers

Regards

rajeshkr

Former Member
0 Kudos

Hi Rajesh,

Great that clears some doubts of mine, also now would have any other suggestions on importing an exisiting WAR file.

Thanks,

John.

Former Member
0 Kudos

Hi

1)You can rename the war file as a zip file

2)Create a WEB project in your NWDS

3)GO to file >Import option in ur nwds

4)Look for the Zip file option(last one)and import the zip file and check in the In To Folder: option . here it should point to your web project.

Hope this helps , <b>please mark points for helpful answers</b>

regards

rajeshkr

former_member182372
Active Contributor
0 Kudos

Hi John,

To deploy WAR file to J2EE WAS you need to create "Enterprise Application Project" and add your Web Application to EAR project (right click on Web project, select "Add to EAR project" from context menu).

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hello Maksim,

I have a WAR file, now I am unable to import this into my NWDS, it does not give me an option to import this WAR file, so how would I add it to an EAR project if I cant import it into NWDS, please let me know.

Thanks,

John.

Message was edited by: John Bray

former_member182372
Active Contributor
0 Kudos

Hi John,

Create web project with the same name like your WAR file. Copy your war file to root of project and repeat what I have suggested earlier.

Best regards, Maksim Rashchynski.