You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Philip Eskelin <ph...@eskelin.com> on 2000/06/25 07:11:42 UTC

Struts with Orion

Anybody get this to work?  I'm trying to deploy struts-example and it gives
me this:

"Auto-unpacking E:\Program Files\orion\applications\struts-example.war...
done.
Error updating application struts-example: Unable to find/read assembly info
for
 E:\Program Files\orion\applications\struts-example
(META-INF/application.xml)"

Do I create an application.xml and put it into meta-inf in the .war file?

Thanks for any tips,
Philip Eskelin


RE: Read only tag attributes?

Posted by Kevin Duffey <kd...@buymedia.com>.
Hi,

> > Already checked this. It has two setSize() methods, one for
> int's and one
> > for String's. I have a sneaking suspicion this may be the problem (two
> > methods) as I know the spec is very vague about whether this sort of
> > overloading is allowed.
> >
>
> I think you're right ... Depending on how Orion chooses to implement bean
> introspection, it's entirely possible that it will decide there
> is no setter
> method there (even though there are two of them) and thus decide
> that the bean
> is read-only.
>
> I really should not have two setters -- and I suspect there are
> problems on some
> containers if there is only the "int" version of the setter
> (which is the way it
> really should be).  I will do some experiments and try to correct
> this ASAP.
>
> >
> > Have you got the text tag working under Orion? If so the above
> can't be the
> > problem. What about the struts-example?
> >
>
> What's puzzling to me is why Kevin didn't run into this.  Are you
> guys running
> the same versions of Orion?  How about JVMs?

I'll clear this up. I never used the tag. :) I merely was responding to what
I thought might be the problem. Sorry to confuse you.


Re: Read only tag attributes?

Posted by Eduardo Pelegri--Llopart <Ed...@eng.sun.com>.
check the errata # 6 in
http://java.sun.com/products/jsp/errata_1_1_a_042800.html

	- eduard/o

Mike Cannon-Brookes wrote:
> 
> > From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
> >
> > Mike Cannon-Brookes wrote:
> >
> > > Kevin,
> > >
> > > Already checked this. It has two setSize() methods, one for
> > int's and one
> > > for String's. I have a sneaking suspicion this may be the problem (two
> > > methods) as I know the spec is very vague about whether this sort of
> > > overloading is allowed.
> > >
> >
> > I think you're right ... Depending on how Orion chooses to implement bean
> > introspection, it's entirely possible that it will decide there
> > is no setter
> > method there (even though there are two of them) and thus decide
> > that the bean
> > is read-only.
> >
> > I really should not have two setters -- and I suspect there are
> > problems on some
> > containers if there is only the "int" version of the setter
> > (which is the way it
> > really should be).  I will do some experiments and try to correct
> > this ASAP.
> >
> > >
> > > Have you got the text tag working under Orion? If so the above
> > can't be the
> > > problem. What about the struts-example?
> > >
> >
> > What's puzzling to me is why Kevin didn't run into this.  Are you
> > guys running
> > the same versions of Orion?  How about JVMs?
> >
> 
> The oddest thing is that I installed an older version at home last night and
> the example didn't die at that point. (Incidentally it threw up trying to
> add a mail host). At home I installed the build from the 19th of June (no
> read only error), and at work I installed the build from 25th June (has a
> readonly error) - what has changed between these two dates with the TextTag?
> (Or any of it's superclasses?)
> 
> Should give you a big headstart on finding the problem!
> 
> Mike

RE: Read only tag attributes?

Posted by Mike Cannon-Brookes <mi...@bookmarkbox.com>.
> From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
>
> Mike Cannon-Brookes wrote:
>
> > Kevin,
> >
> > Already checked this. It has two setSize() methods, one for
> int's and one
> > for String's. I have a sneaking suspicion this may be the problem (two
> > methods) as I know the spec is very vague about whether this sort of
> > overloading is allowed.
> >
>
> I think you're right ... Depending on how Orion chooses to implement bean
> introspection, it's entirely possible that it will decide there
> is no setter
> method there (even though there are two of them) and thus decide
> that the bean
> is read-only.
>
> I really should not have two setters -- and I suspect there are
> problems on some
> containers if there is only the "int" version of the setter
> (which is the way it
> really should be).  I will do some experiments and try to correct
> this ASAP.
>
> >
> > Have you got the text tag working under Orion? If so the above
> can't be the
> > problem. What about the struts-example?
> >
>
> What's puzzling to me is why Kevin didn't run into this.  Are you
> guys running
> the same versions of Orion?  How about JVMs?
>

The oddest thing is that I installed an older version at home last night and
the example didn't die at that point. (Incidentally it threw up trying to
add a mail host). At home I installed the build from the 19th of June (no
read only error), and at work I installed the build from 25th June (has a
readonly error) - what has changed between these two dates with the TextTag?
(Or any of it's superclasses?)

Should give you a big headstart on finding the problem!

Mike


Re: Read only tag attributes?

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Mike Cannon-Brookes wrote:

> Kevin,
>
> Already checked this. It has two setSize() methods, one for int's and one
> for String's. I have a sneaking suspicion this may be the problem (two
> methods) as I know the spec is very vague about whether this sort of
> overloading is allowed.
>

I think you're right ... Depending on how Orion chooses to implement bean
introspection, it's entirely possible that it will decide there is no setter
method there (even though there are two of them) and thus decide that the bean
is read-only.

I really should not have two setters -- and I suspect there are problems on some
containers if there is only the "int" version of the setter (which is the way it
really should be).  I will do some experiments and try to correct this ASAP.

>
> Have you got the text tag working under Orion? If so the above can't be the
> problem. What about the struts-example?
>

What's puzzling to me is why Kevin didn't run into this.  Are you guys running
the same versions of Orion?  How about JVMs?

>
> Mike
>

Craig





RE: Read only tag attributes?

Posted by Kevin Duffey <kd...@buymedia.com>.
Hi,

I haven't tried using it myself..Craig is probably the one to ask about
that. I would think only one method is allowed..but it is a taglib, not a
setter method for a javabean, so its possible it is allowed in the taglib
itself.

> Kevin,
>
> Already checked this. It has two setSize() methods, one for int's and one
> for String's. I have a sneaking suspicion this may be the problem (two
> methods) as I know the spec is very vague about whether this sort of
> overloading is allowed.
>
> Have you got the text tag working under Orion? If so the above
> can't be the
> problem. What about the struts-example?
>
> Mike
>
> -----Original Message-----
> From: Kevin Duffey [mailto:kduffey@buymedia.com]
> > Deployed all the WARs with Orion now - my last instructions should work
> > perfectly.
> >
> > However when accessing the registration page I get:
> >
> > "Error parsing JSP page /registration.jsp line 32
> > Property 'size' of bean/tag 'org.apache.struts.taglib.TextTag' is
> > read only"
> >
> > Any Struts / Orion users ever seen it? I've used custom tags
> > under Orion for
> > ages and this one has me baffled.
>
> I bet the code for the taglib doesn't have a set method in the taglib code
> that matches the attribute name. Look at the source of TextTag
> and see if it
> has a setSize() method..it could be mispelled or something. Or,
> maybe Craig
> meant for it to be this way.
>
>


