Re: The Forrest Option

2003-10-01 Thread Don Brown
On Tue, 30 Sep 2003, Robert Leland wrote:
snip /
 I prefer Maven because it provides builds, testing, QA tools, and site
 generation in one tool.
 The repository of binaries makes building a distribution or maven
 enabled site as easy as typeing,
 'maven' for new users.
 Changing the look/skin is straight forward, though as I say below I
 wouldn't invest alot of time
 tweaking it.

When you say one tool, you mean Maven plus any plugins that you need to do
what you want, like generate PDF.  Since there is a Forrest plugin for
Maven, you still get all the ease of use of Maven.

 My main question to the items below is 'which of these features would we
 use for the struts site'

 In short, Forrest offers these benefits over Maven's website generation:
 
  - Multiple output formats including PDF and HTML
 
 
 Maven has been doing this for a while now..

If you mean the PDF plugin, it seems from its page that all it does is
create one PDF of the whole site.  Can you create PDF's of each page,
sections containing multiple pages?  Its hard to evaluate the PDF plugin
as its documention is really lacking.

  - SVG to PNG rendering
  - Built for handling and aggregating multiple XML sources like RRS (soon
 wiki and Docbook)
 
 
 Maven currently handles RRS, Docbook, and a few other formats, including
 the ability to take a
 preexisting framed html like JavaDoc and take it apart and assemble it
 again with a .maven wrapper.
 What's the wiki thing, and why do you think that would be usefull ?.

The Wiki support currently in Forrest, albeit under construction, supports
the parsing of Wiki text files for rendering.  This allows the Wiki
information to be ran through the XML pipeline, most likely to end up as a
PDF. The ability to create PDF's out of wiki text would make wiki
information more useful, IMO.

 Could you give an example how multiple XML sources
 would be aggregated and used as a single source. How is this capability
 an advantage for
 the struts web site.

For example, currently, we have quite a few Struts extensions, example
applications, and related frameworks that I feel Struts could do a better
job of encouraging.  Instead of requiring an extension developer to submit
a patch to bugzilla to change a description or add their project to the
page, why not have a page that aggregates extension project's RSS
announcing new releases into a news-type page.  Giving extension projects
more exposure will generate more interest in finding ways to make Struts
better.  Look what it did for Maven :)

  - Power and features of Cocoon including charting, web services
 integration, scripting support, etc.
 
 
 Charting is nice. What types of charting do we get for free or almost
 free that would help
 with our site. I believe Maven can provide charts about bugs reports,

While I mentioned these as nice features to have available, I wouldn't
mind have a page of graphs and statistics showing downloads, new bugs,
percentage of bugs as enhancements, number of bugs to go before the next
release, etc.  In my experience, people love the concept of a dashboard
and what better way to get people more interested in fixing bugs?

 which I don't EVEN want to see ;-). How does web services/scripting fit
 into our needs?

The ability to embed small BSF-compatible scripts in the documentation
build process is a nice way to make something that would be more complex
using Ant/Jelly easy. Especially useful in something like the statistics I
mentioned earlier.


 Further, deciding between Forrest and Maven isn't an either/or situation.
 There exists a Forrest plugin for Maven and it would be easy to integrate
 Maven's reports into a Forrest site build.
 
 

 I am assuming this plugin uses the maven xml doc files and generates
 forrest docs ?

No, just as the xdoc plugin generates html from xdocs, the Forrest plugin
would generate a site from Forrest docs.  As hinted to earlier, it can
easily integrate into any generated documentation we'd like to keep from
Maven.


 To me, the key feature of Forrest is the first one listed, multiple
 outputs.  This is especially useful for documentation as PDF is much
 better than HTML for printing for the many users that like hard copies.
 
 
 Maven does this.

Again, I didn't see a way to do more than just generate one PDF for the
whole site, but of course, I could be wrong.

 Finally, Forrest content is built to be presented in not only multiple
 output formats, but multiple skins.  To demonstrate this, I've quickly
 redone the Struts site into Forrest format (which is very similiar to the
 current format thanks to the xhtml work of late).  I've only converted the
 menu and the main page, which should be sufficient.
 
 
 We only need one look, though I don't like the default Maven look, but
 not enough bothering changing it.
 We may customize it but we won't be changing it dynamically.

I only included these links to show how output-independant Forrest was as
it was asked in an earlier discussion if 

Re: The Forrest Option

2003-10-01 Thread Ted Husted
Don Brown wrote:
Further, deciding between Forrest and Maven isn't an either/or situation.
There exists a Forrest plugin for Maven and it would be easy to integrate
Maven's reports into a Forrest site build.
.../

If we did decide to go with Forrest, I'm willing to convert the old site
over and help handle any integration.  I'm most definately not an expert
at Forrest, but am familiar with Cocoon and thankfully, Forrest is pretty
easy.
+1

This sounds like a nice stepping stone. We can try Forrest now and 
migrate the build to Maven as soon as someone is ready to volunteer for 
that.

Outside of the Jakarta Commons Sandbox, Forrest and Maven are equally 
popular among other Apache products. Using both might be the best of 
both worlds.

-Ted.



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


Raising feature requests and fix suggestions - What's the accepted way.

2003-10-01 Thread Richard Tomlinson
Hi,

I've got a number of issues that I'd like to raise regarding feature requests with 
suggested fixes.  Can someone inform me of the best way to go about this?   I'd like 
to know what the process is to suggesting, raising and fixing features and problems so 
that they can be destined for the next release.

I'd like to initially tackle the following issues:

o  html:errors tag - Add the ability to specify the maximum number of errors to 
display rather than displaying all available errors.

o  html:link - Improve the way it handles multi-module support.  My previous message 
regading module support was unanswered.

o  Adding ActionMessages/ActionErrors from a specified resource bundle - I saw a patch 
for this that unfortunately didnt address the issue correctly (Bug 7892)

o  The addition of a ReloadableActionServlet to be used for development purposes.  I 
take note of the comments seen before regarding reloading and sync'ing requests so it 
would be useful for ONLY development purposes.  The gain in productivity is 
substantial when its possible to reload without restarting the container and a 
reloadable ActionServlet should be included in the distribution.   From a simple 
implementation it appears that there are clean-up problems needing to be addressed 
with the tiles factory and request processors being left in invalid states but still 
present in the ServletContext.   I'm also interested in support of real-time changes 
to modules without re-loading config to facilitate the use of CMS products in a large 
production environment.

Comments please.

Regards
Richard Tomlinson

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



Re: Raising feature requests and fix suggestions - What's the accepted way.

2003-10-01 Thread Ted Husted
To discuss whether a feature might be a good idea, you can post here. 
Though, it can take several days before everyone weighs in. We're all 
volunteers with real jobs. Many of us can only work on Struts on the 
weekends.

To raise and fix issues, you can post tickets to Bugzilla. This is where 
patches should go, so they don't get lost. If you have an alternate 
patch, you can append that to the same ticket.

If you strongly believe in an issue, you might have to lobby for it. 
This is often the case in open source. On another project, I had to make 
several followups over a two-week period before getting a three line 
patch committed. It's just the way things work on volunteer projects.

Bugzilla, the DEV list, and CVS are the only media that the committers 
use to develop Struts. Both Bugzilla and CVS are programmed to post 
changes to the DEV list, so everything that happens is reflected here.

See also

http://jakarta.apache.org/struts/using.html

http://jakarta.apache.org/site/getinvolved.html

http://jakarta.apache.org/struts/faqs/helping.html

-Ted.

Richard Tomlinson wrote:
Hi,

I've got a number of issues that I'd like to raise regarding feature requests with suggested fixes.  Can someone inform me of the best way to go about this?   I'd like to know what the process is to suggesting, raising and fixing features and problems so that they can be destined for the next release.

I'd like to initially tackle the following issues:

o  html:errors tag - Add the ability to specify the maximum number of errors to display rather than displaying all available errors.

o  html:link - Improve the way it handles multi-module support.  My previous message regading module support was unanswered.

o  Adding ActionMessages/ActionErrors from a specified resource bundle - I saw a patch for this that unfortunately didnt address the issue correctly (Bug 7892)

o  The addition of a ReloadableActionServlet to be used for development purposes.  I take note of the comments seen before regarding reloading and sync'ing requests so it would be useful for ONLY development purposes.  The gain in productivity is substantial when its possible to reload without restarting the container and a reloadable ActionServlet should be included in the distribution.   From a simple implementation it appears that there are clean-up problems needing to be addressed with the tiles factory and request processors being left in invalid states but still present in the ServletContext.   I'm also interested in support of real-time changes to modules without re-loading config to facilitate the use of CMS products in a large production environment.

Comments please.

Regards
Richard Tomlinson


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


Re: The Forrest Option

2003-10-01 Thread David Graham

--- Ted Husted [EMAIL PROTECTED] wrote:
 Don Brown wrote:
  Further, deciding between Forrest and Maven isn't an either/or
 situation.
  There exists a Forrest plugin for Maven and it would be easy to
 integrate
  Maven's reports into a Forrest site build.
 
 .../
 
  If we did decide to go with Forrest, I'm willing to convert the old
 site
  over and help handle any integration.  I'm most definately not an
 expert
  at Forrest, but am familiar with Cocoon and thankfully, Forrest is
 pretty
  easy.
 
 +1
 
 This sounds like a nice stepping stone. We can try Forrest now and 
 migrate the build to Maven as soon as someone is ready to volunteer for 
 that.
 
 Outside of the Jakarta Commons Sandbox, Forrest and Maven are equally 
 popular among other Apache products. Using both might be the best of 
 both worlds.

Or it may be a complete nightmare.  So then we would have Forrest, Maven,
and Ant builds all competing for attention.  I am definitely against using
multiple build processes; let's just pick one and stick with it. 

The Forrest features Don mentioned aren't significant to me and I'm
already familiar with Maven so I'm leaning towards Maven but I really
don't care as long as the build is as easy as maven jar or equivalent. 
But please let's not try to maintain multiple build processes.

David

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


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Re: The Forrest Option

2003-10-01 Thread Jeff Turner
decloak/

(it's sad the number of lists I lurk on)

Just thought I'd throw in a few points..

 - Forrest is *purely* a documentation tool.  It is comparable to Maven's
   xdoc plugin, not Maven itself.  Compared to the xdoc plugin, it is
   bigger, slower, more powerful.  Running Forrest feels like firing a
   BFG2000 in Quake.  Slow build-up, WHOOMPH, casualties everywhere.  If
   you don't kill yourself, the effects can be impressive.

 - Forrest does not assume responsibility for the whole website, just the
   parts it renders.  So a javadoc link would be added to the menu, but
   whatever calls Forrest would have to also call Javadoc.

 - Forrest has fine-grained PDF generation (per page or per set of
   pages), so you could partition off a section (the user manual for
   example) and generate a PDF (or one-page HTML) for just that section.

 - Forrest's Maven plugin is mostly unused and probably broken (it's in
   Forrest's JIRA if anyone wants to play).

 - Forrest is massive (13Mb of Cocoon jars) and command-line rendering
   relatively slow.  Implies that even if the plugin worked,
   'site:generate' could not be a commonly invoked goal.
 
 - Slowness of command-line rendering is irrelevant for daily editing,
   because:
- Most people would not need Forrest to develop docs.  Forrest
  completely separates content from presentation, with strong and
  stable contracts between (DTDs).  Doc writers can just write XML
  content, and if it validates, safely check it in.  Rendered results
  can be viewed (and committed to jakarta-site) through an online
  service like http://forrestbot.cocoondev.org.
- Forrest has a built-in Jetty server, so for writers wanting visual
  feedback, edited pages can be rerendered instantly with Cocoon.

 - *Lots* of stuff (charting, scripting etc) is possible with Cocoon but
   isn't in Forrest until we find a half-decent use-case.  Wiki rendering
   is so that you can integrate a Wiki's text files into a Forrest-built
   site: http://www.apache.org/~jefft/forrest/samples/wikirenderer-site/
   The latest thing to be pulled in from Cocoon is Lucene searching.


--Jeff

(Forrest developer / BFG vendor)


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



Re: The Forrest Option

2003-10-01 Thread Robert Leland
David Graham wrote:

The Forrest features Don mentioned aren't significant to me and I'm
already familiar with Maven so I'm leaning towards Maven but I really
don't care as long as the build is as easy as maven jar or equivalent. 
But please let's not try to maintain multiple build processes.
 

I was looking at the Forrest archives and it looks like they are in the 
early stages of creating
a build system. Until that time then it we have the choices of Maven,  
Maven + Forrest, or Forrest + Ant.

David



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


cvs commit: jakarta-struts/conf/share validator-rules.xml

2003-10-01 Thread rleland
rleland 2003/10/01 08:07:57

  Modified:conf/share validator-rules.xml
  Log:
  Bug reported to user list by Olivier Dutrieux
  
  Update validator-rules.xml to reflect the fact that
  the validate methods now take a ActionMessages
  not ActionErrors.
  
  Revision  ChangesPath
  1.42  +20 -20jakarta-struts/conf/share/validator-rules.xml
  
  Index: validator-rules.xml
  ===
  RCS file: /home/cvs/jakarta-struts/conf/share/validator-rules.xml,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- validator-rules.xml   26 Sep 2003 16:53:42 -  1.41
  +++ validator-rules.xml   1 Oct 2003 15:07:57 -   1.42
  @@ -52,7 +52,7 @@
methodParams=java.lang.Object,
  org.apache.commons.validator.ValidatorAction,
  org.apache.commons.validator.Field,
  -   org.apache.struts.action.ActionErrors,
  +   org.apache.struts.action.ActionMessages,
  javax.servlet.http.HttpServletRequest
 msg=errors.required
   
  @@ -149,7 +149,7 @@
methodParams=java.lang.Object,
  org.apache.commons.validator.ValidatorAction,
  org.apache.commons.validator.Field,
  -   org.apache.struts.action.ActionErrors,
  +   org.apache.struts.action.ActionMessages,
  org.apache.commons.validator.Validator,
  javax.servlet.http.HttpServletRequest
msg=errors.required
  @@ -162,7 +162,7 @@
methodParams=java.lang.Object,
  org.apache.commons.validator.ValidatorAction,
  org.apache.commons.validator.Field,
  -   org.apache.struts.action.ActionErrors,
  +   org.apache.struts.action.ActionMessages,
  org.apache.commons.validator.Validator,
  javax.servlet.http.HttpServletRequest/
   
  @@ -173,7 +173,7 @@
methodParams=java.lang.Object,
  org.apache.commons.validator.ValidatorAction,
  org.apache.commons.validator.Field,
  -   org.apache.struts.action.ActionErrors,
  +   org.apache.struts.action.ActionMessages,
  javax.servlet.http.HttpServletRequest
 depends=
 msg=errors.minlength
  @@ -218,7 +218,7 @@
methodParams=java.lang.Object,
  org.apache.commons.validator.ValidatorAction,
  org.apache.commons.validator.Field,
  -   org.apache.struts.action.ActionErrors,
  +   org.apache.struts.action.ActionMessages,
  javax.servlet.http.HttpServletRequest
 depends=
 msg=errors.maxlength
  @@ -263,7 +263,7 @@
methodParams=java.lang.Object,
  org.apache.commons.validator.ValidatorAction,
  org.apache.commons.validator.Field,
  -   org.apache.struts.action.ActionErrors,
  +   org.apache.struts.action.ActionMessages,
  javax.servlet.http.HttpServletRequest
 depends=
 msg=errors.invalid
  @@ -313,7 +313,7 @@
methodParams=java.lang.Object,
  org.apache.commons.validator.ValidatorAction,
  org.apache.commons.validator.Field,
  -   org.apache.struts.action.ActionErrors,
  +   org.apache.struts.action.ActionMessages,
  javax.servlet.http.HttpServletRequest
 depends=
 msg=errors.byte
  @@ -385,7 +385,7 @@
methodParams=java.lang.Object,
  org.apache.commons.validator.ValidatorAction,
  org.apache.commons.validator.Field,
  -   org.apache.struts.action.ActionErrors,
  +   org.apache.struts.action.ActionMessages,
  javax.servlet.http.HttpServletRequest
 depends=
 msg=errors.short
  @@ -456,7 +456,7 @@
methodParams=java.lang.Object,
  org.apache.commons.validator.ValidatorAction,
  org.apache.commons.validator.Field,
  -   org.apache.struts.action.ActionErrors,
  +   org.apache.struts.action.ActionMessages,
  javax.servlet.http.HttpServletRequest
 depends=
 msg=errors.integer
  @@ -547,7 

cvs commit: jakarta-struts/conf/share validator-rules.xml

2003-10-01 Thread rleland
rleland 2003/10/01 08:43:12

  Modified:conf/share validator-rules.xml
  Log:
  Remove all javescript definitions except the 'required',
  and default to the ones stored in commons-validator.
  
  The 'required' was kept to prevent a regression
  in functionality ityat is n the CVS version of commons-validator.
  
  Revision  ChangesPath
  1.43  +24 -760   jakarta-struts/conf/share/validator-rules.xml
  
  Index: validator-rules.xml
  ===
  RCS file: /home/cvs/jakarta-struts/conf/share/validator-rules.xml,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- validator-rules.xml   1 Oct 2003 15:07:57 -   1.42
  +++ validator-rules.xml   1 Oct 2003 15:43:11 -   1.43
  @@ -1,6 +1,6 @@
   !DOCTYPE form-validation PUBLIC
  -  -//Apache Software Foundation//DTD Commons Validator Rules Configuration 
1.0//EN
  -  http://jakarta.apache.org/commons/dtds/validator_1_0.dtd;
  +  -//Apache Software Foundation//DTD Commons Validator Rules Configuration 
1.1//EN
  +  http://jakarta.apache.org/commons/dtds/validator_1_1.dtd;
   !--
 $Header$
 $Revision$
  @@ -39,6 +39,11 @@
  errors.range={0} is not in the range {1} through {2}.
  errors.creditcard={0} is an invalid credit card number.
  errors.email={0} is an invalid e-mail address.
  +   
  +   Note: Starting in Struts 1.2.0 the default javascript definitions have
  + been consolidated to commons-validator. The default can be overridden
  + by supplying a javascript element with a CDATA section, just as
  + in struts 1.1.
   
   --
   
  @@ -152,8 +157,7 @@
  org.apache.struts.action.ActionMessages,
  org.apache.commons.validator.Validator,
  javax.servlet.http.HttpServletRequest
  - msg=errors.required
  -  /validator
  + msg=errors.required/
   
 validator name=validwhen
 msg=errors.required
  @@ -176,40 +180,7 @@
  org.apache.struts.action.ActionMessages,
  javax.servlet.http.HttpServletRequest
 depends=
  -  msg=errors.minlength
  -
  - javascript![CDATA[
  -function validateMinLength(form) {
  -var isValid = true;
  -var focusField = null;
  -var i = 0;
  -var fields = new Array();
  -oMinLength = new minlength();
  -for (x in oMinLength) {
  -var field = form[oMinLength[x][0]];
  -
  -if (field.type == 'text' ||
  -field.type == 'textarea') {
  -
  -var iMin = parseInt(oMinLength[x][2](minlength));
  -if ((trim(field.value).length  0)  (field.value.length  
iMin)) {
  -if (i == 0) {
  -focusField = field;
  -}
  -fields[i++] = oMinLength[x][1];
  -isValid = false;
  -}
  -}
  -}
  -if (fields.length  0) {
  -   focusField.focus();
  -   alert(fields.join('\n'));
  -}
  -return isValid;
  -}]]
  - /javascript
  -
  -  /validator
  +  msg=errors.minlength/
   
   
 validator name=maxlength
  @@ -221,41 +192,9 @@
  org.apache.struts.action.ActionMessages,
  javax.servlet.http.HttpServletRequest
 depends=
  -  msg=errors.maxlength
  -
  - javascript![CDATA[
  -function validateMaxLength(form) {
  -var isValid = true;
  -var focusField = null;
  -var i = 0;
  -var fields = new Array();
  -oMaxLength = new maxlength();
  -for (x in oMaxLength) {
  -var field = form[oMaxLength[x][0]];
  -
  -if (field.type == 'text' ||
  -field.type == 'textarea') {
  -
  -var iMax = parseInt(oMaxLength[x][2](maxlength));
  -if (field.value.length  iMax) {
  -if (i == 0) {
  -focusField = field;
  -}
  -fields[i++] = oMaxLength[x][1];
  -isValid = false;
  -}
  -}
  -}
  -if (fields.length  0) {
  

Re: Reviving PageController (ViewController?) discussion?

2003-10-01 Thread Jing Zhou

- Original Message - 
From: Ted Husted [EMAIL PROTECTED]
To: Struts Developers List [EMAIL PROTECTED]
Sent: Tuesday, September 30, 2003 6:29 AM
Subject: Re: Reviving PageController (ViewController?) discussion?


 Jing Zhou wrote:
  - A well designed framework should not have overlapped
concepts, or terms that lead to overlapped concepts.
We have the concept of action controllers, we should not
have more *controllers* when a view is under preparations.

 IMHO, a well-designed framework should provide extension points where
 developers need extensions points. Right now, we have one extension
 point where a developer can cleanly interject an Action.

Well, since the context switch is an interface, it is an
extension point by itself. What I am against here is that the context switch
could return a different target ForwardConfig (or changing its logical
destination page).

Determining a target ForwardConfig is the core business of Action(s)
before we reach the phase of preparing the view requirements for
the next page. It is not a good idea to overlap the Action semantics
in the context switch semantics in regard to returning a different
ForwardConfig. That is the reason I think we should not have more
*controllers*. Note that multiple Actions (or Commands) could be
allowed before the phase of preparing the view requirements.



  - The class is responsible for switching module-wide
 settings. A ModuleSwitch(Command) would be
 closer to what it really does.

 IMHO, a large part of the problem is the assumption that there can only
 be one front controller. Many of the module use cases could be solved
 if multiple instances of the Struts controller were available in an
 application. One could handle the *.mod1 URIs andother another could
 handle the *.mod2 URIs. This approach was contrary to the initial Struts
 architecture, and we decided to pursue the context-switching strategy.


I am not aware of the design details in your projects, but I fully agree
with
the context-switching strategy. If you and any developers could advise
me about our plan to implement the strategy, that would be great. Here is
the pseudo definition:

Definition of ModuleSwitch (for the context switch interface):

1) Responsibility:

Prepare the context required by the underlying business
logic components for the incoming http request and the context
required by the presentation components for the outgoing http
response (typically a JSP page or template engine).

2) Relationship to ModuleConfig:

An instance of ModuleSwitch interface has a one to one
correspondence to an instance of ModuleConfig. ModuleConfig
provides immutable properties while ModuleSwitch provides
mutable properties for wider applicability.

3) Relationship to Chain:

There are two points in a request processor Chain that could
invoke the methods in ModuleSwitch.

- When an incoming http request is received and the current
   ModuleConfig and ActionMapping is identified, a Command
   in the Chain should invoke a method in ModuleSwitch to
   prepare the context required by following Commands that are
   responsible to execute business logic.

- When the final logical target is identified, typically in term of a
   ForwardConfig returned by previous Action Commands,
   a Command in the Chain should invoke a method in
   ModuleSwitch to prepare the context required by
   presentation components. The implementation of the method
   could just do in-module switch if the target is in the current
   module. If the target is in a different module, then out-module
   switch must be performed.

Remark: This is an alpha idea, my gut feeling is that the existence
of such interface is fully justified, of course, its name and its
method signatures are to be determined and there are a lot
of things to be filled. The concept of Logical Target is also
introduced. The  implementation could translate a logical target
to a physical target when it sees fit, much like selecting a
Renderer per JSF, or Theme per our project.


 -Ted.


Jing
Netspread Carrier
http://www.netspread.com



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



[struts-chain] Writing a command to process a Tiles Definition

2003-10-01 Thread Greg Reddin
I'm trying to write a Command or set of Commands that will process a 
Tiles definition to help complete the 1.x-compatible chained request 
processor.  I've got something working, but I would like some community 
input before I submit it.

First, I created another subclass of AbstractPerformForward that looks 
like this:

// Resolve module-relative paths
if (forwardPath.startsWith(/)) {
uri = RequestUtils.forwardURL(swcontext.getRequest(),
  forwardConfig);
} else {
if (processTilesDefinition(context, forwardConfig)) {
return;
} else {
uri = forwardPath;
}
}
// Perform redirect or forward
if (forwardConfig.getRedirect()) {
if (uri.startsWith(/)) {
uri = swcontext.getRequest().getContextPath() + uri;
}
swcontext.getResponse().sendRedirect
(swcontext.getResponse().encodeRedirectURL(uri));
} else {
RequestDispatcher rd =
swcontext.getContext().getRequestDispatcher(uri);
rd.forward(swcontext.getRequest(), swcontext.getResponse());
}
You'll notice that's the same code as the other PerformForward class 
with the exception that I call processTilesDefinition().  The 
processTilesDefinition() method does the same thing as 
processTilesDefinition() in TilesRequestProcessor except that it adds 
the init() code that ensures a DefinitionsFactory is in place.  If 
processTilesDefinition() returns true we exit the command, otherwise we 
perform the standard forward logic.

There's a few problems I have with the way this is written.

First, I would like to make processTilesDefinition() its own command 
because it will be inserted here and in the replacement for 
processForward() if/when that gets supported.  But I can't make it a 
Command because it is only inserted here conditionally.  So either 1) 
PerformForward will need to be broken up into multiple commands so logic 
such as Tiles can be inserted, 2) processTilesDefinition should be 
placed in a util class so it can be called from anywhere, or 3) I take a 
different approach with Tiles and not extend AbstractPerformForward at 
all.  Maybe there's another approach.  Any suggestions?

Secondly, there's a lot of stuff in processTilesDefinition() that could 
and probably should go into an abstract base class with a standard 
implementation like all the other commands.  Would it be preferable to 
create another abstract extension of AbstractPerformForward or just go 
down a different path altogether (i.e. AbstractPerformTilesForward 
extends AbstractPerformForward vs. AbstractPerformTilesForward 
implements Command)?  Again, it's kind of a problem because the Tiles 
functionality is executed conditionally.  If certain conditions are not 
met, the standard processing occurs.  The Command interface doesn't 
support if-else logic and I don't think that's a shortcoming.  I'd 
just assume write my if-else logic in Java as opposed to XML.

Another thing is that the current TilesRequestProcessor doesn't support 
redirects unless I've misread it, so neither does the chain version. 
Also TilesRequestProcessor will do an include instead of a forward in 
certain places, so I included that functionality in the chain version.

Next, is there any problem with doing the initDefinitionsFactory() logic 
on every execution of the command instead of only during the init().  As 
far as I can tell, this function only checks ot see if the 
DefinitionsFactory is present.  It doesn't actually initialize anything. 
  That's all done in the PlugIn.  I don't think there's the equivalent 
of the init() method in the chain interface.  Should there be?

Which brings me to the PlugIn.  The TilesPlugin verifies that the 
RequestProcessor is a TilesRequestProcessor and returns an error if not. 
 Should we 1) remove this from TilesPlugin, 2) write another 
TilesPlugin that does not do this verification, 3) add 
ComposableRequestProcessor to the verification in TilesPlugin, or 4) 
write a TilesComposableRequestProcessor (yuck)?

I think that's enough for now.  Let me know if some of that doesn't make 
sense.

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


Re: The Forrest Option

2003-10-01 Thread Craig R. McClanahan
Don Brown wrote:

I know the discussion on whether to use Forrest or Maven to generate the
Struts website was a few weeks back, but unfortunately, at the time, I was
too busy to participate.  I'd like to lay out a case for Forrest, not to
insist Struts uses it, but rather to make sure the decision is made with
all the available information.
In short, Forrest offers these benefits over Maven's website generation:

- Multiple output formats including PDF and HTML
- SVG to PNG rendering
- Built for handling and aggregating multiple XML sources like RRS (soon
wiki and Docbook)
- Power and features of Cocoon including charting, web services
integration, scripting support, etc.
Further, deciding between Forrest and Maven isn't an either/or situation.
There exists a Forrest plugin for Maven and it would be easy to integrate
Maven's reports into a Forrest site build.
To me, the key feature of Forrest is the first one listed, multiple
outputs.  This is especially useful for documentation as PDF is much
better than HTML for printing for the many users that like hard copies.
Finally, Forrest content is built to be presented in not only multiple
output formats, but multiple skins.  To demonstrate this, I've quickly
redone the Struts site into Forrest format (which is very similiar to the
current format thanks to the xhtml work of late).  I've only converted the
menu and the main page, which should be sufficient.
Please note, this examples are not polished and only serve to demonstrate
the skinability of Forrest.
Krysalis style:   http://www.twdata.org/dakine/site/
Avalon/Tigris style:  http://www.twdata.org/dakine/site1/
Forrest/XML Apache style: http://www.twdata.org/dakine/site2/
If we did decide to go with Forrest, I'm willing to convert the old site
over and help handle any integration.  I'm most definately not an expert
at Forrest, but am familiar with Cocoon and thankfully, Forrest is pretty
easy.
 

