struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jayanta....@hpsglobal.com
Subject RE: HOW TO: Running struts 1.0 on Iplanet 4.1 on Solaris and it w orks on NT too!
Date Wed, 06 Feb 2002 10:06:32 GMT
Thanks Mikkel for the details... I am trying it out and will let you know
any further implications I face...

 -----Original Message-----
From: 	Mikkel Bruun [mailto:mikkel.bruun@valtech.dk] 
Sent:	Wednesday, February 06, 2002 2:23 PM
To:	'struts-user@jakarta.apache.org'
Subject:	HOW TO: Running struts 1.0 on Iplanet 4.1 on Solaris and it
works on NT too!

Running struts 1.0 on Iplanet 4.1 on Solaris and it works on NT too!

The guide explains how to deploy struts on the IP41 server.
This deployment guide is limited to only describing the deployment of the
action servlet and not 
the taglibs.

If you are using taglibs please check the IP documentation...Even though its
a hard battle, it
is possible to deploy the struts taglibs using the documentation...I know, I
did it and forgot how ;-)

When deploying on IP41 yo face many challenges. First of all, filesystem is
not
standard compliant, meaning no webapps folder, no WEB-INF, no web-xml, no
wars etc...

I took me a couple of days when I first had to find out how to do it but
otherwise, 
deployment on the IP is fairly simple, as long as you stay away from
all the funky stuff, such as serving .jsps out of WEB-INF, running several
apps, etc...

In this document I have the following layout...

Iplanet is installed in /apps/iplanet

The documentroot is at /apps/iplanet/docs

The classes folder is at /apps/iplanet/docs/classes and contains both .jars
and class files...

Putting the files in the right place...

As IP doesnt have any WEB-INf capabilities, and considering that struts
tries to load struts-config.xml from this folder, your first problem arises.

The easiest fix is to create a WEB-INF folder in the documentroot and put
your 
struts-config.xml in here...

Another way to solve it is to add the "config" parameter to 
servlets.properties (see later), and point at an absolute file path...

ApplicationRessources.properties also go into the class folder.

Your .jsp's , images, etc goes into the document root (of course)...


Next task is to copy the struts.jar (and all your other .jars and classes)
to the
classes folder.

Configuring the Action servlet.
(Could be done through the GUI interface...but really...)

We now point your attention to the IP configuration files:

These are placed in /apps/iplanet/https-yourserver/config

First of all we need to look at the jvm12.conf. This file contains the
classpath
that the jvm is launched with.

- Add struts.jar, xerces.jar and probably parser.jar to the jvm.classpath.

Next up is the servlets.properties

Add the following line

servlet.action.code=org.apache.struts.action.ActionServlet

This registers the ActionServlet under the name action

optionally, add the following line:
servlet.action.initArgs=config=//WEB-INF//struts-config.xml

Which tells the action servlet where to look for struts configuration

Then we turn to the rules.properties.
This file contains the url mapping of the servlet.

Add the following line

/action=action

This makes the action servlet react to urls containing action, such as
http://localhost/action/dostuff

Note: The struts website contains info on registering the action servlet as
.do

So, thats it...struts is now deployed and you should be able to run your app


Mikkel Bruun 
mikkel at helenius dot org

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message