RE: Read only tag attributes?

Posted by Mike Cannon-Brookes <mc...@internet.com>.
Kevin,

Already checked this. It has two setSize() methods, one for int's and one
for String's. I have a sneaking suspicion this may be the problem (two
methods) as I know the spec is very vague about whether this sort of
overloading is allowed.

Have you got the text tag working under Orion? If so the above can't be the
problem. What about the struts-example?

Mike

-----Original Message-----
From: Kevin Duffey [mailto:kduffey@buymedia.com]
> Deployed all the WARs with Orion now - my last instructions should work
> perfectly.
>
> However when accessing the registration page I get:
>
> "Error parsing JSP page /registration.jsp line 32
> Property 'size' of bean/tag 'org.apache.struts.taglib.TextTag' is
> read only"
>
> Any Struts / Orion users ever seen it? I've used custom tags
> under Orion for
> ages and this one has me baffled.

I bet the code for the taglib doesn't have a set method in the taglib code
that matches the attribute name. Look at the source of TextTag and see if it
has a setSize() method..it could be mispelled or something. Or, maybe Craig
meant for it to be this way.


RE: Read only tag attributes?

Posted by Kevin Duffey <kd...@buymedia.com>.
Hi,


> Deployed all the WARs with Orion now - my last instructions should work
> perfectly.
>
> However when accessing the registration page I get:
>
> "Error parsing JSP page /registration.jsp line 32
> Property 'size' of bean/tag 'org.apache.struts.taglib.TextTag' is
> read only"
>
> Any Struts / Orion users ever seen it? I've used custom tags
> under Orion for
> ages and this one has me baffled.

I bet the code for the taglib doesn't have a set method in the taglib code
that matches the attribute name. Look at the source of TextTag and see if it
has a setSize() method..it could be mispelled or something. Or, maybe Craig
meant for it to be this way.


Read only tag attributes?

Posted by Mike Cannon-Brookes <mc...@internet.com>.
G'day all,

Deployed all the WARs with Orion now - my last instructions should work
perfectly.

However when accessing the registration page I get:

"Error parsing JSP page /registration.jsp line 32
Property 'size' of bean/tag 'org.apache.struts.taglib.TextTag' is read only"

Any Struts / Orion users ever seen it? I've used custom tags under Orion for
ages and this one has me baffled.

Mike


Re: Struts with Orion

Posted by Wong Kok Wai <wo...@pacific.net.sg>.
How about checking the instructions int the CVS as part of Struts' documentation? There's one
already for Tomcat. I think your post would most helpful for lots of people. I like to get Struts
running on Weblogic too, any instructions for this?

Kevin Duffey wrote:

> Hi,
>
> Yeah..I had a little bit of a problem too with Orion.


RE: Struts with Orion

Posted by Kevin Duffey <kd...@buymedia.com>.
Hi,

I am running Orion with Struts now..no problems. For those just joining, I
will inform you that Orion has one caveat that prevents Struts from working
properly, and that is that Orion does not allow a servlet container access
to the /WEB-INF dir. I spoke extensively to Magnus, one of the orion
developers, and his feeling is that the way the 9.4 section explains
it..that nothing is to SERVER the WEB-INF dir, not even a servlet container
is allowed. However, I talked with Craig (the Struts mastermind) and he
informed me that Danny Coward..the Servlet 2.2 spec lead, says that a
servlet container CAN access WEB-INF, so at this point, its a problem that
is being addressed by the Orion team. The general concensus I got from a
number of developers is that the WEB-INF should be off limits and thus Orion
is correct. However, Orion is the only Servlet 2.2 container I have worked
with that has this problem..everyone else seems to allow it, so the hope
here is that a new patch of Orion 1.0 comes out with access to it enabled.
There may alread be one now..I haven't downloaded in some time.

I too will brag about Orion..I have been using it for 8 months and its by
far the best piece of software I have seen in a long time..at least in the
way of web app related items. It amazes me that a small team created Orion
so fast, and meanwhile the big boys, like WebLogic, WebSphere, etc are
lagging in full support of J2EE. Ofcourse, the downside is Orion has
terrible documentation right now, and it doesn't give you much else in the
way of tools. My company is moving to WebLogic, and at $25K per cpu, its a
MUCH MUCH MUCH larger investment than Orion, at $1500 per server. For all
the bells and whistles you get from WebLogic and others, I would never pay
that kind of money just because they have 1000+ employees, backing, etc..but
that is why I am a developer and not a business man. ;)

Struts is very easy to use once you get it running, and its almost very easy
to get running. I am sure the problem with Orion is what slowed me down,
that and understanding the framework and how to use it. There is alot I
don't use with it yet, but what I am using I am very pleased with. My site
that I am converting to it is much more solid, and much faster for me to
develop as well.