Looking at the potential here, I'm inclined to suggest we accept Don's 
offer to help set this up -- although perhaps at first in a standalone 
directory structure that can be undone if we discover that we don't like 
it.  One advantage is that we can do it without having to migrate the 
build system to Maven first.

As for skins, I sure like the Avalon/Tigris or Krysalis examples, and 
sure wonder why the Forrest developers chose the native style they ship 
with, when they could do something as nice looking as either of these.  
But, if I understand what you're saying, skins is essentially a runtime 
(when you're generating the HTML) choice; we don't have to make an 
irrevocable decision at any point in time.

Don
 

Craig



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


Looking for thoughts on html:errors with indexed properties

2003-10-01 Thread James Turner
Hi gang,
   Currently, the html:errors tag doesn't work well with
indexed properties, because it looks for an exact match on
the property name.  So if you have an error in
petFish[3].species, you need to have:
html:errors property=petFish[3].species

I'd like to propose (and will implement if people think it's
a good idea) two new things.

First off, doing html:errors name=petFish
property=species indexed=true should match errors for
the current iteration values.

Secondly, doing html:errors name=petFish
property=species should match all errors for any
iteration.

James




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



Re: [struts-chain] Writing a command to process a Tiles Definition

2003-10-01 Thread Craig R. McClanahan
Greg Reddin wrote:

I'm trying to write a Command or set of Commands that will process a 
Tiles definition to help complete the 1.x-compatible chained request 
processor.  I've got something working, but I would like some 
community input before I submit it.

First, I created another subclass of AbstractPerformForward that looks 
like this:

// Resolve module-relative paths
if (forwardPath.startsWith(/)) {
uri = RequestUtils.forwardURL(swcontext.getRequest(),
  forwardConfig);
} else {
if (processTilesDefinition(context, forwardConfig)) {
return;
} else {
uri = forwardPath;
}
}
// Perform redirect or forward
if (forwardConfig.getRedirect()) {
if (uri.startsWith(/)) {
uri = swcontext.getRequest().getContextPath() + uri;
}
swcontext.getResponse().sendRedirect
(swcontext.getResponse().encodeRedirectURL(uri));
} else {
RequestDispatcher rd =
swcontext.getContext().getRequestDispatcher(uri);
rd.forward(swcontext.getRequest(), swcontext.getResponse());
}
You'll notice that's the same code as the other PerformForward class 
with the exception that I call processTilesDefinition().  The 
processTilesDefinition() method does the same thing as 
processTilesDefinition() in TilesRequestProcessor except that it adds 
the init() code that ensures a DefinitionsFactory is in place.  If 
processTilesDefinition() returns true we exit the command, otherwise 
we perform the standard forward logic.

There's a few problems I have with the way this is written.

First, I would like to make processTilesDefinition() its own command 
because it will be inserted here and in the replacement for 
processForward() if/when that gets supported.  But I can't make it a 
Command because it is only inserted here conditionally.  So either 1) 
PerformForward will need to be broken up into multiple commands so 
logic such as Tiles can be inserted, 2) processTilesDefinition should 
be placed in a util class so it can be called from anywhere, or 3) I 
take a different approach with Tiles and not extend 
AbstractPerformForward at all.  Maybe there's another approach.  Any 
suggestions?
There's a conditional behavior use case in the existing code as well; 
when validation fails, we want to redisplay the input form.  Originally, 
I modelled this command as a Chain that conditionally executed its child 
commands, but that seemed a little hokey.  Now, this command definition 
says:

   command className=org.apache.struts.chain.servlet.ValidateActionForm
 failureCommand=servlet-validation-failure/
so I'm declaring the name of another chain to go execute if validation 
fails.  The actual code that does the conditional execution looks like 
this (in the abstract base class):

   // Call the environment-specific protected validate() method in our 
implementation class
   ActionErrors errors = validate(context, actionConfig, actionForm);

   // If there were no errors, proceed normally
   if ((errors == null) || (errors.isEmpty()) {
   return (false); // Proceed with the main chain
   }
   // Execute the specified validation failure command
   try {
   Catalog catalog = (Catalog)
 context.get(getCatalogKey());
   Command command = catalog.getCommand(getFailureCommand());
   command.execute(context);
   } catch (Exception e) {
   ... deal with exception ...
   }
   return (true); // Terminate the main chain
This approach seems more scalable -- for example, you can have several 
different conditional options, you aren't binding all the behavior 
definitions into a single chain definition, and you can decide based on 
your needs whether to return false or true from the main command (which 
dictates whether the owning chain thinks processing is complete or not).

Secondly, there's a lot of stuff in processTilesDefinition() that 
could and probably should go into an abstract base class with a 
standard implementation like all the other commands.  Would it be 
preferable to create another abstract extension of 
AbstractPerformForward or just go down a different path altogether 
(i.e. AbstractPerformTilesForward extends AbstractPerformForward vs. 
AbstractPerformTilesForward implements Command)?  Again, it's kind of 
a problem because the Tiles functionality is executed conditionally.  
If certain conditions are not met, the standard processing occurs.  
The Command interface doesn't support if-else logic and I don't 
think that's a shortcoming.  I'd just assume write my if-else logic in 
Java as opposed to XML.
Or, factor it into separate commands that can be looked up and executed 
at the appropriate times.  Then, you're building your conditional logic 
in Java, but only the if-then-else statement itself; the actual 
straight line processing is 

Re: The Forrest Option

2003-10-01 Thread Robert Leland
Don,

 I have one request and that is to leave the existing maven files
 in place since they do currently generate a web site with the reports.
Craig R. McClanahan wrote:

Don Brown wrote:

I know the discussion on whether to use Forrest or Maven to generate the
Struts website was a few weeks back, but unfortunately, at the time, 
I was
too busy to participate.  I'd like to lay out a case for Forrest, not to
insist Struts uses it, but rather to make sure the decision is made with
all the available information.

In short, Forrest offers these benefits over Maven's website generation:

- Multiple output formats including PDF and HTML
- SVG to PNG rendering
- Built for handling and aggregating multiple XML sources like RRS (soon
wiki and Docbook)
- Power and features of Cocoon including charting, web services
integration, scripting support, etc.
Further, deciding between Forrest and Maven isn't an either/or 
situation.
There exists a Forrest plugin for Maven and it would be easy to 
integrate
Maven's reports into a Forrest site build.

To me, the key feature of Forrest is the first one listed, multiple
outputs.  This is especially useful for documentation as PDF is much
better than HTML for printing for the many users that like hard copies.
Finally, Forrest content is built to be presented in not only multiple
output formats, but multiple skins.  To demonstrate this, I've quickly
redone the Struts site into Forrest format (which is very similiar to 
the
current format thanks to the xhtml work of late).  I've only 
converted the
menu and the main page, which should be sufficient.

Please note, this examples are not polished and only serve to 
demonstrate
the skinability of Forrest.

Krysalis style:   http://www.twdata.org/dakine/site/
Avalon/Tigris style:  http://www.twdata.org/dakine/site1/
Forrest/XML Apache style: http://www.twdata.org/dakine/site2/
If we did decide to go with Forrest, I'm willing to convert the old site
over and help handle any integration.  I'm most definately not an expert
at Forrest, but am familiar with Cocoon and thankfully, Forrest is 
pretty
easy.
 

Looking at the potential here, I'm inclined to suggest we accept Don's 
offer to help set this up -- although perhaps at first in a standalone 
directory structure that can be undone if we discover that we don't 
like it.  One advantage is that we can do it without having to migrate 
the build system to Maven first.

As for skins, I sure like the Avalon/Tigris or Krysalis examples, and 
sure wonder why the Forrest developers chose the native style they 
ship with, when they could do something as nice looking as either of 
these.  But, if I understand what you're saying, skins is essentially 
a runtime (when you're generating the HTML) choice; we don't have to 
make an irrevocable decision at any point in time.

Don
 

Craig



-
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: Looking for thoughts on html:errors with indexed properties

2003-10-01 Thread Vic Cekvenich
I  belive I had reported in bugzzila multi row validation problme 2 
years ago, as well as posts.
Here is the code I have been shiping for a long time with bP (writen by 
Jose/Ben):
package com.fX.base;

/*
 * MultiRowValidator.java
 * by Ben Tomasini - original by Jose Quiteriono ?
 * 12/10/2002
 *
 */
import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.validator.Field;
import org.apache.commons.validator.ValidatorAction;
import org.apache.struts.action.ActionErrors;
/**
 * This class contains multi-row validations for a collection
 * *** validation.xml
 ex: use
 form name=ClosingChecklistForm
 field property=sortOrder depends=multiRowRequired,multiRowInteger
 arg0 key=ClosingChecklistForm.sortOrder.displayname/
 var
 var-namerowName/var-name
 var-valuerow/var-value
 /var
 /field
 field property=daysBeforeBenchmark depends=multiRowInteger
 arg0 key=ClosingChecklistForm.daysBeforeBenchmark.displayname/
 var
 var-namerowName/var-name
 var-valuerow/var-value
 /var
 /field
 field property=description depends=multiRowRequired
 arg0 key=ClosingChecklistForm.description.displayname/
 var
 var-namerowName/var-name
 var-valuerow/var-value
 /var
 /field
 /form
 *
 */
public class MultiRowValidator extends 
org.apache.struts.validator.FieldChecks
implements Serializable {
//TODO: rename row to index

/**
 * Commons Logging instance.
 */
private static Log LOG = LogFactory.getLog(MultiRowValidator.class);
/**
 * pChecks if the field isn't null and length of the field is 
greater than zero not
 * including whitespace./p
 *
 * @param   beanThe bean - must implement Collection
 * @param   va  The codeValidatorAction/code that is 
currently being performed.
 * @param   field   The codeField/code object associated 
with the current field
 *  being validated.
 * @param   errors  The codeActionErrors/code object to add 
errors to if any
 *  validation errors occur.
 * @param   request Current request object.
 */
public static boolean validateMultiRowRequired(Object bean,
   ValidatorAction va, 
Field field,
   ActionErrors errors,
   HttpServletRequest 
request) {

boolean valid = true;
// Need to iterate over a collection
Collection coll = (Collection) bean;
for (Iterator i = coll.iterator(); i.hasNext();) {

Object entry = (Object) i.next();
if (!validateRequired(entry, va, field, errors, request))
valid = false;
}

return valid;

}

/**
 * pChecks if the field matches the regular expression in the 
field's mask attribute./p
 *
 * @param   beanThe bean - must implement collection
 * @param   va  The codeValidatorAction/code that is 
currently being performed.
 * @param   field   The codeField/code object associated 
with the current field
 *  being validated.
 * @param   errors  The codeActionErrors/code object to add 
errors to if any
 *  validation errors occur.
 * @param   request Current request object.
 */
public static boolean validateMultiRowMask(Object bean,
   ValidatorAction va, 
Field field,
   ActionErrors errors,
   HttpServletRequest 
request) {

boolean valid = true;
// Need to iterate over a collection
Collection coll = (Collection) bean;
for (Iterator i = coll.iterator(); i.hasNext();) {

Object entry = (Object) i.next();
if (!validateMask(entry, va, field, errors, request))
valid = false;
}

return valid;

}

/**
 * pChecks if the field can safely be converted to an int 
primitive./p
 *
 * @param   beanThe bean - must implement collection
 * @param   va  The codeValidatorAction/code that is 
currently being performed.
 * @param   field   The codeField/code object associated 
with the current field
 *  being validated.
 * @param   errors  The codeActionErrors/code object to add 
errors to if any
 *  validation errors occur.
 * @param   request Current request object.
 */
public static boolean validateMultiRowInteger(Object bean,
  ValidatorAction va, 
Field field,
  ActionErrors errors,
  

RE: Looking for thoughts on html:errors with indexed properties

2003-10-01 Thread Karr, David
 -Original Message-
 From: James Turner [mailto:[EMAIL PROTECTED] 
 
 Hi gang,
Currently, the html:errors tag doesn't work well with
 indexed properties, because it looks for an exact match on
 the property name.  So if you have an error in
 petFish[3].species, you need to have:
 html:errors property=petFish[3].species
 
 I'd like to propose (and will implement if people think it's
 a good idea) two new things.
 
 First off, doing html:errors name=petFish
 property=species indexed=true should match errors for
 the current iteration values.
 
 Secondly, doing html:errors name=petFish
 property=species should match all errors for any
 iteration.

The first item looks like a good idea, but the second looks a little
questionable.  It might help if you showed explicitly what that would
mean.

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



Re: The Forrest Option

2003-10-01 Thread David Graham

--- Robert Leland [EMAIL PROTECTED] wrote:
 Don,
 
   I have one request and that is to leave the existing maven files
   in place since they do currently generate a web site with the reports.

I must be confused with the several projects I'm working on.  So, Maven is
already setup in Struts to run the builds?  If so, why are we going to add
Forrest to the builds?  Why not just start building the site and distro
with Maven?

David

 
 Craig R. McClanahan wrote:
 
  Don Brown wrote:
 
  I know the discussion on whether to use Forrest or Maven to generate
 the
  Struts website was a few weeks back, but unfortunately, at the time, 
  I was
  too busy to participate.  I'd like to lay out a case for Forrest, not
 to
  insist Struts uses it, but rather to make sure the decision is made
 with
  all the available information.
 
  In short, Forrest offers these benefits over Maven's website
 generation:
 
  - Multiple output formats including PDF and HTML
  - SVG to PNG rendering
  - Built for handling and aggregating multiple XML sources like RRS
 (soon
  wiki and Docbook)
  - Power and features of Cocoon including charting, web services
  integration, scripting support, etc.
 
  Further, deciding between Forrest and Maven isn't an either/or 
  situation.
  There exists a Forrest plugin for Maven and it would be easy to 
  integrate
  Maven's reports into a Forrest site build.
 
  To me, the key feature of Forrest is the first one listed, multiple
  outputs.  This is especially useful for documentation as PDF is much
  better than HTML for printing for the many users that like hard
 copies.
 
  Finally, Forrest content is built to be presented in not only
 multiple
  output formats, but multiple skins.  To demonstrate this, I've
 quickly
  redone the Struts site into Forrest format (which is very similiar to
 
  the
  current format thanks to the xhtml work of late).  I've only 
  converted the
  menu and the main page, which should be sufficient.
 
  Please note, this examples are not polished and only serve to 
  demonstrate
  the skinability of Forrest.
 
  Krysalis style:   http://www.twdata.org/dakine/site/
  Avalon/Tigris style:  http://www.twdata.org/dakine/site1/
  Forrest/XML Apache style: http://www.twdata.org/dakine/site2/
 
  If we did decide to go with Forrest, I'm willing to convert the old
 site
  over and help handle any integration.  I'm most definately not an
 expert
  at Forrest, but am familiar with Cocoon and thankfully, Forrest is 
  pretty
  easy.
   
 
  Looking at the potential here, I'm inclined to suggest we accept Don's
 
  offer to help set this up -- although perhaps at first in a standalone
 
  directory structure that can be undone if we discover that we don't 
  like it.  One advantage is that we can do it without having to migrate
 
  the build system to Maven first.
 
  As for skins, I sure like the Avalon/Tigris or Krysalis examples, and 
  sure wonder why the Forrest developers chose the native style they 
  ship with, when they could do something as nice looking as either of 
  these.  But, if I understand what you're saying, skins is essentially 
  a runtime (when you're generating the HTML) choice; we don't have to 
  make an irrevocable decision at any point in time.
 
  Don
   
 
  Craig
 
 
 
  -
  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]
 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Re: [struts-chain] Writing a command to process a Tiles Definition

2003-10-01 Thread Greg Reddin
There's a conditional behavior use case in the existing code as well; 
when validation fails, we want to redisplay the input form.  Originally, 
I modelled this command as a Chain that conditionally executed its child 
commands, but that seemed a little hokey.  Now, this command definition 
says:

   command className=org.apache.struts.chain.servlet.ValidateActionForm
 failureCommand=servlet-validation-failure/
so I'm declaring the name of another chain to go execute if validation 
fails.  The actual code that does the conditional execution looks like 
this (in the abstract base class):
I should've seen that, but didn't look hard enough.  That's pretty cool. 
 I guess, due to the way digester works, it doesn't have to be called 
failureCommand for my case.  For Tiles, I could provide any number of 
attributes like that, right?

I suspect there is a lot of useful refactoring to be had in order to 
employ chain underneath something like Tiles; 
I bet you're right.  For now, I'm just pasting existing functionality 
inline to make sure I understand how it works and what it's doing. 
That's why I'm reluctant to submit it yet.  I'd hate to submit something 
that gets committed and locks us into an approach when refactoring would 
produce something better.  I'll look at it some more.

perhaps the best approach 
for development might be to go ahead and let TilesPlugIn configure 
things the way it wants, but add your own plugin (running after the 
Tiles one) to replace the configured RequestProcessor for executing your 
chain(s) instead.
The problem is that TilesPlugin throws an exception and doesn't 
configure anything if your RequestProcessor is not a 
TilesRequestProcessor.  So we'd really have to replace it with something 
that doesn't do that.

Thanks for the suggestions -- especially on the conditional processing 
thing.  I'll take a good look at that.

Greg

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


Re: The Forrest Option

2003-10-01 Thread Ted Husted
Don Brown wrote:
For example, currently, we have quite a few Struts extensions, example
applications, and related frameworks that I feel Struts could do a better
job of encouraging.  Instead of requiring an extension developer to submit
a patch to bugzilla to change a description or add their project to the
page, why not have a page that aggregates extension project's RSS
announcing new releases into a news-type page.  Giving extension projects
more exposure will generate more interest in finding ways to make Struts
better.  Look what it did for Maven :)
How about if we give a wider trial Forrest on the Community section 
first? This would be mainly News and Status, Resources, and could also 
include a Wiki compilation.

If it doesn't work out, the Community section would be easy enough to 
roll back.

-Ted.



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


Re: [struts-chain] Writing a command to process a Tiles Definition

2003-10-01 Thread Craig R. McClanahan
Greg Reddin wrote:

There's a conditional behavior use case in the existing code as 
well; when validation fails, we want to redisplay the input form.  
Originally, I modelled this command as a Chain that conditionally 
executed its child commands, but that seemed a little hokey.  Now, 
this command definition says:

   command 
className=org.apache.struts.chain.servlet.ValidateActionForm
 failureCommand=servlet-validation-failure/

so I'm declaring the name of another chain to go execute if 
validation fails.  The actual code that does the conditional 
execution looks like this (in the abstract base class):


I should've seen that, but didn't look hard enough.  That's pretty 
cool.  I guess, due to the way digester works, it doesn't have to be 
called failureCommand for my case.  For Tiles, I could provide any 
number of attributes like that, right?
Yes ... the attribute names just have to match up with the JavaBeans 
property names on your Command implementation classes (we're using 
Digester's Set Property Rule).


I suspect there is a lot of useful refactoring to be had in order to 
employ chain underneath something like Tiles; 


I bet you're right.  For now, I'm just pasting existing functionality 
inline to make sure I understand how it works and what it's doing. 
That's why I'm reluctant to submit it yet.  I'd hate to submit 
something that gets committed and locks us into an approach when 
refactoring would produce something better.  I'll look at it some more.
I've found that experimenting has worked a lot better once I started 
doing it in the open :-).

Seriously, as long as we play in the contrib/struts-chain directory, 
people will understand that this is an actively developing idea, not a 
stable framework on which to build apps -- at least not yet.  We're all 
learning how to apply the chain concepts, and working out what design 
patterns and idioms make the most sense.  It'll go better for everyone 
if we share that learning experience; and it's more fun to boot.

That's a long winded way of saying I'd welcome the work you're doing 
being part of the contrib/struts-chain package, if you'd like.


perhaps the best approach for development might be to go ahead and 
let TilesPlugIn configure things the way it wants, but add your own 
plugin (running after the Tiles one) to replace the configured 
RequestProcessor for executing your chain(s) instead.


The problem is that TilesPlugin throws an exception and doesn't 
configure anything if your RequestProcessor is not a 
TilesRequestProcessor.  So we'd really have to replace it with 
something that doesn't do that.

Thanks for the suggestions -- especially on the conditional processing 
thing.  I'll take a good look at that.

Greg
Craig



-
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: The Forrest Option

2003-10-01 Thread Chris Gastin
I have to agree with David. Lets find one way to do it and make it simple,
if a build process can be. I have worked a little with Maven, and it seems
tobe simple. I am not knocking Forrest. I have not had a chance to look into
it. If that is more simple than Maven then I am all for it. Lets not make
the build process this awful process. I think everyone would agree with
that.

Chris Gastin
- Original Message - 
From: David Graham [EMAIL PROTECTED]
To: Struts Developers List [EMAIL PROTECTED]
Sent: Wednesday, October 01, 2003 8:51 AM
Subject: Re: The Forrest Option



 --- Ted Husted [EMAIL PROTECTED] wrote:
  Don Brown wrote:
   Further, deciding between Forrest and Maven isn't an either/or
  situation.
   There exists a Forrest plugin for Maven and it would be easy to
  integrate
   Maven's reports into a Forrest site build.
 
  .../
 
   If we did decide to go with Forrest, I'm willing to convert the old
  site
   over and help handle any integration.  I'm most definately not an
  expert
   at Forrest, but am familiar with Cocoon and thankfully, Forrest is
  pretty
   easy.
 
  +1
 
  This sounds like a nice stepping stone. We can try Forrest now and
  migrate the build to Maven as soon as someone is ready to volunteer for
  that.
 
  Outside of the Jakarta Commons Sandbox, Forrest and Maven are equally
  popular among other Apache products. Using both might be the best of
  both worlds.

 Or it may be a complete nightmare.  So then we would have Forrest, Maven,
 and Ant builds all competing for attention.  I am definitely against using
 multiple build processes; let's just pick one and stick with it.

 The Forrest features Don mentioned aren't significant to me and I'm
 already familiar with Maven so I'm leaning towards Maven but I really
 don't care as long as the build is as easy as maven jar or equivalent.
 But please let's not try to maintain multiple build processes.

 David

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


 __
 Do you Yahoo!?
 The New Yahoo! Shopping - with improved product search
 http://shopping.yahoo.com

 -
 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: The Forrest Option

2003-10-01 Thread Ted Husted
Chris Gastin wrote:
I have to agree with David. Lets find one way to do it and make it simple,
if a build process can be. I have worked a little with Maven, and it seems
tobe simple. I am not knocking Forrest. I have not had a chance to look into
it. If that is more simple than Maven then I am all for it. Lets not make
the build process this awful process. I think everyone would agree with
that.
We're not talking about the build process as a whole. The Forrest Option 
refers only to website maintenance and documentation.

Since Don's ready to sign-up for Forrest, we should start by trusting 
his judgment and be ready to give this a try. That's what it means to be 
a Committer. Make the decision, do the work.

At this point, no one is raising their hand and offering to migrate us 
to Maven. Until someone does, Maven does not seem like a valid objection.

Though, a valid, technical objection would be that the website and the 
build (except for the current Cactus snafu) ain't broke, so we don't 
need to fix it. Steve's got everything running as valid XHTML. We're 
still using the original Apache look, but then so is the vast majority 
of other Apache projects. If we dusted off the struts-lib distribution 
(which appeared and disappeared during the last beta cycle), the 
quick-start concerns would be answered.

Certainly, it would make sense to start new development on Forrest 
and/or Maven. If we spun off taglibs or rolled up our sleeves on 2.0, 
then we'd definitely want to make a decision there. (Based primarily on 
who was willing to do the work.)

And, we do have Forrest running on the SourceForge site, so things like 
RSS feeds and WikiDocs could be tried there first to see how helpful 
they really are. (I must admit, I'm intrigued.)

-Ted.



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


Re: The Forrest Option

2003-10-01 Thread David Graham

--- Ted Husted [EMAIL PROTECTED] wrote:
 Chris Gastin wrote:
  I have to agree with David. Lets find one way to do it and make it
 simple,
  if a build process can be. I have worked a little with Maven, and it
 seems
  tobe simple. I am not knocking Forrest. I have not had a chance to
 look into
  it. If that is more simple than Maven then I am all for it. Lets not
 make
  the build process this awful process. I think everyone would agree
 with
  that.
 
 We're not talking about the build process as a whole. The Forrest Option
 
 refers only to website maintenance and documentation.
 
 Since Don's ready to sign-up for Forrest, we should start by trusting 
 his judgment and be ready to give this a try. That's what it means to be
 
 a Committer. Make the decision, do the work.
 
 At this point, no one is raising their hand and offering to migrate us 
 to Maven. Until someone does, Maven does not seem like a valid
 objection.

Rob mentioned something about Struts being setup for Maven already and I
asked for clarification.  If that's true then I see no point in
complicating things with another build tool.  Also, it seems that Maven in
some ways is a superset of Forrest functionality.  It handles the website
plus the jar builds.

The more tools involved means it's harder to understand the build process
which limits the number of people willing to put up with it and work on
Struts.  My personal goal (and I hope the group's as well) is to have
*one* easy to use tool that builds all of Struts.  I don't care if this is
Ant, Maven, or Forrest as long as it's only one of them.

David

 
 Though, a valid, technical objection would be that the website and the 
 build (except for the current Cactus snafu) ain't broke, so we don't 
 need to fix it. Steve's got everything running as valid XHTML. We're 
 still using the original Apache look, but then so is the vast majority 
 of other Apache projects. If we dusted off the struts-lib distribution 
 (which appeared and disappeared during the last beta cycle), the 
 quick-start concerns would be answered.
 
 Certainly, it would make sense to start new development on Forrest 
 and/or Maven. If we spun off taglibs or rolled up our sleeves on 2.0, 
 then we'd definitely want to make a decision there. (Based primarily on 
 who was willing to do the work.)
 
 And, we do have Forrest running on the SourceForge site, so things like 
 RSS feeds and WikiDocs could be tried there first to see how helpful 
 they really are. (I must admit, I'm intrigued.)
 
 -Ted.
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Re: [struts-chain] Writing a command to process a Tiles Definition

2003-10-01 Thread Greg Reddin
I've found that experimenting has worked a lot better once I started 
doing it in the open :-).
Point taken :-)  Here's what I have so far, most definitely to be 
changed sometime soon.

Greg
/*
 * $Header: 
/home/cvspublic/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractExceptionHandler.java,v
 1.1 2003/08/31 21:53:00 craigmcc Exp $
 * $Revision: 1.1 $
 * $Date: 2003/08/31 21:53:00 $
 *
 * 
 *
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 2003 The Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in
 *the documentation and/or other materials provided with the
 *distribution.
 *
 * 3. The end-user documentation included with the redistribution, if
 *any, must include the following acknowlegement:
 *   This product includes software developed by the
 *Apache Software Foundation (http://www.apache.org/).
 *Alternately, this acknowlegement may appear in the software itself,
 *if and wherever such third-party acknowlegements normally appear.
 *
 * 4. The names The Jakarta Project, Struts, and Apache Software
 *Foundation must not be used to endorse or promote products derived
 *from this software without prior written permission. For written
 *permission, please contact [EMAIL PROTECTED]
 *
 * 5. Products derived from this software may not be called Apache
 *nor may Apache appear in their names without prior written
 *permission of the Apache Group.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * 
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * http://www.apache.org/.
 *
 */

package org.apache.struts.chain;


import javax.servlet.ServletContext;
import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.chain.Command;
import org.apache.commons.chain.Context;
import org.apache.commons.chain.web.servlet.ServletWebContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts.chain.Constants;
import org.apache.struts.config.ActionConfig;
import org.apache.struts.config.ExceptionConfig;
import org.apache.struts.config.ForwardConfig;
import org.apache.struts.config.ModuleConfig;
import org.apache.struts.util.RequestUtils;

import org.apache.struts.tiles.TilesUtil;
import org.apache.struts.tiles.TilesUtilStrutsImpl;
import org.apache.struts.tiles.DefinitionsFactory;
import org.apache.struts.tiles.Controller;
import org.apache.struts.tiles.ComponentDefinition;
import org.apache.struts.tiles.ComponentContext;
import org.apache.struts.tiles.DefinitionsUtil;


/**
 * pDetermine if the ForwardConfig invokes a Tiles Definition and 
 * invoke it./p
 *
 * @author Greg Reddin
 * @version $Revision: 1.1 $ $Date: 2003/09/26 21:53:00 $
 */

public class ProcessTilesDefinition extends AbstractPerformForward {


// -- Instance Variables
private String moduleConfigKey = Constants.MODULE_CONFIG_KEY;

private static final Log log =
LogFactory.getLog(ProcessTilesDefinition.class);


// -- Public Methods

protected void perform(Context context,ForwardConfig forwardConfig)
throws Exception {

ServletWebContext swcontext = (ServletWebContext) context;
String forwardPath = forwardConfig.getPath();
String uri = null;

// Resolve module-relative paths
if 

Re: The Forrest Option

2003-10-01 Thread Don Brown
On Wed, 1 Oct 2003, David Graham wrote:
snip /
 Rob mentioned something about Struts being setup for Maven already and I
 asked for clarification.  If that's true then I see no point in
 complicating things with another build tool.  Also, it seems that Maven in
 some ways is a superset of Forrest functionality.  It handles the website
 plus the jar builds.

Forrest is not a build tool.  If we went with Maven, Forrest would just be
another plugin, just like most people use the default site building
plugin.

 The more tools involved means it's harder to understand the build process
 which limits the number of people willing to put up with it and work on
 Struts.  My personal goal (and I hope the group's as well) is to have
 *one* easy to use tool that builds all of Struts.  I don't care if this is
 Ant, Maven, or Forrest as long as it's only one of them.

I agree, but if a Forrest plugin for Maven is used, you still use one tool
to build all of Struts.

Don


 David

 
  Though, a valid, technical objection would be that the website and the
  build (except for the current Cactus snafu) ain't broke, so we don't
  need to fix it. Steve's got everything running as valid XHTML. We're
  still using the original Apache look, but then so is the vast majority
  of other Apache projects. If we dusted off the struts-lib distribution
  (which appeared and disappeared during the last beta cycle), the
  quick-start concerns would be answered.
 
  Certainly, it would make sense to start new development on Forrest
  and/or Maven. If we spun off taglibs or rolled up our sleeves on 2.0,
  then we'd definitely want to make a decision there. (Based primarily on
  who was willing to do the work.)
 
  And, we do have Forrest running on the SourceForge site, so things like
  RSS feeds and WikiDocs could be tried there first to see how helpful
  they really are. (I must admit, I'm intrigued.)
 
  -Ted.
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 __
 Do you Yahoo!?
 The New Yahoo! Shopping - with improved product search
 http://shopping.yahoo.com

 -
 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: The Forrest Option

2003-10-01 Thread David Graham

--- Don Brown [EMAIL PROTECTED] wrote:
 On Wed, 1 Oct 2003, David Graham wrote:
 snip /
  Rob mentioned something about Struts being setup for Maven already and
 I
  asked for clarification.  If that's true then I see no point in
  complicating things with another build tool.  Also, it seems that
 Maven in
  some ways is a superset of Forrest functionality.  It handles the
 website
  plus the jar builds.
 
 Forrest is not a build tool.  If we went with Maven, Forrest would just
 be
 another plugin, just like most people use the default site building
 plugin.
 
  The more tools involved means it's harder to understand the build
 process
  which limits the number of people willing to put up with it and work
 on
  Struts.  My personal goal (and I hope the group's as well) is to have
  *one* easy to use tool that builds all of Struts.  I don't care if
 this is
  Ant, Maven, or Forrest as long as it's only one of them.
 
 I agree, but if a Forrest plugin for Maven is used, you still use one
 tool
 to build all of Struts.

Great, that sounds like we can get the features of Forrest while still
using one tool.  Thanks for the explanation.

David

 
 Don
 
 
  David
 
  
   Though, a valid, technical objection would be that the website and
 the
   build (except for the current Cactus snafu) ain't broke, so we don't
   need to fix it. Steve's got everything running as valid XHTML. We're
   still using the original Apache look, but then so is the vast
 majority
   of other Apache projects. If we dusted off the struts-lib
 distribution
   (which appeared and disappeared during the last beta cycle), the
   quick-start concerns would be answered.
  
   Certainly, it would make sense to start new development on Forrest
   and/or Maven. If we spun off taglibs or rolled up our sleeves on
 2.0,
   then we'd definitely want to make a decision there. (Based primarily
 on
   who was willing to do the work.)
  
   And, we do have Forrest running on the SourceForge site, so things
 like
   RSS feeds and WikiDocs could be tried there first to see how helpful
   they really are. (I must admit, I'm intrigued.)
  
   -Ted.
  
  
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
  __
  Do you Yahoo!?
  The New Yahoo! Shopping - with improved product search
  http://shopping.yahoo.com
 
  -
  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]
 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Re: The Forrest Option

2003-10-01 Thread Robert Leland
The whole Maven idea came because we felt the build
process of ant struts-legacy was broken or needed some
serious work. If Don wants to put energy into redoing our site's look
and feel that then here is my +1. Just know we are still
left with the original problem.
-Rob

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


Re: The Forrest Option

2003-10-01 Thread Robert Leland
David Graham wrote:

--- Robert Leland [EMAIL PROTECTED] wrote:
 

Don,

 I have one request and that is to leave the existing maven files
 in place since they do currently generate a web site with the reports.
   

I must be confused with the several projects I'm working on.  So, Maven is
already setup in Struts to run the builds?  If so, why are we going to add
Forrest to the builds?  Why not just start building the site and distro
with Maven?
 

The site was about like what Don had the front page, along with 
javadoc(current+legacy), clover reports, PMD, changelogs.
In fact it had all the features that the commons validator does, check 
it out:
   http://jakarta.apache.org/commons/validator/index.html
What was needed was to tie in the userguide, and other more detailed docs,
which should have been straight forward, but I have so little time now.

What wasn't setup in the builds was the sub-projects of contrib, etc...




David

 

Craig R. McClanahan wrote:

   

Don Brown wrote:

 

I know the discussion on whether to use Forrest or Maven to generate
   

the
   

Struts website was a few weeks back, but unfortunately, at the time, 
I was
too busy to participate.  I'd like to lay out a case for Forrest, not
   

to
   

insist Struts uses it, but rather to make sure the decision is made
   

with
   

all the available information.

In short, Forrest offers these benefits over Maven's website
   

generation:
   

- Multiple output formats including PDF and HTML
- SVG to PNG rendering
- Built for handling and aggregating multiple XML sources like RRS
   

(soon
   

wiki and Docbook)
- Power and features of Cocoon including charting, web services
integration, scripting support, etc.
Further, deciding between Forrest and Maven isn't an either/or 
situation.
There exists a Forrest plugin for Maven and it would be easy to 
integrate
Maven's reports into a Forrest site build.

To me, the key feature of Forrest is the first one listed, multiple
outputs.  This is especially useful for documentation as PDF is much
better than HTML for printing for the many users that like hard
   

copies.
   

Finally, Forrest content is built to be presented in not only
   

multiple
   

output formats, but multiple skins.  To demonstrate this, I've
   

quickly
   

redone the Struts site into Forrest format (which is very similiar to
   

the
current format thanks to the xhtml work of late).  I've only 
converted the
menu and the main page, which should be sufficient.

Please note, this examples are not polished and only serve to 
demonstrate
the skinability of Forrest.

Krysalis style:   http://www.twdata.org/dakine/site/
Avalon/Tigris style:  http://www.twdata.org/dakine/site1/
Forrest/XML Apache style: http://www.twdata.org/dakine/site2/
If we did decide to go with Forrest, I'm willing to convert the old
   

site
   

over and help handle any integration.  I'm most definately not an
   

expert
   

at Forrest, but am familiar with Cocoon and thankfully, Forrest is 
pretty
easy.

   

Looking at the potential here, I'm inclined to suggest we accept Don's
 

offer to help set this up -- although perhaps at first in a standalone
 

directory structure that can be undone if we discover that we don't 
like it.  One advantage is that we can do it without having to migrate
 

the build system to Maven first.

As for skins, I sure like the Avalon/Tigris or Krysalis examples, and 
sure wonder why the Forrest developers chose the native style they 
ship with, when they could do something as nice looking as either of 
these.  But, if I understand what you're saying, skins is essentially 
a runtime (when you're generating the HTML) choice; we don't have to 
make an irrevocable decision at any point in time.

 

Don

   

Craig



-
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]
   



__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 




Re: Build improvements (was Re: The Forrest Option)

2003-10-01 Thread Chris Gastin
Don:

I don't know much about Forrest, but I am starting to read up on it, where
possible. I am willing to throw some muscle work your way, just let me know
what I can do.

Chris Gastin

- Original Message - 
From: Don Brown [EMAIL PROTECTED]
To: Struts Developers List [EMAIL PROTECTED]
Sent: Wednesday, October 01, 2003 3:12 PM
Subject: Build improvements (was Re: The Forrest Option)


 Yes, this won't help our build at all.  Until we get Maven running, there
 are some options to bring some Maven features over to Ant.  For example,
 if we wanted to get rid of jars in our CVS, we could use something like
 http://www.krysalis.org/ruper/ or

http://blogs.codehaus.org/people/kevin/archives/2003/09/21/index.shtml#000168.
 Ant 1.6 has the ability to import build files which could help to spread
 the load.

 Don

 On Wed, 1 Oct 2003, Robert Leland wrote:

  The whole Maven idea came because we felt the build
  process of ant struts-legacy was broken or needed some
  serious work. If Don wants to put energy into redoing our site's look
  and feel that then here is my +1. Just know we are still
  left with the original problem.
 
  -Rob
 
 
  -
  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]



Re: The Forrest Option

2003-10-01 Thread Ted Husted
Robert Leland wrote:
 The whole Maven idea came because we felt the build
 process of ant struts-legacy was broken or needed some
 serious work. If Don wants to put energy into redoing our site's look
 and feel that then here is my +1. Just know we are still
 left with the original problem.
Struts-Legacy is a very special case. By rights, it should have gone to 
the Commons. It should be treated as if it were an external product. So, 
just like the Commons JARs, if you were doing everything from scratch, 
you would build struts-legacy first, and then the Struts core.

It's possible that the underlying problem is that we didn't release a 
struts-lib distribution with Struts 1.1 (as we did with some of the 
milestones).

-Ted.



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


Re: Build improvements (was Re: The Forrest Option)

2003-10-01 Thread Ted Husted
Don Brown wrote:
Yes, this won't help our build at all.  Until we get Maven running, there
are some options to bring some Maven features over to Ant.  For example,
if we wanted to get rid of jars in our CVS, we could use something like
http://www.krysalis.org/ruper/ or
http://blogs.codehaus.org/people/kevin/archives/2003/09/21/index.shtml#000168.
Ant 1.6 has the ability to import build files which could help to spread
the load.
Ah, well, you see we don't have JARs in our CVS. That's one of the 
reasons people have trouble building Struts at first. They have to go 
off and snag all the JARs themselves. Though, it seems like ruper might 
help in that regard.

-Ted.



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


Re: The Forrest Option

2003-10-01 Thread David Graham

--- Ted Husted [EMAIL PROTECTED] wrote:
 David Graham wrote:
  Rob mentioned something about Struts being setup for Maven already and
 I
  asked for clarification.  If that's true then I see no point in
  complicating things with another build tool.  Also, it seems that
 Maven in
  some ways is a superset of Forrest functionality.  It handles the
 website
  plus the jar builds.
  
  The more tools involved means it's harder to understand the build
 process
  which limits the number of people willing to put up with it and work
 on
  Struts.  My personal goal (and I hope the group's as well) is to have
  *one* easy to use tool that builds all of Struts.  I don't care if
 this is
  Ant, Maven, or Forrest as long as it's only one of them.
  
  David
 
 Yes, but the goals around here are achieved by people willing to do the 
 work.

I agree with you but it would be nice to have some kind of consensus
around the direction the build is going. 

I trust Don's judgement that Forrest is a good tool to use but I didn't
want the build to increase in complexity.  We can apparently plug Forrest
into a Maven build which I think is great.

There's only so much time we each have to spend on Struts.  I'd rather not
spend much time learning the build process.

David

 
 If Rob wants to do the work of migrating to Maven, for whatever reason, 
 that's fine with me. A lot of people I respect use Maven, it can't suck 
 that badly. If Don wants to do the work of migrating to Forrest, that's 
 fine too. A lot of people I respect use Forrest, so it can't suck that 
 badly either.
 
 But, if we're just looking for a one-tool solution that builds all of 
 Struts, we already have one. To change a page in the docs, you edit the
 
 corresponding XML page. To add to the menu, edit the project.xml for 
 that directory. Run the Ant target. Done.
 
 If we want Struts to be even easier to build for newbies, then we should
 
 bring back the struts-lib distribution. Download that with the source, 
 and you were ready to rock.
 
 -Ted.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Re: Build improvements (was Re: The Forrest Option)

2003-10-01 Thread Don Brown
On Wed, 1 Oct 2003, Ted Husted wrote:
snip /
 Ah, well, you see we don't have JARs in our CVS. That's one of the
 reasons people have trouble building Struts at first. They have to go
 off and snag all the JARs themselves. Though, it seems like ruper might
 help in that regard.

Doh!  I blocked out the memory of having to get everything setup.  I do
that with traumatic events :)

Don


 -Ted.



 -
 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: The Forrest Option

2003-10-01 Thread Craig R. McClanahan
David Graham wrote:

--- Ted Husted [EMAIL PROTECTED] wrote:
 

David Graham wrote:
   

Rob mentioned something about Struts being setup for Maven already and
 

I
   

asked for clarification.  If that's true then I see no point in
complicating things with another build tool.  Also, it seems that
 

Maven in
   

some ways is a superset of Forrest functionality.  It handles the
 

website
   

plus the jar builds.

The more tools involved means it's harder to understand the build
 

process
   

which limits the number of people willing to put up with it and work
 

on
   

Struts.  My personal goal (and I hope the group's as well) is to have
*one* easy to use tool that builds all of Struts.  I don't care if
 

this is
   

Ant, Maven, or Forrest as long as it's only one of them.

David
 

Yes, but the goals around here are achieved by people willing to do the 
work.
   

I agree with you but it would be nice to have some kind of consensus
around the direction the build is going. 

I trust Don's judgement that Forrest is a good tool to use but I didn't
want the build to increase in complexity.  We can apparently plug Forrest
into a Maven build which I think is great.
 

ducks
We can even add Forrest-based generation to our current Ant-based build 
scripts :-).  It's just an external tool, after all.
/ducks

There's only so much time we each have to spend on Struts.  I'd rather not
spend much time learning the build process.
David
 

Craig



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


[Vote] Choosing a build/doc gen tool(s) [was: Re: The Forrest Option]

2003-10-01 Thread James Mitchell
Most of us have given (or at least hinted at) our opinions, so let's give a
show of hands:

Mavenization:
[X] +1 - I am in favor of using Maven for build/dist/test/etc.
[ ] +0 - I agree, but cannot help at this time.
[ ] -0 - I don't agree, but not enough to give a -1.
[ ] -1 - I am not in favor of using Maven for build/dist/test/etc.

Forrestization:
[X] +1 - I am in favor of using Forrest for site generation.
[ ] +0 - I agree, but cannot help at this time.
[ ] -0 - I don't agree, but not enough to give a -1.
[ ] -1 - I am not in favor of using Forrest for site generation.

Other:
[X] - I would like to pursue the Maven-with-Forrest-as-a-plugin idea.


(If I left out any, please add them)



One question I have about all this, (and please forgive me if I missed it in
any of the messages in this thread) how does using either approach affect
the generation of the .tld from our source?




--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
770.822.3359
AIM:jmitchtx



- Original Message - 
From: Don Brown [EMAIL PROTECTED]
To: Struts Developers List [EMAIL PROTECTED]
Sent: Wednesday, October 01, 2003 7:18 PM
Subject: Re: The Forrest Option


 On Wed, 1 Oct 2003, Craig R. McClanahan wrote:
 snip /
  ducks
  We can even add Forrest-based generation to our current Ant-based build
  scripts :-).  It's just an external tool, after all.
  /ducks

 Actually it is very easy to do, using a forrest entity which imports
 forrest targets.  The only setup needed is to install forrest and set
 FORREST_HOME.  All the same ant targets used now to build the site can be
 used to build forrest.  If the Forrest route was accepted, I planned to do
 this from the start.

 Don

 
  There's only so much time we each have to spend on Struts.  I'd rather
not
  spend much time learning the build process.
  
  David
  
  
  Craig
 
 
 
  -
  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]



Re: [Vote] Choosing a build/doc gen tool(s) [was: Re: The Forrest Option]

2003-10-01 Thread Don Brown
I believe the question is not between maven and forrest, but rather
between Anakia/xdoc and forrest.  It is entirely possible to even use all
the report output from Maven and include it in a forrest build of the
website.  Default Maven uses the xdoc plugin.  All forrest would be doing
is replacing it with the Forrst plugin.  You would still be able to get
all the Maven-generated content.

Forrest is not a built tool.  It only replaces xdoc whether we keep Ant or
go to Maven.

Could this vote not be redone?

 Mavenization with xdoc plugin:
 [ ] +1 - I am in favor of using Maven and the xdoc plugin
 [ ] +0 - I agree, but cannot help at this time.
 [ ] -0 - I don't agree, but not enough to give a -1.
 [ ] -1 - I am not in favor of using the xdoc plugin

 Mavenization with the Forrest plugin:
 [ ] +1 - I am in favor of using Forrest instead of xdoc.
 [ ] +0 - I agree, but cannot help at this time.
 [ ] -0 - I don't agree, but not enough to give a -1.
 [ ] -1 - I am not in favor of using Forrest instead of xdoc.

I'm assuming a move to Maven is inevitable?

Don


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



RE: [Vote] Choosing a build/doc gen tool(s) [was: Re: The Forrest Option]

2003-10-01 Thread Steve Raeburn
Maven: +1
Forrest: -0
Forrest plug-in: Possibly, but not yet.

I'm more interested in streamlining the build and I don't consider the
website production to be  broken, so Forrest is not a big priority for me.
I'm not saying never, but I see Maven as more of a priority and would rather
wait and see on Forrest.

I'd like to add Maven now, learn from the experience on 1.x and then use
that to optimize the project organization and build process for version 2.

Steve

 -Original Message-
 From: James Mitchell [mailto:[EMAIL PROTECTED]
 Sent: October 1, 2003 9:58 PM
 To: Struts Developers List
 Subject: [Vote] Choosing a build/doc gen tool(s) [was: Re: The Forrest
 Option]


 Most of us have given (or at least hinted at) our opinions, so
 let's give a
 show of hands:

 Mavenization:
 [X] +1 - I am in favor of using Maven for build/dist/test/etc.
 [ ] +0 - I agree, but cannot help at this time.
 [ ] -0 - I don't agree, but not enough to give a -1.
 [ ] -1 - I am not in favor of using Maven for build/dist/test/etc.

 Forrestization:
 [X] +1 - I am in favor of using Forrest for site generation.
 [ ] +0 - I agree, but cannot help at this time.
 [ ] -0 - I don't agree, but not enough to give a -1.
 [ ] -1 - I am not in favor of using Forrest for site generation.

 Other:
 [X] - I would like to pursue the Maven-with-Forrest-as-a-plugin idea.


 (If I left out any, please add them)



 One question I have about all this, (and please forgive me if I
 missed it in
 any of the messages in this thread) how does using either approach affect
 the generation of the .tld from our source?




 --
 James Mitchell
 Software Engineer / Struts Evangelist
 http://www.struts-atlanta.org
 678.910.8017
 770.822.3359
 AIM:jmitchtx



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