Deploying WAR file on iPlanet Application Server 6.0 SP3 Test Drive edition on Windows 2000.

Thanks Han-Dat Luc for your replies. I did what you asked me to and here are

the results:

For problem 2 (see email below), I confirmed that the classpath is correct.

I got rid of the files that were causing the "incorrectly packaged" error,

so this time I did not get that error. However, I still got a warning

"NonIAS modules will be migrated to IAS. Please save archive.". I hit OK,

and proceeded to save the changed WAR file, and continued with the

depoyment. Note, I did not make any manual changes at all.

For problem 3, I got the successful deployment message:

10 kas> deployment action "J2EEInstallWar"

(c:/iplanet/ias6/JAR/WebMyApp.war) running.

10 kas> deployment action "J2EEInstallWar"

(c:/iplanet/ias6/JAR/WebMyApp.war) running.

webappreg -nodeprecated c:/iplanet/ias6/ias/JAR/WebMyApp.war 2>&1

10 Connected to LDAP server on g_sang port 389

10 The current input file= c:/iplanet/ias6/ias/JAR/WebMyApp.war

1o login page is being set to;

10 AppComponentDescriptor: com.netscape.server.deployment.WebAppDescriptor

10 All EnvEntries name:

10 All Ejb-refs:

10 All Resource-refs:

10 WebAppName is WebMyApp

20 kas> deployment action "J2EEInstallWar"

(c:/iplanet/ias6/JAR/WebMyApp.war) complete.

Finished deploying to g_sang at [20/Nov/2001 17:05:24]

Can you confirm if this is correct? However, when I try

http://localhost:81/NASApp/WebMyApp/AppName (I get Page Cannot be Displayed

Error) or http://localhost:81/NASApp/WebMyApp/servlet/AppName (I get the GX

Error (GX2GX) Error). Please note that the url pattern defined in web.xml is

<url-pattern>/AppName</url-pattern> for servlet AppName. The location of the

servlet AppName is in a subfolder called jsp under WebMyApp. Please let me

know what is wrong in here.

Thanks,

George

"Han-Dat Luc" <han-dat@sun.com> wrote in message

news:3BFB70C3.4F1EFFD7@sun.com...

> see answers inline

>

> George Sang wrote:

> >

> > Hi All:

> >

> > I will really appreciate your help in answering some of my questions. I

am

> > running iPlanet Application Server 6.0 SP3 Test Drive edition on Windows

> > 2000. I am using the iPlanet Web Server Enterprise Edition 6.0. I have

been

> > able to successfully run the Fortune and HelloWorld examples.

> >

> > 1) Can I deploy a WAR file instead of an EAR file? Is there any

> > documentation on deplying WAR files? Are the steps similar to deploying

an

> > EAR file?

>

> yes, you can definately deploy war files by themselves. It is known as a

> module so you would use deploymodule instead deployapp as the deployment

> option (if using command line)

>

> > 2) I tried deploying my WAR file and also a EAR file. On both occasions

I

> > got the messagen "The following entries are incorrectly packaged or have

> > external dependencies". What is this supposed to mean? I hit OK and

> > proceeded with the deployment, and then it told "NonIAS modules will be

> > migrated to IAS. Please ave archive.". Again, I hit OK, and proceeded to

> > save the changed WAR/EAR file, and then selected the target server and

began

> > the deployment. Is this normal?

> This mean you are trying to deploy a war/ear file not created for iAS.

> As per J2EE spec, an application server may have its own specific

> deployment descriptors in addition to the required ones. iAS needs its

> own specific descriptors. That's why you get the NoniAS modules warning.

> The deployment tool will try to generate those descriptors for you, but

> you may need to manually fix a few entries afterwards depending on how

> your existing file was packaged.

> For the first message, it means that you are using other non default

> packages in your war/module which the deployment tool cannot find

> because you did not add them to your module. If they are in the iAS

> classpath, you can ignore the warning, however, it is very likely, that

> the libraries that are referenced by your war/ear files are not in the

> iAS classpath.

>

> > 3) The noticeable part is that when I deploy WAR/EAR files, in the

Deploy

> > Tab Message window I do get the "Finished deploying to MACHINE_NAME at

....."

> > message with a Success indicator. However, what is missing here is the

> > details I got when I deployed Fortune or HelloWorld examples. I do not

get

> > the following messages in the Deploy Tab Message window:

> >"j2eeappreg -nodeprecated ....."

> >"10 Connected to LDAP server on...."

> >"10 login page is being set to : "

> >"10 Register Web Module:...."

> >"WebApName is ...."

> >"10 j2eeappreg done."

> > Why are these messages missing for my application? Doesn't this clearly

> > indicate that no web module is being created? Then how do I access the

> > application from the browser?

> Check your descriptor files. There may be entries missing. I suggest you

> compare them to the descriptors that the sample apps have.

>

> If I do try

> > http://localhost:81/module_name/servlet_name, I get a GX Error (GX2GX)

> > error.

> > 4) Does the Web Server plugin have to be changed? Where is the context

root

> > to be mentioned?

> You need /NASApp, ie http://localhost:81/NASApp/context/servlet_name

> By default the name of your war/ear is your context root.

>

>

> >

> > Thanks,

> > George

>

> --

> Han-Dat Luc (hdl@sun.com)

> Senior Consultant

> SUN Professional Services (iPlanet)

> __

>o .

>o.

>O _ _ __

>(_) _ \| | __ _ _ __| |_ TM

>| | |_) | |/ _` | '_ \ / _ \ __|

>| | __/| | (_| | | | | __/ |_

>|_|_||_|\__,_|_| |_|\|\__|

>e-commerce solutions

> Sun Microsystems Australia Pty Ltd

[6628 byte] By [SanjeevAgarwal] at [2007-11-25 4:51:17]
# 1

Hi,

I think your war file packaging is corrupt as you are saying that your servlet resides in a dir called jsp in your war module root directory.

Please see the attached image to see the war module contents. When you deploy your war module (let us say <b>my_app.war</b>) in iAS it will create a directory called <b>my_app</b> in <i>.../ias/APPS/modules</i>. The context root for the application is by default the war file name <b>my_app</b>.

All the static contents like <i>*.html</i> and <i>*.JSP</i> will be placed in the same directory and this directory is the document root for the application like you have document root for a web server (if you place say abc.txt file in my_app dir you can view it at http://your_server:port/NASApp/my_app/abc.txt), so the right place for welcome index page is <i>.../APPS/modules/my_app/</i>. The only directories that can be put in this application root directory are the one having only static contents inside like html/images/text files.

All the classes (Servlet or application helper classes) will go in <i>.../modules/my_app/WEB-INF/classes/</i> directory, and the directory structure in WEB-INF dir will be according to the package name.

Suppose your servlet name is myServlet.class and package is my.app then the servlet will be placed as <i>.../my_app/WEB-INF/classes/my/app/myServlet.class</i> and you can invoke the Servlet by the URL: http://your_server:port/NASApp/my_app/myServlet or if you have set the Servlet mapping in your web.xml file as myServletMap then you can invoke it as http://your_server:port/NASApp/my_app/myServletMap.

Please note that you don't have to write the servlet package name in the URL to invoke it.

All the helping Jar files will go in <i>.../my_app/WEB-INF/lib/</i> directory and will be exploded there.

The iAS use a iAS specific xml file during deployment that is ias-web.xml and this is the file which deployment tool creates while saying "Non iAS modules will be migrated to iAS. Please save archive."

I hope this will help, please feel free to ask further questions.

Regards,

Sanjeev.

Sanjeev Agarwal at 2007-6-30 21:46:22 > top of Java-index,Application & Integration Servers,Application Servers...