[ANN] Spring Framework Integration Library

2003-10-17 Thread Don Brown
This project integrates the Spring Framework's Inversion of Control (IoC)
into Struts 1.1+. It allows a Struts application to take advantage of IoC
with little or no references to Spring. Now, instead of relying on
singletons and static factories, Struts actions can have their
dependencies automatically resolved.

The integration uses Spring to create and populate Struts actions, using
IoC to resolve dependencies. It does NOT use a custom request processor
and therefore can be more easily used with existing web applications
and/or other Struts extensions.

To demonstrate the project, I modified the Struts-Example web app that is
distributed with Struts 1.1 to use Spring to resolve all UserDatabase
dependencies automatically. I invite any comments and suggestions.

Website:  http://www.twdata.org/struts-spring
Download: http://www.twdata.org/struts-spring/struts-spring-0.1.zip

Spring:   http://www.springframework.org

Don

PS. This functionality adds under 100k to a Struts application


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[ANN] Wildcard-Matched Actions

2003-06-08 Thread Don Brown
This project allows wildcards to be used in Struts 1.1+ action mappings. The 
wildcard-matched values can then be substituted in the values of various 
Struts action mapping and action forward attributes. It uses the wildcard 
matching class from Apache Cocoon which is the default matching class used to 
match XML transformation pipelines.

The bottom line of this project is you can write generic actions that can be 
used to match multiple actions. Even the "type" attribute which specifies the 
Action class can have wildcard-matched values substituted to match multiple 
Action classes for one action mapping. It also works great for Struts 
applications that use DispatchActions or other generic Actions.

For example:

   




Project page:  http://www.twdata.org/struts-wildcard/

Comments and suggestions always welcome.

Don

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[ANN] Scripting Actions with BSF

2003-03-25 Thread Don Brown
I put together some code that allows Struts Actions to be written in the
scripting language of one's choice rather than as Java classes. It uses
the Beans Scripting Framework to allow scripts to be written in any
language BSF supports like Perl, Python, Ruby, JavaScript, BeanShell, and
I believe even VBScript. Currently, I've hardcoded it to use BeanShell,
but support for other languages will be soon coming.

In addition to the code, I modified the Struts example to exclusively use
scripted Actions.  I've never written BeanShell before today, so I'm sure
there are plenty of areas to improve.

As fate would have it, as I finished the struts-example demo, idle
googling found another project doing the same thing in pretty much the
same way: IBM Alphaworks Struts Scripting. Unfortunately, I don't believe
IBM's license is exactly open source, so perhaps there is still a need for
this project. If anyone knows anything further, please, do share.

Comments, suggestions, contributions welcome.

http://www.twdata.org/struts-bsf

Don


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Struts and Cocoon Integration

2003-03-07 Thread Don Brown
Ah, I see what you are talking about.  How about this:

- Add a set-property to the plugin like
   
- If present, only paths that end in the specified suffix will be
forwarded to Cocoon first, and all others handled by Struts normally.
- If not present, pass every request to Cocoon first.

Good idea.  It looks like I better fire up a real project and all its
trappings.  Again, thanks for the good feedback and ideas.

Don

On 7 Mar 2003, Dave Patton wrote:

> Yes.  That was the idea was to modify the plugin so you can specify
> either Struts or Cocoon as the front end.  If it is Struts, then just
> route all *.(whatever) requests to Cocoon.  If Cocoon is first then
> proceed as you have it now?  What do you think?
>
> Dave Patton
>
>
> On Fri, 2003-03-07 at 10:42, Don Brown wrote:
>
> > Exactly.  When performance is key, you can have Struts use JSP directly.
> > Of course, with how the plugin is now, the request will still be sent to
> > Cocoon which would reject it.  As for the processing time it takes for
> > Cocoon to reject it, I don't know.  My guess is it would depend on whether
> > Cocoon was using compiled sitemaps or not.
> >
> > Again, of course you could rewrite the plugin so it only processes
> > requests ending with "coc", but then you couldn't wrap existing struts
> > applications without modifying all the forwards in struts-config.xml.
> >
> > Don
> >
> > On 7 Mar 2003, Dave Patton wrote:
> >
> > > But if performance is a concern, shouldnt I user Struts as the front end
> > > and then provide a mapping for all *.xml (or whatever other pattern I
> > > use) requests to the cocoon servlets?  This way I only incur the cocoon
> > > performance penalty on those requests which absolutely require cocoon?
> > > Im sure there are more ways to skin this cat.
> > >
> > > Dave Patton
> > >
> > > On Fri, 2003-03-07 at 01:36, ROSSEL Olivier wrote:
> > >
> > > > > There are at least two ways to handle the forwards:
> > > > > explicitly using some
> > > > > sort of suffix/prefix (e.g. all paths that end in ".coc" will
> > > > > be handled
> > > > > by the cocoon plugin) or simply pass all the request first to
> > > > > cocoon and
> > > > > if cocoon doesn't handle it, process it normally.  The stxx plugin
> > > > > (http://sf.net/projects/stxx) uses the former while I chose
> > > > > the latter.
> > > > > In my implementation, if you don't create a pipeline to match
> > > > > the forward,
> > > > > it is processed by Struts normally.  It is trival to write code to use
> > > > > either method.
> > > > >
> > > > > Hope that helps.
> > > >
> > > > Cocoon has an impressive URl management system (for example, it can trigger
> > > > not on the URL but on some combination of request parameters if you want :-)
> > > > So Cocoon as the front-end is the best, IMHO.
> > > >
> > > > This e-mail is intended only for the above addressee. It may contain
> > > > privileged information. If you are not the addressee you must not copy,
> > > > distribute, disclose or use any of the information in it. If you have
> > > > received it in error please delete it and immediately notify the sender.
> > > > Security Notice: all e-mail, sent to or from this address, may be
> > > > accessed by someone other than the recipient, for system management and
> > > > security reasons. This access is controlled under Regulation of
> > > > Investigatory Powers Act 2000, Lawful Business Practises.
> > > >
> > > > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > > _
> > > David H. Patton
> > > [EMAIL PROTECTED]
> > > (202) 276-8998 - pcs
> > >
> > > -BEGIN PGP PUBLIC KEY BLOCK-
> > >
> > > Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
> > >
> > > mQENBDui6osBCADP9OqVftQ2qxZz2fsxEf6GT6V2Fu0c2iIIMeWGyc5Pwl+xXe2w
> > > 3wx2pmNkLy3Zjp2/5q4nhvJd/GVn5gRR9OVTKgAz4o+xcOcAVIbgz3xFICbLozKa
> > > 2aZOUDtOu0TuYGhI9iIeGuPjnMjsS38EfZQ2DWwd+p5UW6wnsSuG7xniUT372v8w
> > > YrtUwnKQwjRUGUlZoX1zwv

RE: Struts and Cocoon Integration

2003-03-07 Thread Don Brown
Exactly.  When performance is key, you can have Struts use JSP directly.
Of course, with how the plugin is now, the request will still be sent to
Cocoon which would reject it.  As for the processing time it takes for
Cocoon to reject it, I don't know.  My guess is it would depend on whether
Cocoon was using compiled sitemaps or not.

Again, of course you could rewrite the plugin so it only processes
requests ending with "coc", but then you couldn't wrap existing struts
applications without modifying all the forwards in struts-config.xml.

Don

On 7 Mar 2003, Dave Patton wrote:

> But if performance is a concern, shouldnt I user Struts as the front end
> and then provide a mapping for all *.xml (or whatever other pattern I
> use) requests to the cocoon servlets?  This way I only incur the cocoon
> performance penalty on those requests which absolutely require cocoon?
> Im sure there are more ways to skin this cat.
>
> Dave Patton
>
> On Fri, 2003-03-07 at 01:36, ROSSEL Olivier wrote:
>
> > > There are at least two ways to handle the forwards:
> > > explicitly using some
> > > sort of suffix/prefix (e.g. all paths that end in ".coc" will
> > > be handled
> > > by the cocoon plugin) or simply pass all the request first to
> > > cocoon and
> > > if cocoon doesn't handle it, process it normally.  The stxx plugin
> > > (http://sf.net/projects/stxx) uses the former while I chose
> > > the latter.
> > > In my implementation, if you don't create a pipeline to match
> > > the forward,
> > > it is processed by Struts normally.  It is trival to write code to use
> > > either method.
> > >
> > > Hope that helps.
> >
> > Cocoon has an impressive URl management system (for example, it can trigger
> > not on the URL but on some combination of request parameters if you want :-)
> > So Cocoon as the front-end is the best, IMHO.
> >
> > This e-mail is intended only for the above addressee. It may contain
> > privileged information. If you are not the addressee you must not copy,
> > distribute, disclose or use any of the information in it. If you have
> > received it in error please delete it and immediately notify the sender.
> > Security Notice: all e-mail, sent to or from this address, may be
> > accessed by someone other than the recipient, for system management and
> > security reasons. This access is controlled under Regulation of
> > Investigatory Powers Act 2000, Lawful Business Practises.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> _
> David H. Patton
> [EMAIL PROTECTED]
> (202) 276-8998 - pcs
>
> -BEGIN PGP PUBLIC KEY BLOCK-
>
> Version: PGPfreeware 7.0.3 for non-commercial use 
>
> mQENBDui6osBCADP9OqVftQ2qx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r+8HUlFmOwwZ1PGSSM83pM/
> NNZKDAdGUiBRKqC32oOhKacxb6cf4ta1kZ6GDZcqVo+5qlz4OtUKbRLtW5Y8tiFc
> PwkDePX/F1490V3YWgHVzwARAQABiQEiBBgBAgAMBQI7ouqNBRsMAAoJEOWQ
> 5D6nisB/8xsIAJLNUQC8SOQF5txBrO22W7uAJ9xU9RK66Pyf9a+KjdNf4rE6vK4n
> vhbSGmtoPB4bzOQ9RKpo8ihBQp1cY9mLnwuJDKSuzpkaOK5pd+bifwY20tweULR6
> 4rtU8uLL1H0eom2IBjSXhf4n8DEdyrGKKHYNO/GRLx/UHHcLEFvz+4buHrCPoiBP
> JwjS/Ifg5xc3nTJnZmG2HzapoRwgXxGitbNTArUZWkqHYLygA1/ilmnFs8POj/s+
> TD4wSuDlrwE2CE2O8XbRuRVPryzn8mXXdZ1pSwrrvZjRU5rnDRAOqhHZQQbudVd3
> XvnDDBDoURSqwDqnwOkoOSTC95aj+vy5WW0=
> =/zoc
>
> -END PGP PUBLIC KEY BLOCK-
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts and Cocoon Integration

2003-03-06 Thread Don Brown
There are at least two ways to handle the forwards: explicitly using some
sort of suffix/prefix (e.g. all paths that end in ".coc" will be handled
by the cocoon plugin) or simply pass all the request first to cocoon and
if cocoon doesn't handle it, process it normally.  The stxx plugin
(http://sf.net/projects/stxx) uses the former while I chose the latter.
In my implementation, if you don't create a pipeline to match the forward,
it is processed by Struts normally.  It is trival to write code to use
either method.

Hope that helps.

Don

On 6 Mar 2003, Dave Patton wrote:

> WOW!  That is good stuff man.  I have briefly taken a look at the site
> an am so far impressed.  A quick question though, and forgive me if
> you've already answered it:  Can I have Struts specify which requests
> will go to Cocoon and which will be processed noramally in Tomcat or
> other servlet engine?
>
> Dave Patton
>
> On Thu, 2003-03-06 at 00:27, Don Brown wrote:
>
> > Ah yes, it looks like I missed an unclosed  element hidden in the
> > application resources.  Thanks for pointing that out.  The example and
> > demo have been updated.
> >
> > Don
> >
> > On Thu, 6 Mar 2003, alexj wrote:
> >
> > > your demo don't work I got an exception every time I try to save
> > > datas.
> > >
> > > org.apache.jasper.JasperException: getOutputStream() has already been called
> > > for this response
> > >
> > > --
> > > Alexandre Jaquet
> > >
> > > - Original Message -
> > > From: "Don Brown" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Thursday, March 06, 2003 5:11 AM
> > > Subject: Struts and Cocoon Integration
> > >
> > >
> > > > I've developed a prototype of a Struts 1.1 plugin that integrates Cocoon
> > > > into the Struts framework.  Struts forwards are passed to Cocoon to be
> > > > rendered in Cocoon XML pipelines.  It combines the ease of use of Struts
> > > > with the power and flexibility of Cocoon.  If you've looked into using
> > > > Cocoon but was put off by its complexity, you might want to give this a
> > > > look.  To demonstrate the plugin, I've slightly modified the struts
> > > > example webapp to highlight how it could be used.
> > > >
> > > > More information, including how and why, and a demo, visit:
> > > > http://www.twdata.org/struts
> > > >
> > > > Any and all comments welcome.
> > > >
> > > > Don
> > > >
> > > >
> > > > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> _
> David H. Patton
> [EMAIL PROTECTED]
> (202) 276-8998 - pcs
>
> -BEGIN PGP PUBLIC KEY BLOCK-
>
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
>
> mQENBDui6osBCADP9OqVftQ2qxZz2fsxEf6GT6V2Fu0c2iIIMeWGyc5Pwl+xXe2w
> 3wx2pmNkLy3Zjp2/5q4nhvJd/GVn5gRR9OVTKgAz4o+xcOcAVIbgz3xFICbLozKa
> 2aZOUDtOu0TuYGhI9iIeGuPjnMjsS38EfZQ2DWwd+p5UW6wnsSuG7xniUT372v8w
> YrtUwnKQwjRUGUlZoX1zwvJj50xEzipyyHosMuzjoHme+d+MEECRhAK81p0487kl
> X0UMXBehnsFK1mjbtQgfy2fdk0KT4NxKSD5s8ojoSdJ7R5CMwvh1UM4v2aAEqKvE
> CYaCWrAfZ7+TQGHXu75ejJz1iIuUno1fVsgLABEBAAG0IkRhdmUgUGF0dG9uIDxk
> cGF0dG9uQG52ZW50dXJlLmNvbT6JAS4EEAECABgFAjui6osICwMJCAcCAQoCGQEF
> GwMACgkQ5ZDkPqeKwH9Xswf/aP2WGiAU+HFxV136uKW5oDtZtSvm0YuW69Ra
> A2dPKFPp6E7v+w2c7yEV4+ZkVxbfk+VOh3p1MpXR367nQl9C+jMAD7MvPU6/KI+T
> 5WDzzKEGsyxOI+GYeGRKO0ZAYITG9HxevvKa1GMHBwRYNr2Qv62ckkHTy5rdmzZe
> PFM/am8B9maH5gKg6oIqzJwfmvb+ll8DRbhfI25trLqzggifrFcZHkOwTVGLNfdM
> cPWK/Yu4dOLAKCow06q0G/tDmXNkcyx12R6Z4Y/cQ5Qyvt1WP+eQAM/HBJI8rR9c
> cxS80pEorJIx4a7x9EsiwmB8milqBrXqHN2GRe/PnZSM9czBK7kBDQQ7ouqNAQgA
> sWO4lchFwK6leJClCpdaCjL4oUGjiZorW+XG2YKtQW6a+oYlplcHFkMSibkTN6Jc
> RdPEkarRvJ7sj+UgsUfkj4//EtqARuHTXhnMlsjqISTXlS2l61fQFg1d0iwvinyV
> sq6lVDtrr7UBe2b5TOuoRe13CzGWyhNQafV1gMcpBx9KxNi24UowJiT+cJpnxMCu
>

Re: [OT] IDE / ERD modeling (Was: Re: struts IDE)

2003-03-06 Thread Don Brown
To add to that, I worked on porting a Struts builder application to a
jEdit plugin a while back.  The application had some issues I wasn't
comfortable with (unfortunately I don't remember what they were :)), so
I never quite finished it.  However, for the adventurous, the plugin is
here:
http://www.twdata.org/rivernorth/

Don

On Thu, 6 Mar 2003, Rick Reumann wrote:

> On 06 Mar 2003 11:44:06 -0500
> Becky Norum <[EMAIL PROTECTED]> wrote:
>
> > I've stayed quiet on this since I've used IDEs rarely.
>
> jEdit http://www.jedit.org
>
> It will do all you need and you choose the plugins you want. Want the
> XML validation - just download the XMl plugin, etc. It's the most
> customizable editor/IDE out there (at least that I've found).
>
>
>
> --
> Rick Reumann
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts and Cocoon Integration

2003-03-06 Thread Don Brown
Ah yes, it looks like I missed an unclosed  element hidden in the
application resources.  Thanks for pointing that out.  The example and
demo have been updated.

Don

On Thu, 6 Mar 2003, alexj wrote:

> your demo don't work I got an exception every time I try to save
> datas.
>
> org.apache.jasper.JasperException: getOutputStream() has already been called
> for this response
>
> --
> Alexandre Jaquet
>
> ----- Original Message -
> From: "Don Brown" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, March 06, 2003 5:11 AM
> Subject: Struts and Cocoon Integration
>
>
> > I've developed a prototype of a Struts 1.1 plugin that integrates Cocoon
> > into the Struts framework.  Struts forwards are passed to Cocoon to be
> > rendered in Cocoon XML pipelines.  It combines the ease of use of Struts
> > with the power and flexibility of Cocoon.  If you've looked into using
> > Cocoon but was put off by its complexity, you might want to give this a
> > look.  To demonstrate the plugin, I've slightly modified the struts
> > example webapp to highlight how it could be used.
> >
> > More information, including how and why, and a demo, visit:
> > http://www.twdata.org/struts
> >
> > Any and all comments welcome.
> >
> > Don
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts and Cocoon Integration

2003-03-05 Thread Don Brown
I've developed a prototype of a Struts 1.1 plugin that integrates Cocoon
into the Struts framework.  Struts forwards are passed to Cocoon to be
rendered in Cocoon XML pipelines.  It combines the ease of use of Struts
with the power and flexibility of Cocoon.  If you've looked into using
Cocoon but was put off by its complexity, you might want to give this a
look.  To demonstrate the plugin, I've slightly modified the struts
example webapp to highlight how it could be used.

More information, including how and why, and a demo, visit:
http://www.twdata.org/struts

Any and all comments welcome.

Don


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: merge Struts and stxx

2002-10-18 Thread Don Brown
>One drawback I see is that stxx includes the FOP processor (which
>further
>includes the Avalon logger), etc., and Struts might get overly large if
>it
>were to include stxx.  So perhaps the status quo of using Struts and
>importing stxx only when needed remains preferable.

Actually, the transformation part of stxx, the part that transforms the
xml, has been split into pluggable Transformers defined in a properties
file.  You can therefore just not use the FOP transformer if you don't
need it, relieving you of FOP, Batik, and Avalon dependencies.

If you only need html, wml, xhtml, or any other text-based format
transformations, stxx will only require itself, jdom.jar and recently
added commons-logging.jar and jakarta-oro.jar.  The jakarta-oro.jar could
easily be left out at runtime in a similiar manner as fop.

Don


--
To unsubscribe, e-mail:   
For additional commands, e-mail: