You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by BaTien Duong <ba...@dbgroups.com> on 2003/11/06 05:10:57 UTC

Re:Struts-chain

Howdy:

I am trying to get Struts-chain up and running. I follow the instruction 
of struts-chain in the cvs to build from the source:

export ANT_HOME=.../ant-1.6beta2
export JAVA_HOME=.../j2sdk1.4.2_02
export TOMCAT_HOME=.../tomcat-5.0.14

The build.properties is copied from the build.properties.sample
   servlet.home=.../common/lib
   struts.home=.../jakarta-struts-bin
   chain.home=.../cvs/jakarta-commons-sandbox/chain

export 
PATH=${PATH}:${JAVA_HOME}/bin:${ANT_HOME}/bin:${TOMCAT_HOME}/common/lib/servlet-api.jar:${TOMCAT_HOME}/server/lib/catalina-ant.jar

execute the following command at the struts-chain directory
[-]$ ant clean dist

I got the error:
   /build.xml:54: taskdef class org.apache.catalina.ant.DeployTask could 
not be found

Please feed me the latest instruction to create struts-chain.war

Thanks
BaTien
DBGROUPS



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


Re: Struts-chain

Posted by "Craig R. McClanahan" <cr...@apache.org>.
Quoting BaTien Duong <ba...@dbgroups.com>:

> Thanks. I hacked it and got the job done.
> 
> It is a great job Craig. Your vision proves to be on the target again.
> 
> By the way, file upload is a very important aspect of Struts 
> applications. I will look closely into it. But is there any serious 
> reason while file-upload is *NOT SUPPORTED YET* in the struts-chain?
> 

It's only NOT SUPPORTED YET because nobody has done the work to support it :-). 
Feel free to take a crack at this, but it's probably going to be somewhat more
involved than some of the other functionality, to replicate or replace the way
that the standard FileUpload functionality wraps the servlet request.

If it were up to me, I'd just implement file upload as a Filter instead of
inside the framework, but that would mean requiring a Servlet 2.3 platform.


> On behalf of many developers, me included, thanks for your great effort. :-)
> 

You're welcome ... its going to be fun to see the various ways commons-chain
gets employed.

> BaTien
> DBGROUPS
> 

Craig


> Craig R. McClanahan wrote:
> 
> >Quoting BaTien Duong <ba...@dbgroups.com>:
> >
> >  
> >
> >>Howdy:
> >>
> >>I am trying to get Struts-chain up and running. I follow the instruction 
> >>of struts-chain in the cvs to build from the source:
> >>
> >>export ANT_HOME=.../ant-1.6beta2
> >>export JAVA_HOME=.../j2sdk1.4.2_02
> >>export TOMCAT_HOME=.../tomcat-5.0.14
> >>
> >>The build.properties is copied from the build.properties.sample
> >>   servlet.home=.../common/lib
> >>   struts.home=.../jakarta-struts-bin
> >>   chain.home=.../cvs/jakarta-commons-sandbox/chain
> >>
> >>export 
> >>
> >>    
> >>
>
>PATH=${PATH}:${JAVA_HOME}/bin:${ANT_HOME}/bin:${TOMCAT_HOME}/common/lib/servlet-api.jar:${TOMCAT_HOME}/server/lib/catalina-ant.jar
> >  
> >
> >>execute the following command at the struts-chain directory
> >>[-]$ ant clean dist
> >>
> >>I got the error:
> >>   /build.xml:54: taskdef class org.apache.catalina.ant.DeployTask could 
> >>not be found
> >>
> >>Please feed me the latest instruction to create struts-chain.war
> >>
> >>    
> >>
> >
> >Copy the "catalina-ant.jar" file from your Tomcat install's server/lib
> directory
> > into the "lib" directory of Ant.  This causes the Tomcat integration
> commands
> >to be recognized.
> >
> >  
> >
> >>Thanks
> >>BaTien
> >>DBGROUPS
> >>    
> >>
> >
> >Craig
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >.
> >
> >  
> >
> 
> 




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


Re: Struts-chain

Posted by BaTien Duong <ba...@dbgroups.com>.
Thanks. I hacked it and got the job done.

It is a great job Craig. Your vision proves to be on the target again.

