How can I create an EAR file?

Posted on 2005-04-21
Last Modified: 2013-12-10

I am migrating from Websphere 4 to Websphere 5, and I have an obsticle.
In order to install an application on the new websphere 5, one has to create an EAR file to load to the websphere 5 server, but since I was using the Websphere 4 plugin I never had to create an EAR file around my files and install.  I simply wrote my files to the web server,  just like it was html or something,

Now with the new environment I have to wrap my code with an EAR file and install it with the websphere admin console for the server.
I want to test my existing code and I do not necessarily want to use websphere studio.

My question is, how can I take some of my current JSP pages and create an EAR file for them so I can install them to my new websphere 5 server, so I can test my current code?

Question by:g118481
    LVL 11

    Expert Comment

    Hello g118481,

    Why don't you want to use WSAD? It helps you create many thing that need for EAR file.

    But if you want to create manually you need to create folder structure that comply with J2EE specification and use jar utility which bundle with j2sdk. Here is some example

    jar cvf ear-file directory

    Hope this help,

    LVL 7

    Accepted Solution

    WAS 4 had a tool called AAT for generating an EAR file ... you basically import your files, do a bit of config, and generate.  WAS 5 has a simlar tool (based on Eclipse/WSAD) called Assembly Toolkit for WebSphere.  This should make the job fairly easy.

    If you have a WAR file, both versions also support deploying just the WAR file.

    BTW, once you've deployed your application once, you can still just copy new versions of the JSPs and servlets to the folders, although there are some refresh issues.  They won't be picked up automatically; I think you have to restart the app.  There are some other Q's here on EE regarding the refresh issue.
    LVL 13

    Expert Comment

    by:Murali Murugesan
    Just Create it manully thro command prompt.Like using javap command. or usinng winzip add ur webcontents and make a war file.Using all Jsps and war file make ear..then deploy it.It just works fine.


    Expert Comment

    Sorry, I don't understand your comment.

    Can you please post examples of the commands required to create war and ear files.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    How to use Database Explorer App in Matlab R2011a? 1 235
    classpath 4 114
    how to pass command line arguments to Jetty 10 103
    oneTwo java challenge 31 280
    Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
    This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
    This video discusses moving either the default database or any database to a new volume.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    730 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now