> This is a little more complex than it needs to be. I know how frustrating
> Orion is, I'm on of the first handful over users - been there since
> 0.5something and know the whole development team very well. It is truly a
> brilliant piece of software, don't write it off too soon on account of the
> documentation (which is coming along in leaps and bounds now that 1.0 is
> 'feature stable'). If you need help, try the Orion-Interest list where
> Orion-devotee's are usually very helpful.
>
> With your case, there's no need to create an entire application just to
> deploy one WAR file - you can deploy it as a web module of the default
> global application (finding this out is very difficult I know).
>
> In config/application.xml add a line:
> <web-module id="strutsExampleWebApp"
> path="c:\struts\struts-example.war" />
>
> Now to config/default-web-site.xml add (or any other web-site.xml file if
> you want to deploy it separately from the default web site):
> <web-app application="default" name="strutsExampleWebApp"
> root="/strutsExample" />
>
> Now localhost/strutsExample will have your struts example app -
> without the
> hassle of creating an EAR.
>
> Hope this helps everyone,
> Feel free to ask me questions on setting up Orion w/ Struts, I'm
> about to do
> it ;)
>
> Cheers,
> Mike
>
> -----Original Message-----
> From: Philip Eskelin [mailto:philip@eskelin.com]
> Sent: Monday, June 26, 2000 12:51 PM
> To: struts-user@jakarta.apache.org; Kevin Duffey
> Subject: RE: Struts with Orion
>
>
>
> I got both applications working.  The problem I ran into is that Orion
> needed to be tweaked some more to make it work.  For example, in
> global-web-application.xml I needed to change the
> welcome-file-list so that
> it used index.jsp instead of default.jsp as its JSP welcome.
> Also, I needed
> to put tools.jar into the base Orion directory.  Finally, I needed to put
> the .war into an .ear and add an application.xml to the meta-inf directory
> that describes the .war module.
>
> The structure looks like this:
>
> struts-example.ear
>    meta-inf
>       application.xml - describes www.war
>    www.war - struts-example.war with Kevin's updates
>       meta-inf
>       web-inf
>       etc.
>
> One of the things I hope Struts gets down is that the documentation
> accurately maps to successfully using it.  One of the
> frustrations I've ran
> into with Orion is that it's a wonderfully cool piece of software, but the
> docs seem to be out of sync with the app.  E.g., I followed their steps
> exactly as documented to get Hypersonic SQL working and it doesn't work.
>
> The suggestion for Struts would be that the docs should start
> with the user
> installing Orion and documents all the steps required to make it work with
> the included apps (struts-example and struts-documentation).  Heck, maybe
> I'll join the project and do it myself ;-)
>
> Phil
>
> > -----Original Message-----
> > From: Philip Eskelin [mailto:philip@eskelin.com]
> > Sent: Sunday, June 25, 2000 8:44 PM
> > To: Kevin Duffey; struts-user@jakarta.apache.org
> > Subject: RE: Struts with Orion
> >
> >
> > Kevin,
> >
> > Thanks much for the reply -- I too like Orion a lot and think
> > it's theme of
> > never shutting down the server is where things need to be.  I'm
> trying to
> > get struts-example and struts-documentation to work in Orion.
> Neither of
> > these projects have an app or www directory -- just META-INF and
> > WEB-INF at
> > the base of the .war file.  So where would you put action.xml in
> > this case?
> > I'll play around and thanks in advance for any additional suggestions.
> >
> > Regards,
> > Philip
> >
> > > -----Original Message-----
> > > From: Kevin Duffey [mailto:kduffey@buymedia.com]
> > > Sent: Sunday, June 25, 2000 2:10 AM
> > > To: struts-user@jakarta.apache.org; philip@eskelin.com
> > > Subject: RE: Struts with Orion
> > >
> > >
> > > Hi,
> > >
> > > Yeah..I had a little bit of a problem too with Orion. As it turns
> > > out, Orion
> > > does NOT allow the servlet container serlvets to access anything
> > > in WEB-INF
> > > dir, so the examples were not working. However, I am using Struts
> > > with Orion
> > > 1.0 release just fine. What I had to do is move action.xml into my www
> > > folder (of my .WAR directory structure), and I did put
> struts.tld in the
> > > WEB-INF dir, compiled my code to WEB-INF/classes, and put
> > > struts.jar in the
> > > WEB-INF/lib dir.
> > >
> > > app/www/action.xml - struts config file
> > > app/www/WEB-INF/classes - compiled class code (Servlets,
> javabeans, core
> > > classes, etc)
> > > app/www/WEB-INF/lib/struts.jar  - struts library
> > > app/www/WEB-INF/struts.tld  - struts tag-lib library
> > >
> > > Also, I have the following in web.xml for Orion specifically:
> > >
> > > <?xml version="1.0"?>
> > > <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
> Application
> > > 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
> > >
> > > <web-app>
> > > 	<servlet>
> > > 		<servlet-name>action</servlet-name>
> > > 		<display-name>action</display-name>
> > >
> > > <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
> > > 		<init-param>
> > > 			<param-name>mapping</param-name>
> > >
> > > <param-value>org.apache.struts.action.ActionMappingBase</param-value>
> > > 		</init-param>
> > > 		<init-param>
> > > 			<param-name>application</param-name>
> > >
> > > <param-value>org.apache.struts.action.ActionResources</param-value>
> > > 		</init-param>
> > > 		<init-param>
> > > 			<param-name>config</param-name>
> > > 			<param-value>/action.xml</param-value>
> > > 		</init-param>
> > > 		<init-param>
> > > 			<param-name>debug</param-name>
> > > 			<param-value>0</param-value>
> > > 		</init-param>
> > > 	</servlet>
> > > 	<servlet-mapping>
> > > 		<servlet-name>action</servlet-name>
> > > 		<url-pattern>*.do</url-pattern>
> > > 	</servlet-mapping>
> > > 	<welcome-file-list>
> > > 		<welcome-file>index.jsp</welcome-file>
> > > 	</welcome-file-list>
> > > 	<taglib>
> > > 		<taglib-uri>/config/struts.tld</taglib-uri>
> > > 		<taglib-location>/WEB-INF/struts.tld</taglib-location>
> > > 	</taglib>
> > > 	<taglib>
> > > 		<taglib-uri>/config/bm.tld</taglib-uri>
> > > 		<taglib-location>/WEB-INF/bm.tld</taglib-location>
> > > 	</taglib>
> > > 	<login-config>
> > > 		<auth-method>BASIC</auth-method>
> > > 	</login-config>
> > > </web-app>
> > >
> > >
> > > Make sure you use the init-param for CONFIG and set the value to
> > > /action.xml. It defaults to /WEB-INF/action.xml, and that won't work
> > > presently with Orion.
> > >
> > > As to why this is happening, their is a misunderstanding of the
> > > servlet 2.2
> > > spec of the WAR format. A number of developers including the
> Orion team
> > > believe the spec means that the servlet container can NOT server
> > > anything in
> > > the WEB-INF dir, even to its own servlets..thus they are not
> allowed to
> > > access the WEB-INF dir. The code in Struts..I forget exactly..but
> > > I believe
> > > it uses getResource() call to get the xml config file loaded,
> > and that is
> > > what Orion is preventing from working. I did talk with the
> > Orion team and
> > > they are looking into the specific meaning of the WEB-INF
> > > structure. Craig,
> > > the developer of Struts has informed me that Danny Coward, the
> > lead on the
> > > servlet 2.2 spec confirms that the WEB-INF dir is accessible via
> > > the servlet
> > > container. Tomcat supports this, and Craig is part of the
> Apache/Jakarta
> > > project..which uses Tomcat for development (is this right Craig? ;).
> > >
> > > Other servlet engines including JRUN, Resing and WebLogic do
> > allow WEB-INF
> > > access, so I think Orion will change to allow this. They are
> > > working on EJB
> > > 2.0, admin tools, and Serlvete 2.3, JSP 1.2 already for Orion,
> > so I don't
> > > know if they will add this to 1.0 (update), or later versions for
> > > those that
> > > want to start using the new features Orion already implements
> (which is
> > > going to be part of J2EE 1.3).
> > >
> > > Oh yeah..I set up an application with a META-INF dir too..but you
> > > can deploy
> > > just a .war or an expanded WAR formatted dir structure as well.
> > >
> > > If you have any trouble..feel free to ask. I use Orion
> > > exclusively as its by
> > > far the best product I have seen, especially considering the price,
> > > performance and feature set. It may not package development tools
> > > and fancy
> > > GUI tools, but it is certainly the easiest app server I have
> > ever set up,
> > > and its performance thus far is much higher than every other
> > engine I have
> > > tried (WebLogic, IIS/JRUN, ServletExec, Resin, Apache/JServ).
> > > Resin is very
> > > fast too..but Orion is slightly ahead of it..and it supports full J2EE
> > > deployment.
> > >
> > > Hope that helps.
> > >
> >
>
>
>


RE: Struts with Orion