By the way, file upload is a very important aspect of Struts 
applications. I will look closely into it. But is there any serious 
reason while file-upload is *NOT SUPPORTED YET* in the struts-chain?

On behalf of many developers, me included, thanks for your great effort. :-)

BaTien
DBGROUPS

Craig R. McClanahan wrote:

>Quoting BaTien Duong <ba...@dbgroups.com>:
>
>  
>
>>Howdy:
>>
>>I am trying to get Struts-chain up and running. I follow the instruction 
>>of struts-chain in the cvs to build from the source:
>>
>>export ANT_HOME=.../ant-1.6beta2
>>export JAVA_HOME=.../j2sdk1.4.2_02
>>export TOMCAT_HOME=.../tomcat-5.0.14
>>
>>The build.properties is copied from the build.properties.sample
>>   servlet.home=.../common/lib
>>   struts.home=.../jakarta-struts-bin
>>   chain.home=.../cvs/jakarta-commons-sandbox/chain
>>
>>export 
>>
>>    
>>
>PATH=${PATH}:${JAVA_HOME}/bin:${ANT_HOME}/bin:${TOMCAT_HOME}/common/lib/servlet-api.jar:${TOMCAT_HOME}/server/lib/catalina-ant.jar
>  
>
>>execute the following command at the struts-chain directory
>>[-]$ ant clean dist
>>
>>I got the error:
>>   /build.xml:54: taskdef class org.apache.catalina.ant.DeployTask could 
>>not be found
>>
>>Please feed me the latest instruction to create struts-chain.war
>>
>>    
>>
>
>Copy the "catalina-ant.jar" file from your Tomcat install's server/lib directory
> into the "lib" directory of Ant.  This causes the Tomcat integration commands
>to be recognized.
>
>  
>
>>Thanks
>>BaTien
>>DBGROUPS
>>    
>>
>
>Craig
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>.
>
>  
>


Re:Struts-chain

Posted by "Craig R. McClanahan" <cr...@apache.org>.
Quoting BaTien Duong <ba...@dbgroups.com>:

> Howdy:
> 
> I am trying to get Struts-chain up and running. I follow the instruction 
> of struts-chain in the cvs to build from the source:
> 
> export ANT_HOME=.../ant-1.6beta2
> export JAVA_HOME=.../j2sdk1.4.2_02
> export TOMCAT_HOME=.../tomcat-5.0.14
> 
> The build.properties is copied from the build.properties.sample
>    servlet.home=.../common/lib
>    struts.home=.../jakarta-struts-bin
>    chain.home=.../cvs/jakarta-commons-sandbox/chain
> 
> export 
>
PATH=${PATH}:${JAVA_HOME}/bin:${ANT_HOME}/bin:${TOMCAT_HOME}/common/lib/servlet-api.jar:${TOMCAT_HOME}/server/lib/catalina-ant.jar
> 
> execute the following command at the struts-chain directory
> [-]$ ant clean dist
> 
> I got the error:
>    /build.xml:54: taskdef class org.apache.catalina.ant.DeployTask could 
> not be found
> 
> Please feed me the latest instruction to create struts-chain.war
> 

Copy the "catalina-ant.jar" file from your Tomcat install's server/lib directory
 into the "lib" directory of Ant.  This causes the Tomcat integration commands
to be recognized.

> Thanks
> BaTien
> DBGROUPS

Craig



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


Re: Struts-chain

Posted by BaTien Duong <ba...@dbgroups.com>.
Vic Cekvenich wrote:

>
>
> BaTien Duong wrote:
>
>
>  i am able to have struts-chain example (the old
>
>> struts-example with struts-chain built from cvs) up and running using 
>> j2sdk1.4.2_02 and tomcat 5.0.14. 
>
>
>
> Where did you find an example of using a Struts chain?
>
> .V

The struts-example is in cvs/jakarta-struts/contrib/struts-chain
 or in the nightly built of struts-src /jakarta-struts/contrib/struts-chain

There is a built.properties and built.xml to create struts-example war 
file using struts-chain. The build process is terrible, so you need to 
hack it. Here are the steps i used:
    1) use maven to build jetspeed-2 so i get portlet-api-1.0.jar in my 
local .maven/repository. Do not use the one in struts-chain build (I 
thing 0.6-dev)
    2) use maven to build commons-chain, so i get commons-chain-0.1.jar 
in my local repository. Do not use the one in struts-chain build.
    3) Edit the build.properties using built.properties.sample in 
struts-chain directory with your appropriate settings.
    4) Edit the buiild.xml in struts-chain directory with your 
appropriate settings. Take out the whole section of Custom Tomcat 
Integration.
   5) Use *ant clean dist* command to run against the edited build.xml. 
Be patient and correct errors in the build process as you go along.
   6) The result of successful build is 
/struts-chain/build/webapps/example/ and
/struts-chain/dist/webapps/struts-chain.war that you can manually copy 
to tomcat/webapps directory and run sub app /struts-chain
  7) You may likely have a problem to get struts-example running under 
the new design of struts-chain. If this is the case, then compare 
contents of struts-chain and old struts-example. Copy the missing of 
.dtd and jar files from struts-example to struts-chain.

P.S. I hear you are also looking at HiveMind too. Let's see how we put 
struts-chain catalog(s) as a HiveMind service so we can combine the 
strength and simplicity of the 2 frameworks into a simple-practical 
solution.

BaTien
DBGROUPS

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


Re: Struts-chain

Posted by James Mitchell <jm...@apache.org>.
On Thu, 27 Nov 2003, Vic Cekvenich wrote:

> I tried to build to get the chain sample app... and I can't. I got the
> common and struts chain jars built.
>
> In order to build sample chains war... you have to get sturts to build
> from source... which requires you get commons-lib.home of CVS of jakarta
> commons and sandobox... yuck. (Maven build of Sturts is broken).

Actually, you don't have to build the commons stuff, just get the
latest binaries and reference them in your build.properties.

See build.properties.sample for what you have to do.


>
> If anyone (Batjen?) wants to e-mail me privetly the example war file
> great, tia.
>
> .V
>
> Craig R. McClanahan wrote:
> > Quoting Vic Cekvenich <ce...@baseBeans.com>:
> >
> >
> >>
> >>BaTien Duong wrote:
> >>
> >>
> >>  i am able to have struts-chain example (the old
> >>
> >>>struts-example with struts-chain built from cvs) up and running using
> >>>j2sdk1.4.2_02 and tomcat 5.0.14.
> >>
> >>
> >>Where did you find an example of using a Struts chain?
> >>
> >>.V
> >>
> >
> >
> > Download the jakarta-struts nightly source distro (or check it out from
> > anonymous CVS).  Then, start Tomcat and execute:
> >
> >   cd contrib/struts-chain
> >   ant install
> >
> > This builds a variation on the standard struts-example webapp that uses the
> > chain-based replacement for the standard RequestProcessor.
> >
> > Craig
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>

-- 
James Mitchell
Software Developer / Struts Evangelist
http://www.struts-atlanta.org


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


Re: Chain - not comatible

Posted by Greg Reddin <gr...@fnf.com>.
I worked around it by creating a new TilesPlugin that doesn't require a 
TilesRequestProcessor.

Another workaround would be to make ComposableRequestProcessor extend 
TilesRequestProcessor, but that kinda sucks.

Greg

Vic Cekvenich wrote:
> (thanks Batien for emailing the war).
> 
> When runing Struts Chain example I get a "Sepecified RequestProcessor is 
> not compatible with TilesRequestProcessor".
> 
> Is there a work arround?
> 
> (Tiles  and tilesaction are VERY important to my designs)
> 
> .V
> 
> (I am still just looking at examples.. still not sure how to write a 
> "hello world" chain)
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


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


Re: Chain - not comatible

Posted by BaTien Duong <ba...@dbgroups.com>.
Vic Cekvenich wrote:

> (thanks Batien for emailing the war).
>
> When runing Struts Chain example I get a "Sepecified RequestProcessor 
> is not compatible with TilesRequestProcessor".
>
> Is there a work arround?

I will take a look at it. It will take sometime since I am in the middle 
of a major business proposal. Hope others may have a solution sooner. 
Since Tiles is used by many Struts sites, Chain to work with Tiles is 
very critical before we can talk about other presentation frameworks. 
Cheer :-)

BaTien
DBGROUPS

>
> (Tiles  and tilesaction are VERY important to my designs)
>
> .V
>
> (I am still just looking at examples.. still not sure how to write a 
> "hello world" chain)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
> .
>



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


Re: Chain - not comatible

Posted by Ted Husted <hu...@apache.org>.
Vic Cekvenich wrote:
> (I am still just looking at examples.. still not sure how to write a 
> "hello world" chain)

There are two distinct things going on.

Commons Chain is a general-purpose implementation of the Chain of 
Responsibility pattern. It could be used by any Java application, 
library, or framework that needed to implement a Chain of Responsibility.

Once likely suspect for a Chain of Responsibility is the Struts 
RequestProcessor. So, as a proof of concept, we're working on a Struts 
Chain RequestProcessor. The goal here is to be able to plug it into 
Struts like any other RequestProcessor, without any Struts API changes. 
Then, at some point, we'd be likely to make Struts-Chain the default 
RequestProcessor, since it is more extensible than the 1.1 version.

To use Commons Chain in an application, you create a Context and pass it 
to a Command. The Command can then do whatever you like, including 
adding a "hello world" entry to the Context. The Context is then 
returned the caller.

In a web application, the context could simply be added to the request 
context, or used to populate an ActionForm or some other JavaBean.

In the web package of Chain, there is a generic Servlet and a generic 
Listener class that can be used to load a Catalog of Commands into 
application-scope. Then, all the Action has to do is lookup a given 
Command Chain in the Catalog, invoke it with the desired context, and 
place the result in request or session scope. Another approach would be 
to use the ServletWebContext, so that any changes the Command makes to 
the Context are reflected in request scope.

But, right now, both Struts-Chain and Commons-Chain are in the sandbox, 
mainly because we haven't finished doing the hello world examples :)

-Ted.


-- 
Ted Husted,
   Junit in Action  - <http://www.manning.com/massol/>,
   Struts in Action - <http://husted.com/struts/book.html>,
   JSP Site Design  - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.



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


Re: Chain - not comatible

Posted by Vic Cekvenich <ce...@basebeans.com>.
(thanks Batien for emailing the war).

When runing Struts Chain example I get a "Sepecified RequestProcessor is 
not compatible with TilesRequestProcessor".

Is there a work arround?

(Tiles  and tilesaction are VERY important to my designs)

.V

(I am still just looking at examples.. still not sure how to write a 
"hello world" chain)



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


Re: Struts-chain

Posted by Vic Cekvenich <ce...@baseBeans.com>.
I tried to build to get the chain sample app... and I can't. I got the 
common and struts chain jars built.

In order to build sample chains war... you have to get sturts to build 
from source... which requires you get commons-lib.home of CVS of jakarta 
commons and sandobox... yuck. (Maven build of Sturts is broken).

If anyone (Batjen?) wants to e-mail me privetly the example war file 
great, tia.

.V

Craig R. McClanahan wrote:
> Quoting Vic Cekvenich <ce...@baseBeans.com>:
> 
> 
>>
>>BaTien Duong wrote:
>>
>>
>>  i am able to have struts-chain example (the old
>>
>>>struts-example with struts-chain built from cvs) up and running using 
>>>j2sdk1.4.2_02 and tomcat 5.0.14. 
>>
>>
>>Where did you find an example of using a Struts chain?
>>
>>.V
>>
> 
> 
> Download the jakarta-struts nightly source distro (or check it out from
> anonymous CVS).  Then, start Tomcat and execute:
> 
>   cd contrib/struts-chain
>   ant install
> 
> This builds a variation on the standard struts-example webapp that uses the
> chain-based replacement for the standard RequestProcessor.
> 
> Craig



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


Re: Struts-chain

Posted by "Craig R. McClanahan" <cr...@apache.org>.
Quoting Vic Cekvenich <ce...@baseBeans.com>:

> 
> 
> BaTien Duong wrote:
> 
> 
>   i am able to have struts-chain example (the old
> > struts-example with struts-chain built from cvs) up and running using 
> > j2sdk1.4.2_02 and tomcat 5.0.14. 
> 
> 
> Where did you find an example of using a Struts chain?
> 
> .V
> 

Download the jakarta-struts nightly source distro (or check it out from
anonymous CVS).  Then, start Tomcat and execute:

  cd contrib/struts-chain
  ant install

This builds a variation on the standard struts-example webapp that uses the
chain-based replacement for the standard RequestProcessor.

Craig


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


Re: Struts-chain

Posted by Vic Cekvenich <ce...@baseBeans.com>.

BaTien Duong wrote:


  i am able to have struts-chain example (the old
> struts-example with struts-chain built from cvs) up and running using 
> j2sdk1.4.2_02 and tomcat 5.0.14. 


Where did you find an example of using a Struts chain?

.V



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


Re: Struts-chain

Posted by BaTien Duong <ba...@dbgroups.com>.
Howdy:

I want to congratulate Struts committers for a very fine work in 
Struts-chain and share some of my finding to those who want to get their 
feet wet in the CoR pattern.
   1) First, i am able to have struts-chain example (the old 
struts-example with struts-chain built from cvs) up and running using 
j2sdk1.4.2_02 and tomcat 5.0.14. Some hacks in the build process is 
required. I use both ant and maven.
   2) There is very little things to change in existing Struts 
application for running under the commons-chain. The design is very clean.
   3) IMHO, when struts-chain has full implementations for portlet, jsf 
and the buisiness layer (Ted Whiteboard), struts will definitely rock.  
The design pattern for struts-chain context is just simple thread-safe 
singleton. The performance can be better, especially when we move to the 
implementation for business layer, with cache and pool services. 
HiveMind may be a good companion.

BaTien
DBGROUPS
====================

Don Brown wrote:

>If you use the compile task (the default for the project), struts-chain
>will build without any dependencies on the tomcat ant lib.
>
>BTW, I'd recommend against cross posting...
>
>Don
>
>On Wed, 5 Nov 2003, BaTien Duong wrote:
>
>  
>
>>Howdy:
>>
>>I am trying to get Struts-chain up and running. I follow the instruction
>>of struts-chain in the cvs to build from the source:
>>
>>export ANT_HOME=.../ant-1.6beta2
>>export JAVA_HOME=.../j2sdk1.4.2_02
>>export TOMCAT_HOME=.../tomcat-5.0.14
>>
>>The build.properties is copied from the build.properties.sample
>>   servlet.home=.../common/lib
>>   struts.home=.../jakarta-struts-bin
>>   chain.home=.../cvs/jakarta-commons-sandbox/chain
>>
>>export
>>PATH=${PATH}:${JAVA_HOME}/bin:${ANT_HOME}/bin:${TOMCAT_HOME}/common/lib/servlet-api.jar:${TOMCAT_HOME}/server/lib/catalina-ant.jar
>>
>>execute the following command at the struts-chain directory
>>[-]$ ant clean dist
>>
>>I got the error:
>>   /build.xml:54: taskdef class org.apache.catalina.ant.DeployTask could
>>not be found
>>
>>Please feed me the latest instruction to create struts-chain.war
>>
>>Thanks
>>BaTien
>>DBGROUPS
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>.
>
>  
>


Re:Struts-chain

Posted by Don Brown <mr...@twdata.org>.
If you use the compile task (the default for the project), struts-chain
will build without any dependencies on the tomcat ant lib.

BTW, I'd recommend against cross posting...

Don

On Wed, 5 Nov 2003, BaTien Duong wrote:

> Howdy:
>
> I am trying to get Struts-chain up and running. I follow the instruction
> of struts-chain in the cvs to build from the source:
>
> export ANT_HOME=.../ant-1.6beta2
> export JAVA_HOME=.../j2sdk1.4.2_02
> export TOMCAT_HOME=.../tomcat-5.0.14
>
> The build.properties is copied from the build.properties.sample
>    servlet.home=.../common/lib
>    struts.home=.../jakarta-struts-bin
>    chain.home=.../cvs/jakarta-commons-sandbox/chain
>
> export
> PATH=${PATH}:${JAVA_HOME}/bin:${ANT_HOME}/bin:${TOMCAT_HOME}/common/lib/servlet-api.jar:${TOMCAT_HOME}/server/lib/catalina-ant.jar
>
> execute the following command at the struts-chain directory
> [-]$ ant clean dist
>
> I got the error:
>    /build.xml:54: taskdef class org.apache.catalina.ant.DeployTask could
> not be found
>
> Please feed me the latest instruction to create struts-chain.war
>
> Thanks
> BaTien
> DBGROUPS
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org