Posted by Mike Cannon-Brookes <mc...@internet.com>.
This is a little more complex than it needs to be. I know how frustrating
Orion is, I'm on of the first handful over users - been there since
0.5something and know the whole development team very well. It is truly a
brilliant piece of software, don't write it off too soon on account of the
documentation (which is coming along in leaps and bounds now that 1.0 is
'feature stable'). If you need help, try the Orion-Interest list where
Orion-devotee's are usually very helpful.

With your case, there's no need to create an entire application just to
deploy one WAR file - you can deploy it as a web module of the default
global application (finding this out is very difficult I know).

In config/application.xml add a line:
<web-module id="strutsExampleWebApp" path="c:\struts\struts-example.war" />

Now to config/default-web-site.xml add (or any other web-site.xml file if
you want to deploy it separately from the default web site):
<web-app application="default" name="strutsExampleWebApp"
root="/strutsExample" />

Now localhost/strutsExample will have your struts example app - without the
hassle of creating an EAR.

Hope this helps everyone,
Feel free to ask me questions on setting up Orion w/ Struts, I'm about to do
it ;)

Cheers,
Mike

-----Original Message-----
From: Philip Eskelin [mailto:philip@eskelin.com]
Sent: Monday, June 26, 2000 12:51 PM
To: struts-user@jakarta.apache.org; Kevin Duffey
Subject: RE: Struts with Orion



I got both applications working.  The problem I ran into is that Orion
needed to be tweaked some more to make it work.  For example, in
global-web-application.xml I needed to change the welcome-file-list so that
it used index.jsp instead of default.jsp as its JSP welcome.  Also, I needed
to put tools.jar into the base Orion directory.  Finally, I needed to put
the .war into an .ear and add an application.xml to the meta-inf directory
that describes the .war module.

The structure looks like this:

struts-example.ear
   meta-inf
      application.xml - describes www.war
   www.war - struts-example.war with Kevin's updates
      meta-inf
      web-inf
      etc.

One of the things I hope Struts gets down is that the documentation
accurately maps to successfully using it.  One of the frustrations I've ran
into with Orion is that it's a wonderfully cool piece of software, but the
docs seem to be out of sync with the app.  E.g., I followed their steps
exactly as documented to get Hypersonic SQL working and it doesn't work.

The suggestion for Struts would be that the docs should start with the user
installing Orion and documents all the steps required to make it work with
the included apps (struts-example and struts-documentation).  Heck, maybe
I'll join the project and do it myself ;-)

Phil

> -----Original Message-----
> From: Philip Eskelin [mailto:philip@eskelin.com]
> Sent: Sunday, June 25, 2000 8:44 PM
> To: Kevin Duffey; struts-user@jakarta.apache.org
> Subject: RE: Struts with Orion
>
>
> Kevin,
>
> Thanks much for the reply -- I too like Orion a lot and think
> it's theme of
> never shutting down the server is where things need to be.  I'm trying to
> get struts-example and struts-documentation to work in Orion.  Neither of
> these projects have an app or www directory -- just META-INF and
> WEB-INF at
> the base of the .war file.  So where would you put action.xml in
> this case?
> I'll play around and thanks in advance for any additional suggestions.
>
> Regards,
> Philip
>
> > -----Original Message-----
> > From: Kevin Duffey [mailto:kduffey@buymedia.com]
> > Sent: Sunday, June 25, 2000 2:10 AM
> > To: struts-user@jakarta.apache.org; philip@eskelin.com
> > Subject: RE: Struts with Orion
> >
> >
> > Hi,
> >
> > Yeah..I had a little bit of a problem too with Orion. As it turns
> > out, Orion
> > does NOT allow the servlet container serlvets to access anything
> > in WEB-INF
> > dir, so the examples were not working. However, I am using Struts
> > with Orion
> > 1.0 release just fine. What I had to do is move action.xml into my www
> > folder (of my .WAR directory structure), and I did put struts.tld in the
> > WEB-INF dir, compiled my code to WEB-INF/classes, and put
> > struts.jar in the
> > WEB-INF/lib dir.
> >
> > app/www/action.xml - struts config file
> > app/www/WEB-INF/classes - compiled class code (Servlets, javabeans, core
> > classes, etc)
> > app/www/WEB-INF/lib/struts.jar  - struts library
> > app/www/WEB-INF/struts.tld  - struts tag-lib library
> >
> > Also, I have the following in web.xml for Orion specifically:
> >
> > <?xml version="1.0"?>
> > <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
> > 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
> >
> > <web-app>
> > 	<servlet>
> > 		<servlet-name>action</servlet-name>
> > 		<display-name>action</display-name>
> >
> > <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
> > 		<init-param>
> > 			<param-name>mapping</param-name>
> >
> > <param-value>org.apache.struts.action.ActionMappingBase</param-value>
> > 		</init-param>
> > 		<init-param>
> > 			<param-name>application</param-name>
> >
> > <param-value>org.apache.struts.action.ActionResources</param-value>
> > 		</init-param>
> > 		<init-param>
> > 			<param-name>config</param-name>
> > 			<param-value>/action.xml</param-value>
> > 		</init-param>
> > 		<init-param>
> > 			<param-name>debug</param-name>
> > 			<param-value>0</param-value>
> > 		</init-param>
> > 	</servlet>
> > 	<servlet-mapping>
> > 		<servlet-name>action</servlet-name>
> > 		<url-pattern>*.do</url-pattern>
> > 	</servlet-mapping>
> > 	<welcome-file-list>
> > 		<welcome-file>index.jsp</welcome-file>
> > 	</welcome-file-list>
> > 	<taglib>
> > 		<taglib-uri>/config/struts.tld</taglib-uri>
> > 		<taglib-location>/WEB-INF/struts.tld</taglib-location>
> > 	</taglib>
> > 	<taglib>
> > 		<taglib-uri>/config/bm.tld</taglib-uri>
> > 		<taglib-location>/WEB-INF/bm.tld</taglib-location>
> > 	</taglib>
> > 	<login-config>
> > 		<auth-method>BASIC</auth-method>
> > 	</login-config>
> > </web-app>
> >
> >
> > Make sure you use the init-param for CONFIG and set the value to
> > /action.xml. It defaults to /WEB-INF/action.xml, and that won't work
> > presently with Orion.
> >
> > As to why this is happening, their is a misunderstanding of the
> > servlet 2.2
> > spec of the WAR format. A number of developers including the Orion team
> > believe the spec means that the servlet container can NOT server
> > anything in
> > the WEB-INF dir, even to its own servlets..thus they are not allowed to
> > access the WEB-INF dir. The code in Struts..I forget exactly..but
> > I believe
> > it uses getResource() call to get the xml config file loaded,
> and that is
> > what Orion is preventing from working. I did talk with the
> Orion team and
> > they are looking into the specific meaning of the WEB-INF
> > structure. Craig,
> > the developer of Struts has informed me that Danny Coward, the
> lead on the
> > servlet 2.2 spec confirms that the WEB-INF dir is accessible via
> > the servlet
> > container. Tomcat supports this, and Craig is part of the Apache/Jakarta
> > project..which uses Tomcat for development (is this right Craig? ;).
> >
> > Other servlet engines including JRUN, Resing and WebLogic do
> allow WEB-INF
> > access, so I think Orion will change to allow this. They are
> > working on EJB
> > 2.0, admin tools, and Serlvete 2.3, JSP 1.2 already for Orion,
> so I don't
> > know if they will add this to 1.0 (update), or later versions for
> > those that
> > want to start using the new features Orion already implements (which is
> > going to be part of J2EE 1.3).
> >
> > Oh yeah..I set up an application with a META-INF dir too..but you
> > can deploy
> > just a .war or an expanded WAR formatted dir structure as well.
> >
> > If you have any trouble..feel free to ask. I use Orion
> > exclusively as its by
> > far the best product I have seen, especially considering the price,
> > performance and feature set. It may not package development tools
> > and fancy
> > GUI tools, but it is certainly the easiest app server I have
> ever set up,
> > and its performance thus far is much higher than every other
> engine I have
> > tried (WebLogic, IIS/JRUN, ServletExec, Resin, Apache/JServ).
> > Resin is very
> > fast too..but Orion is slightly ahead of it..and it supports full J2EE
> > deployment.
> >
> > Hope that helps.
> >
>



RE: Struts with Orion

Posted by Philip Eskelin <ph...@eskelin.com>.
I got both applications working.  The problem I ran into is that Orion
needed to be tweaked some more to make it work.  For example, in
global-web-application.xml I needed to change the welcome-file-list so that
it used index.jsp instead of default.jsp as its JSP welcome.  Also, I needed
to put tools.jar into the base Orion directory.  Finally, I needed to put
the .war into an .ear and add an application.xml to the meta-inf directory
that describes the .war module.

The structure looks like this:

struts-example.ear
   meta-inf
      application.xml - describes www.war
   www.war - struts-example.war with Kevin's updates
      meta-inf
      web-inf
      etc.

One of the things I hope Struts gets down is that the documentation
accurately maps to successfully using it.  One of the frustrations I've ran
into with Orion is that it's a wonderfully cool piece of software, but the
docs seem to be out of sync with the app.  E.g., I followed their steps
exactly as documented to get Hypersonic SQL working and it doesn't work.

The suggestion for Struts would be that the docs should start with the user
installing Orion and documents all the steps required to make it work with
the included apps (struts-example and struts-documentation).  Heck, maybe
I'll join the project and do it myself ;-)

Phil

> -----Original Message-----
> From: Philip Eskelin [mailto:philip@eskelin.com]
> Sent: Sunday, June 25, 2000 8:44 PM
> To: Kevin Duffey; struts-user@jakarta.apache.org
> Subject: RE: Struts with Orion
>
>
> Kevin,
>
> Thanks much for the reply -- I too like Orion a lot and think
> it's theme of
> never shutting down the server is where things need to be.  I'm trying to
> get struts-example and struts-documentation to work in Orion.  Neither of
> these projects have an app or www directory -- just META-INF and
> WEB-INF at
> the base of the .war file.  So where would you put action.xml in
> this case?
> I'll play around and thanks in advance for any additional suggestions.
>
> Regards,
> Philip
>
> > -----Original Message-----
> > From: Kevin Duffey [mailto:kduffey@buymedia.com]
> > Sent: Sunday, June 25, 2000 2:10 AM
> > To: struts-user@jakarta.apache.org; philip@eskelin.com
> > Subject: RE: Struts with Orion
> >
> >
> > Hi,
> >
> > Yeah..I had a little bit of a problem too with Orion. As it turns
> > out, Orion
> > does NOT allow the servlet container serlvets to access anything
> > in WEB-INF
> > dir, so the examples were not working. However, I am using Struts
> > with Orion
> > 1.0 release just fine. What I had to do is move action.xml into my www
> > folder (of my .WAR directory structure), and I did put struts.tld in the
> > WEB-INF dir, compiled my code to WEB-INF/classes, and put
> > struts.jar in the
> > WEB-INF/lib dir.
> >
> > app/www/action.xml - struts config file
> > app/www/WEB-INF/classes - compiled class code (Servlets, javabeans, core
> > classes, etc)
> > app/www/WEB-INF/lib/struts.jar  - struts library
> > app/www/WEB-INF/struts.tld  - struts tag-lib library
> >
> > Also, I have the following in web.xml for Orion specifically:
> >
> > <?xml version="1.0"?>
> > <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
> > 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
> >
> > <web-app>
> > 	<servlet>
> > 		<servlet-name>action</servlet-name>
> > 		<display-name>action</display-name>
> >
> > <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
> > 		<init-param>
> > 			<param-name>mapping</param-name>
> >
> > <param-value>org.apache.struts.action.ActionMappingBase</param-value>
> > 		</init-param>
> > 		<init-param>
> > 			<param-name>application</param-name>
> >
> > <param-value>org.apache.struts.action.ActionResources</param-value>
> > 		</init-param>
> > 		<init-param>
> > 			<param-name>config</param-name>
> > 			<param-value>/action.xml</param-value>
> > 		</init-param>
> > 		<init-param>
> > 			<param-name>debug</param-name>
> > 			<param-value>0</param-value>
> > 		</init-param>
> > 	</servlet>
> > 	<servlet-mapping>
> > 		<servlet-name>action</servlet-name>
> > 		<url-pattern>*.do</url-pattern>
> > 	</servlet-mapping>
> > 	<welcome-file-list>
> > 		<welcome-file>index.jsp</welcome-file>
> > 	</welcome-file-list>
> > 	<taglib>
> > 		<taglib-uri>/config/struts.tld</taglib-uri>
> > 		<taglib-location>/WEB-INF/struts.tld</taglib-location>
> > 	</taglib>
> > 	<taglib>
> > 		<taglib-uri>/config/bm.tld</taglib-uri>
> > 		<taglib-location>/WEB-INF/bm.tld</taglib-location>
> > 	</taglib>
> > 	<login-config>
> > 		<auth-method>BASIC</auth-method>
> > 	</login-config>
> > </web-app>
> >
> >
> > Make sure you use the init-param for CONFIG and set the value to
> > /action.xml. It defaults to /WEB-INF/action.xml, and that won't work
> > presently with Orion.
> >
> > As to why this is happening, their is a misunderstanding of the
> > servlet 2.2
> > spec of the WAR format. A number of developers including the Orion team
> > believe the spec means that the servlet container can NOT server
> > anything in
> > the WEB-INF dir, even to its own servlets..thus they are not allowed to
> > access the WEB-INF dir. The code in Struts..I forget exactly..but
> > I believe
> > it uses getResource() call to get the xml config file loaded,
> and that is
> > what Orion is preventing from working. I did talk with the
> Orion team and
> > they are looking into the specific meaning of the WEB-INF
> > structure. Craig,
> > the developer of Struts has informed me that Danny Coward, the
> lead on the
> > servlet 2.2 spec confirms that the WEB-INF dir is accessible via
> > the servlet
> > container. Tomcat supports this, and Craig is part of the Apache/Jakarta
> > project..which uses Tomcat for development (is this right Craig? ;).
> >
> > Other servlet engines including JRUN, Resing and WebLogic do
> allow WEB-INF
> > access, so I think Orion will change to allow this. They are
> > working on EJB
> > 2.0, admin tools, and Serlvete 2.3, JSP 1.2 already for Orion,
> so I don't
> > know if they will add this to 1.0 (update), or later versions for
> > those that
> > want to start using the new features Orion already implements (which is
> > going to be part of J2EE 1.3).
> >
> > Oh yeah..I set up an application with a META-INF dir too..but you
> > can deploy
> > just a .war or an expanded WAR formatted dir structure as well.
> >
> > If you have any trouble..feel free to ask. I use Orion
> > exclusively as its by
> > far the best product I have seen, especially considering the price,
> > performance and feature set. It may not package development tools
> > and fancy
> > GUI tools, but it is certainly the easiest app server I have
> ever set up,
> > and its performance thus far is much higher than every other
> engine I have
> > tried (WebLogic, IIS/JRUN, ServletExec, Resin, Apache/JServ).
> > Resin is very
> > fast too..but Orion is slightly ahead of it..and it supports full J2EE
> > deployment.
> >
> > Hope that helps.
> >
>


RE: Struts with Orion

Posted by Kevin Duffey <kd...@buymedia.com>.
Hi,

> I agree for the README.  But to validate what I write, it would
> sure be nice if
> there was a cookbook for adding a deploying a web app on Orion.
> I'm sure it's
> there in the docs, but it was not obvious to me on first reading.
>
> What Orion config files to you have to change?????

Well, generally you can add a web app by just putting in a <web-app..> tag
in the confid/default-web-app.xml file. But I am not one to keep my files in
the servers dir structure. How about this..I'll cook up a simple little WAR
app that is specific to Orion, with instructions on how to deploy it in
Orion 1.0. It may take a couple of days as I am very busy (usually writing
emails to the Struts list. ;), but it should be a simple app, a couple of
pages with web.xml, struts in it, etc. You don't mind me putting the
struts.jar and tld and action.xml in the jar do you?



Re: Struts with Orion

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Kevin Duffey wrote:

> Hi,
>
> I'll give you a "quick" one right now. However, what I don't think you
> should have to do in your readme is tell people how to install Orion
> properly, including figuring out getting an app to work. That is part of the
> Orion team's job. You should only be concerned with Struts with Orion.
>

I agree for the README.  But to validate what I write, it would sure be nice if
there was a cookbook for adding a deploying a web app on Orion.  I'm sure it's
there in the docs, but it was not obvious to me on first reading.

What Orion config files to you have to change?????

Craig


>
> So far, its very simple.
>
> - Download Struts
> - Unzip.
> - Move struts.jar into a web app's /WEB-INF/lib dir
> - Move struts.tld into a web app's /WEB-INF dir
> - Move actions.xml into a web app's "root" (www) dir
>
> Thats it. At least for me..it worked fine. I think the biggest problem right
> now is that most people are having a hard time getting Orion to work. Its
> easy once you figure it out (or get help) but until that time, their docs
> aren't that great in detail as to how to get it running for a web app (WAR),
> or an application (EAR).
>
> The above works for me every time..I don't think I missed anything..did I?
> :)
>
> > Mike Cannon-Brookes wrote:
> >
> > > Re: The index.jsp thing - this is a Struts problem. (Presumably because
> > > index.jsp is in the default welcome-file-list for Tomcat/JServ? I don't
> > > know)
> > >
> > > In the web.xml that comes with the WARs, index.jsp should be a
> > welcome file?
> > > (Welcome files are specified for each web app).
> > >
> > > Craig, can you add this ?
> > >
> >
> > Yep.  I just did.  Since Tomcat defines "index.jsp" as a welcome
> > file in it's
> > default config, I just assumed everyone did :-).  This is not in
> > the servlet
> > spec, so as of tonight's nightly build it will be defined
> > explicitly in the
> > web.xml for the example app.
> >
> > On the top of "Struts with Orion", if someone could consolidate
> > all the ideas
> > into a little "cookbook" style set of steps for installing Struts
> > and getting it
> > working, I'd love to include that in the README file (or a
> > separate file pointed
> > to by the README).  As many have pointed out, Orion is a powerful
> > and very fast
> > platform for web applications to run on, so I'd like to avoid any
> > frustrations
> > installing Struts that I can.
> >
> > Same goes for any idiosyncracies on any other servers as well.
> >
> > >
> > > Cheers,
> > > Mike
> >
> > Craig McClanahan
> >
> >
> >
> >
> >


RE: Struts with Orion

Posted by Kevin Duffey <kd...@buymedia.com>.
Hi,

I'll give you a "quick" one right now. However, what I don't think you
should have to do in your readme is tell people how to install Orion
properly, including figuring out getting an app to work. That is part of the
Orion team's job. You should only be concerned with Struts with Orion.


So far, its very simple.

- Download Struts
- Unzip.
- Move struts.jar into a web app's /WEB-INF/lib dir
- Move struts.tld into a web app's /WEB-INF dir
- Move actions.xml into a web app's "root" (www) dir

Thats it. At least for me..it worked fine. I think the biggest problem right
now is that most people are having a hard time getting Orion to work. Its
easy once you figure it out (or get help) but until that time, their docs
aren't that great in detail as to how to get it running for a web app (WAR),
or an application (EAR).

The above works for me every time..I don't think I missed anything..did I?
:)


> Mike Cannon-Brookes wrote:
>
> > Re: The index.jsp thing - this is a Struts problem. (Presumably because
> > index.jsp is in the default welcome-file-list for Tomcat/JServ? I don't
> > know)
> >
> > In the web.xml that comes with the WARs, index.jsp should be a
> welcome file?
> > (Welcome files are specified for each web app).
> >
> > Craig, can you add this ?
> >
>
> Yep.  I just did.  Since Tomcat defines "index.jsp" as a welcome
> file in it's
> default config, I just assumed everyone did :-).  This is not in
> the servlet
> spec, so as of tonight's nightly build it will be defined
> explicitly in the
> web.xml for the example app.
>
> On the top of "Struts with Orion", if someone could consolidate
> all the ideas
> into a little "cookbook" style set of steps for installing Struts
> and getting it
> working, I'd love to include that in the README file (or a
> separate file pointed
> to by the README).  As many have pointed out, Orion is a powerful
> and very fast
> platform for web applications to run on, so I'd like to avoid any
> frustrations
> installing Struts that I can.
>
> Same goes for any idiosyncracies on any other servers as well.
>
> >
> > Cheers,
> > Mike
>
> Craig McClanahan
>
>
>
>
>


RE: Struts with Orion

Posted by Mike Cannon-Brookes <mi...@bookmarkbox.com>.
I wrote in with a cookbook yesterday - it's very simple - only 4 steps. Are
there archives? I can't find them - they sure would be useful.

I'll resend the cookbook when I get to work today (about 2 hours) and try to
add more detail. The only 'problem' on Struts end is the placement of
action.xml/database.xml in the /WEB-INF directory - which has been discussed
here - but it is VERY easy to solve.

Cookbook coming up.

Mike

> -----Original Message-----
> From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
> Sent: Tuesday, 27 June 2000 3:27
> To: struts-user@jakarta.apache.org
> Subject: Re: Struts with Orion
>
>
> Mike Cannon-Brookes wrote:
>
> > Re: The index.jsp thing - this is a Struts problem. (Presumably because
> > index.jsp is in the default welcome-file-list for Tomcat/JServ? I don't
> > know)
> >
> > In the web.xml that comes with the WARs, index.jsp should be a
> welcome file?
> > (Welcome files are specified for each web app).
> >
> > Craig, can you add this ?
> >
>
> Yep.  I just did.  Since Tomcat defines "index.jsp" as a welcome
> file in it's
> default config, I just assumed everyone did :-).  This is not in
> the servlet
> spec, so as of tonight's nightly build it will be defined
> explicitly in the
> web.xml for the example app.
>
> On the top of "Struts with Orion", if someone could consolidate
> all the ideas
> into a little "cookbook" style set of steps for installing Struts
> and getting it
> working, I'd love to include that in the README file (or a
> separate file pointed
> to by the README).  As many have pointed out, Orion is a powerful
> and very fast
> platform for web applications to run on, so I'd like to avoid any
> frustrations
> installing Struts that I can.
>
> Same goes for any idiosyncracies on any other servers as well.
>
> >
> > Cheers,
> > Mike
>
> Craig McClanahan
>
>
>
>


Re: Struts with Orion

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Mike Cannon-Brookes wrote:

> Re: The index.jsp thing - this is a Struts problem. (Presumably because
> index.jsp is in the default welcome-file-list for Tomcat/JServ? I don't
> know)
>
> In the web.xml that comes with the WARs, index.jsp should be a welcome file?
> (Welcome files are specified for each web app).
>
> Craig, can you add this ?
>

Yep.  I just did.  Since Tomcat defines "index.jsp" as a welcome file in it's
default config, I just assumed everyone did :-).  This is not in the servlet
spec, so as of tonight's nightly build it will be defined explicitly in the
web.xml for the example app.

On the top of "Struts with Orion", if someone could consolidate all the ideas
into a little "cookbook" style set of steps for installing Struts and getting it
working, I'd love to include that in the README file (or a separate file pointed
to by the README).  As many have pointed out, Orion is a powerful and very fast
platform for web applications to run on, so I'd like to avoid any frustrations
installing Struts that I can.

Same goes for any idiosyncracies on any other servers as well.

>
> Cheers,
> Mike

Craig McClanahan





RE: Struts with Orion

Posted by Mike Cannon-Brookes <mc...@internet.com>.
Re: The index.jsp thing - this is a Struts problem. (Presumably because
index.jsp is in the default welcome-file-list for Tomcat/JServ? I don't
know)

In the web.xml that comes with the WARs, index.jsp should be a welcome file?
(Welcome files are specified for each web app).

Craig, can you add this ?

Cheers,
Mike

-----Original Message-----
From: Kevin Duffey [mailto:kduffey@buymedia.com]
Hi,


> Thanks much for the reply -- I too like Orion a lot and think
> it's theme of
> never shutting down the server is where things need to be.  I'm trying to
> get struts-example and struts-documentation to work in Orion.  Neither of
> these projects have an app or www directory -- just META-INF and
> WEB-INF at
> the base of the .war file.  So where would you put action.xml in
> this case?
> I'll play around and thanks in advance for any additional suggestions.

Sure thing. Like I said before..as far as I know, Orion does not yet support
/WEB-INF/ access from servlets..unless you use file IO..not a good choice.
So, you might have to unjar the application, move action.xml into the "base"
dir (the one that the WEB-INF dir is in), and then jar it up (and rename it
to .war) and try that. Also, like someone else said, make sure the
welcome-file-list is set to use index.jsp, and that tools.jar is in your
Orion root dir.



RE: Struts with Orion

Posted by Kevin Duffey <kd...@buymedia.com>.
Hi,


> Thanks much for the reply -- I too like Orion a lot and think
> it's theme of
> never shutting down the server is where things need to be.  I'm trying to
> get struts-example and struts-documentation to work in Orion.  Neither of
> these projects have an app or www directory -- just META-INF and
> WEB-INF at
> the base of the .war file.  So where would you put action.xml in
> this case?
> I'll play around and thanks in advance for any additional suggestions.

Sure thing. Like I said before..as far as I know, Orion does not yet support
/WEB-INF/ access from servlets..unless you use file IO..not a good choice.
So, you might have to unjar the application, move action.xml into the "base"
dir (the one that the WEB-INF dir is in), and then jar it up (and rename it
to .war) and try that. Also, like someone else said, make sure the
welcome-file-list is set to use index.jsp, and that tools.jar is in your
Orion root dir.


RE: Struts with Orion

Posted by Philip Eskelin <ph...@eskelin.com>.
Kevin,

Thanks much for the reply -- I too like Orion a lot and think it's theme of
never shutting down the server is where things need to be.  I'm trying to
get struts-example and struts-documentation to work in Orion.  Neither of
these projects have an app or www directory -- just META-INF and WEB-INF at
the base of the .war file.  So where would you put action.xml in this case?
I'll play around and thanks in advance for any additional suggestions.

Regards,
Philip

> -----Original Message-----
> From: Kevin Duffey [mailto:kduffey@buymedia.com]
> Sent: Sunday, June 25, 2000 2:10 AM
> To: struts-user@jakarta.apache.org; philip@eskelin.com
> Subject: RE: Struts with Orion
>
>
> Hi,
>
> Yeah..I had a little bit of a problem too with Orion. As it turns
> out, Orion
> does NOT allow the servlet container serlvets to access anything
> in WEB-INF
> dir, so the examples were not working. However, I am using Struts
> with Orion
> 1.0 release just fine. What I had to do is move action.xml into my www
> folder (of my .WAR directory structure), and I did put struts.tld in the
> WEB-INF dir, compiled my code to WEB-INF/classes, and put
> struts.jar in the
> WEB-INF/lib dir.
>
> app/www/action.xml - struts config file
> app/www/WEB-INF/classes - compiled class code (Servlets, javabeans, core
> classes, etc)
> app/www/WEB-INF/lib/struts.jar  - struts library
> app/www/WEB-INF/struts.tld  - struts tag-lib library
>
> Also, I have the following in web.xml for Orion specifically:
>
> <?xml version="1.0"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
> 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
>
> <web-app>
> 	<servlet>
> 		<servlet-name>action</servlet-name>
> 		<display-name>action</display-name>
>
> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
> 		<init-param>
> 			<param-name>mapping</param-name>
>
> <param-value>org.apache.struts.action.ActionMappingBase</param-value>
> 		</init-param>
> 		<init-param>
> 			<param-name>application</param-name>
>
> <param-value>org.apache.struts.action.ActionResources</param-value>
> 		</init-param>
> 		<init-param>
> 			<param-name>config</param-name>
> 			<param-value>/action.xml</param-value>
> 		</init-param>
> 		<init-param>
> 			<param-name>debug</param-name>
> 			<param-value>0</param-value>
> 		</init-param>
> 	</servlet>
> 	<servlet-mapping>
> 		<servlet-name>action</servlet-name>
> 		<url-pattern>*.do</url-pattern>
> 	</servlet-mapping>
> 	<welcome-file-list>
> 		<welcome-file>index.jsp</welcome-file>
> 	</welcome-file-list>
> 	<taglib>
> 		<taglib-uri>/config/struts.tld</taglib-uri>
> 		<taglib-location>/WEB-INF/struts.tld</taglib-location>
> 	</taglib>
> 	<taglib>
> 		<taglib-uri>/config/bm.tld</taglib-uri>
> 		<taglib-location>/WEB-INF/bm.tld</taglib-location>
> 	</taglib>
> 	<login-config>
> 		<auth-method>BASIC</auth-method>
> 	</login-config>
> </web-app>
>
>
> Make sure you use the init-param for CONFIG and set the value to
> /action.xml. It defaults to /WEB-INF/action.xml, and that won't work
> presently with Orion.
>
> As to why this is happening, their is a misunderstanding of the
> servlet 2.2
> spec of the WAR format. A number of developers including the Orion team
> believe the spec means that the servlet container can NOT server
> anything in
> the WEB-INF dir, even to its own servlets..thus they are not allowed to
> access the WEB-INF dir. The code in Struts..I forget exactly..but
> I believe
> it uses getResource() call to get the xml config file loaded, and that is
> what Orion is preventing from working. I did talk with the Orion team and
> they are looking into the specific meaning of the WEB-INF
> structure. Craig,
> the developer of Struts has informed me that Danny Coward, the lead on the
> servlet 2.2 spec confirms that the WEB-INF dir is accessible via
> the servlet
> container. Tomcat supports this, and Craig is part of the Apache/Jakarta
> project..which uses Tomcat for development (is this right Craig? ;).
>
> Other servlet engines including JRUN, Resing and WebLogic do allow WEB-INF
> access, so I think Orion will change to allow this. They are
> working on EJB
> 2.0, admin tools, and Serlvete 2.3, JSP 1.2 already for Orion, so I don't
> know if they will add this to 1.0 (update), or later versions for
> those that
> want to start using the new features Orion already implements (which is
> going to be part of J2EE 1.3).
>
> Oh yeah..I set up an application with a META-INF dir too..but you
> can deploy
> just a .war or an expanded WAR formatted dir structure as well.
>
> If you have any trouble..feel free to ask. I use Orion
> exclusively as its by
> far the best product I have seen, especially considering the price,
> performance and feature set. It may not package development tools
> and fancy
> GUI tools, but it is certainly the easiest app server I have ever set up,
> and its performance thus far is much higher than every other engine I have
> tried (WebLogic, IIS/JRUN, ServletExec, Resin, Apache/JServ).
> Resin is very
> fast too..but Orion is slightly ahead of it..and it supports full J2EE
> deployment.
>
> Hope that helps.
>


RE: Struts with Orion

Posted by Kevin Duffey <kd...@buymedia.com>.
Hi,

Yeah..I had a little bit of a problem too with Orion. As it turns out, Orion
does NOT allow the servlet container serlvets to access anything in WEB-INF
dir, so the examples were not working. However, I am using Struts with Orion
1.0 release just fine. What I had to do is move action.xml into my www
folder (of my .WAR directory structure), and I did put struts.tld in the
WEB-INF dir, compiled my code to WEB-INF/classes, and put struts.jar in the
WEB-INF/lib dir.

app/www/action.xml - struts config file
app/www/WEB-INF/classes - compiled class code (Servlets, javabeans, core
classes, etc)
app/www/WEB-INF/lib/struts.jar  - struts library
app/www/WEB-INF/struts.tld  - struts tag-lib library

Also, I have the following in web.xml for Orion specifically:

<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
	<servlet>
		<servlet-name>action</servlet-name>
		<display-name>action</display-name>
		<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
		<init-param>
			<param-name>mapping</param-name>
			<param-value>org.apache.struts.action.ActionMappingBase</param-value>
		</init-param>
		<init-param>
			<param-name>application</param-name>
			<param-value>org.apache.struts.action.ActionResources</param-value>
		</init-param>
		<init-param>
			<param-name>config</param-name>
			<param-value>/action.xml</param-value>
		</init-param>
		<init-param>
			<param-name>debug</param-name>
			<param-value>0</param-value>
		</init-param>
	</servlet>
	<servlet-mapping>
		<servlet-name>action</servlet-name>
		<url-pattern>*.do</url-pattern>
	</servlet-mapping>
	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>
	<taglib>
		<taglib-uri>/config/struts.tld</taglib-uri>
		<taglib-location>/WEB-INF/struts.tld</taglib-location>
	</taglib>
	<taglib>
		<taglib-uri>/config/bm.tld</taglib-uri>
		<taglib-location>/WEB-INF/bm.tld</taglib-location>
	</taglib>
	<login-config>
		<auth-method>BASIC</auth-method>
	</login-config>
</web-app>


Make sure you use the init-param for CONFIG and set the value to
/action.xml. It defaults to /WEB-INF/action.xml, and that won't work
presently with Orion.

As to why this is happening, their is a misunderstanding of the servlet 2.2
spec of the WAR format. A number of developers including the Orion team
believe the spec means that the servlet container can NOT server anything in
the WEB-INF dir, even to its own servlets..thus they are not allowed to
access the WEB-INF dir. The code in Struts..I forget exactly..but I believe
it uses getResource() call to get the xml config file loaded, and that is
what Orion is preventing from working. I did talk with the Orion team and
they are looking into the specific meaning of the WEB-INF structure. Craig,
the developer of Struts has informed me that Danny Coward, the lead on the
servlet 2.2 spec confirms that the WEB-INF dir is accessible via the servlet
container. Tomcat supports this, and Craig is part of the Apache/Jakarta
project..which uses Tomcat for development (is this right Craig? ;).

Other servlet engines including JRUN, Resing and WebLogic do allow WEB-INF
access, so I think Orion will change to allow this. They are working on EJB
2.0, admin tools, and Serlvete 2.3, JSP 1.2 already for Orion, so I don't
know if they will add this to 1.0 (update), or later versions for those that
want to start using the new features Orion already implements (which is
going to be part of J2EE 1.3).

Oh yeah..I set up an application with a META-INF dir too..but you can deploy
just a .war or an expanded WAR formatted dir structure as well.

If you have any trouble..feel free to ask. I use Orion exclusively as its by
far the best product I have seen, especially considering the price,
performance and feature set. It may not package development tools and fancy
GUI tools, but it is certainly the easiest app server I have ever set up,
and its performance thus far is much higher than every other engine I have
tried (WebLogic, IIS/JRUN, ServletExec, Resin, Apache/JServ). Resin is very
fast too..but Orion is slightly ahead of it..and it supports full J2EE
deployment.

Hope that helps.