Re: [chain] Chain as a mini-workflow engine?

2004-02-01 Thread mrdon
I thought about that too, but in the end, I think the chain is a little to
inflexible for application workflow.  Most workflows that I deal with are
more than a simple linear execution of actions and while you can get the
chain to branch by manipulating key values in the context, it is kinda
awkward and error prone.

The solution, I feel, is more along the lines of what Alex is putting
forth in his WARS architecture
(http://www.theserverside.com/news/thread.jsp?thread_id=23625),
specifically a clean separation between workflow and actions.  He sees
workflow being able to be implemented multiple ways although his primary
implemention is through a JSR-94-compatible engine.  Personally, I think
the ideal workflow implementation would use Cocoon's flowscript which
takes JavaScript and continuations support and uses them to smoothly
script a complex web transaction possibily involving multiple pages.

Don

> It's striking me that my chain-config.xml files are looking somewhat
> similar to the example workflow xml file over in the sandbox/workflow
> area.
>
> In addition ComposableRequestProcessor by it's very name has a
> workflow-ish ring to it.
>
> A "ComposableBusinessLogicInvoker" seems like it would fit the bill for
> me very nicely, and would be rapidly closing in on the stated goals for
> the functionality of the sandbox/workflow component.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


> It's striking me that my chain-config.xml files are looking somewhat
> similar to the example workflow xml file over in the sandbox/workflow
> area.
>
> In addition ComposableRequestProcessor by it's very name has a
> workflow-ish ring to it.
>
> A "ComposableBusinessLogicInvoker" seems like it would fit the bill for
> me very nicely, and would be rapidly closing in on the stated goals for
> the functionality of the sandbox/workflow component.
>
>
> -
> 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]



cvs commit: jakarta-struts/src/share/org/apache/struts/config ActionConfigMatcher.java

2004-01-05 Thread mrdon
mrdon   2004/01/05 10:50:00

  Modified:src/share/org/apache/struts/config ActionConfigMatcher.java
  Log:
  Better handle case when path attribute is empty
  PR: 25909
  Submitted by: Roberto Tyley
  
  Revision  ChangesPath
  1.5   +4 -4  
jakarta-struts/src/share/org/apache/struts/config/ActionConfigMatcher.java
  
  Index: ActionConfigMatcher.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/config/ActionConfigMatcher.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ActionConfigMatcher.java  25 Oct 2003 01:39:54 -  1.4
  +++ ActionConfigMatcher.java  5 Jan 2004 18:49:59 -   1.5
  @@ -182,7 +182,7 @@
   }
   
   config.setName(convertParam(orig.getName(), vars));
  -if (path.charAt(0) != '/') {
  +if (path.length() == 0 || path.charAt(0) != '/') {
   path = "/" + path;
   }
   config.setPath(path);
  
  
  

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



cvs commit: jakarta-struts build.xml

2003-12-22 Thread mrdon
mrdon   2003/12/22 13:55:26

  Modified:.build.xml
  Log:
  Removing accidental commit of addition of changelog target
  
  Revision  ChangesPath
  1.126 +0 -8  jakarta-struts/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-struts/build.xml,v
  retrieving revision 1.125
  retrieving revision 1.126
  diff -u -r1.125 -r1.126
  --- build.xml 22 Dec 2003 21:52:50 -  1.125
  +++ build.xml 22 Dec 2003 21:55:26 -  1.126
  @@ -250,14 +250,6 @@
   
   
   
  - 
  - 
  -   
  - 
  -
   
  
  
  

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



cvs commit: jakarta-struts/doc status.xml

2003-12-22 Thread mrdon
mrdon   2003/12/22 13:52:50

  Modified:.build.xml
   doc  status.xml
  Log:
  Fixed typo
  
  Revision  ChangesPath
  1.125 +8 -0  jakarta-struts/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-struts/build.xml,v
  retrieving revision 1.124
  retrieving revision 1.125
  diff -u -r1.124 -r1.125
  --- build.xml 27 Nov 2003 20:05:08 -  1.124
  +++ build.xml 22 Dec 2003 21:52:50 -  1.125
  @@ -250,6 +250,14 @@
   
   
   
  + 
  + 
  +   
  + 
  +
   
  
  
  
  1.55  +2 -2  jakarta-struts/doc/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/status.xml,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- status.xml20 Dec 2003 23:02:23 -  1.54
  +++ status.xml22 Dec 2003 21:52:50 -  1.55
  @@ -192,7 +192,7 @@
   
   Consider new Request Processor, if available (which might 
be based on the Commons Chain
   of Responsiblity package)
  -Consider migration to an Action context (which also might 
be based no the Commons Chain
  +Consider migration to an Action context (which also might 
be based on the Commons Chain
   of Responsiblity package)
   Consider enhanced support for other platforms (2.3/1.2) if 
this can be accomplished by
   specifying an alternate Request Processor
  
  
  

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



Re: Struts 2.0 Ideas (was Re: Struts 2.0 Discussion Forum)

2003-12-20 Thread mrdon
I think that sounds like a good compromise.  In my view, there are really
two types of "forms" - small ones with one or two parameters, and full
blown complex input forms.  In the former case, I think combining the form
and action is a good idea; the latter, probably not so much.

In WebWork2/XWork, as I understand it, your action can declare JavaBean
setters which will be automatically populated by the framework.  This
makes it very easy to unit test and frees the actions from any servlet
dependencies.  This approach works very well for actions that require a
couple of parameters, while I might favor the Struts approach for larger
forms.

To experiment adding these and other WebWork2/XWork features in Struts we
started the Struts Action Invocation Framework (SAIF) on struts.sf.net 
The Struts sf site is a great forum for trying out ideas before sticking
them in Struts core.  To implement the integrated form/action, we "scope"
actions (request/session/application), then use action interceptors to set
action JavaBean setters from the request parameters.  While SAIF certainly
isn't ready to be put in Struts core, the action interceptor idea is
showing promise and provides a good alternative to the more heavy-handed
ActionForm for simplier situations.

Don



> Hack might be too strong a word. I'd call it a reasonable alternative
> extension of the framework :)
>
> If we want to look at the WebWork/Maverick approach of using a single
> input/command handler, where Struts has separate input and command
> handlers, why not add the said standard ExecuteFormAction and
> ExecuteForm subclass to the build and see how the community reacts?
>
> After 1.2.0 rolls, we could add them to the nightly build and mark them
> experimental. When 1.2.1 comes around, we could then decide whether to
> leave them or pull them. If we decide to pull them, we can always start
> that toolkit on SourceForge, and let it live there.
>
> Or, if the community likes the idiom, then in 2.x we could provide the
> ExecuteForm behavior without providing an Action to do it.
>
> -Ted.
>
>
> Don Brown wrote:
>> Yes, it is possible to do a lot of things with Struts currently, but for
>> the most part, they are all hacks.  With Struts 2.0, we have a chance to
>> look at Struts best practices, other web frameworks, and current
>> technologies to design Struts to be the best and easiest framework for
>> web applications, and perhaps beyond.  My point is we should look at
>> whether to encourage through Struts design and documentation the
>> combination of forms and actions, or keep the current design.  In this
>> process, I think it is important to look at other frameworks and the
>> results of the design choices they made, particularly our close cousin
>> WebWork2/XWork.
>>
>> Don
>>
>> On Sat, 20 Dec 2003, Ted Husted wrote:
>>
>>
>>>Don Brown wrote:
>>>
Hmm...I'm not familiar with that discussion, but I don't see why
 general
form functionality couldn't be defined in an interface, but the
 ActionForm
left how it is.  Of course we also have a chance to do what Craig said
he'd change about Struts (at JavaOne 2003 JSF BOF) and combine forms
 and
actions.  WebWork2/XWork seems to have done well with that approach.
>>>
>>>It's been mentioned on the list that you can combine Actions and
>>>ActionForms already. All that's needed is an ActionForm subclass with an
>>>execute property, and a standard Action that simply returns that result
>>>instead:
>>>
>>>ExecuteForm ef = (ExecuteForm) form;
>>>return ef.execute(request,response,mapping,form);
>>>
>>>-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]
>>
>>
>
>
>
> -
> 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]



cvs commit: jakarta-struts/src/test/org/apache/struts/config CustomMappingTest.java struts-config-custom-mapping.xml TestModuleConfig.java

2003-12-09 Thread mrdon
mrdon   2003/12/09 13:40:43

  Modified:src/test/org/apache/struts/config TestModuleConfig.java
  Added:   src/test/org/apache/struts/config CustomMappingTest.java
struts-config-custom-mapping.xml
  Log:
  Added test case to test custom action mapping and set-property
  Created to disprove bug 23139
  
  Revision  ChangesPath
  1.3   +35 -1 
jakarta-struts/src/test/org/apache/struts/config/TestModuleConfig.java
  
  Index: TestModuleConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/config/TestModuleConfig.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestModuleConfig.java 26 Jul 2003 04:23:41 -  1.2
  +++ TestModuleConfig.java 9 Dec 2003 21:40:43 -   1.3
  @@ -62,6 +62,7 @@
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
   
  +import org.apache.struts.action.ActionMapping;
   import org.apache.commons.digester.Digester;
   import org.apache.struts.Globals;
   
  @@ -199,6 +200,39 @@
   
   }
   
  +   /**
  + * Tests a struts-config.xml that contains a custom mapping and property.
  + */
  +public void testCustomMappingParse() {
  +
  +
  +// Prepare a Digester for parsing a struts-config.xml file
  +Digester digester = new Digester();
  +digester.push(config);
  +digester.setNamespaceAware(true);
  +digester.setValidating(true);
  +digester.addRuleSet(new ConfigRuleSet());
  +digester.register
  +("-//Apache Software Foundation//DTD Struts Configuration 1.1//EN",
  + this.getClass().getResource
  + ("/org/apache/struts/resources/struts-config_1_1.dtd").toString());
   
  +// Parse the test struts-config.xml file
  +try {
  +InputStream input = this.getClass().getResourceAsStream
  +("/org/apache/struts/config/struts-config-custom-mapping.xml");
  +assertNotNull("Got an input stream for struts-config.xml", input);
  +digester.parse(input);
  +input.close();
  +} catch (Throwable t) {
  +t.printStackTrace(System.out);
  +fail("Parsing threw exception:  " + t);
  +}
   
  +// Perform assertion tests on the parsed information
  +CustomMappingTest map = 
(CustomMappingTest)config.findActionConfig("/editRegistration");
  +assertNotNull("Cannot find editRegistration mapping", map);
  +assertTrue("The custom mapping attribute has not been set", 
map.getPublic());
  +
  +}
   }
  
  
  
  1.1  
jakarta-struts/src/test/org/apache/struts/config/CustomMappingTest.java
  
  Index: CustomMappingTest.java
  ===
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2002 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,
   * SPE

RE: Maven test run

2003-11-28 Thread mrdon
Good point, thanks for solving the mystery.  I've updated the test to not
depend on the hashmap order.

Don

> I'm also getting a failure on TestActionConfigMatcher (using Ant build):
>
> Name isn't correct
> junit.framework.AssertionFailedError: Name isn't correct
> at
> org.apache.struts.config.TestActionConfigMatcher.testCheckSubstitutionsM
> atch(TestActionConfigMatcher.java:202)
> ...
>
> cfg.getName() is returning 'name2', but the test expects 'name'
>
> fConfigs contains:
> [0] = name2
> [1] = name
>
> The problem seems to be that the test relies on the order of the array
> elements but ActionConfig stores the configs in a HashMap which does not
> return its values collection in a guaranteed order. I would have
> expected the failure to be intermittent, but it fails consistently for
> me. Maybe in practice the order is consistent for a platform, JDK, day
> of the week etc. etc. :-)
>
> As an experiment, I changed the HashMap to a TreeMap, and the tests
> pass. I don't know if this would have any knock on effects elsewhere
> though. Might be better to rethink the test so it doesn't rely on the
> ordering. Or even just drop that section since it's really only testing
> findForwardConfigs(), not the matcher.
>
>
> Steve
>
>
>
>> -Original Message-
>> From: Don Brown [mailto:[EMAIL PROTECTED]
>> Sent: November 27, 2003 9:36 PM
>> To: Struts Developers List
>> Subject: Re: Maven test run
>>
>>
>> Hmmm...I just updated, uncommented those two lines, and ran "ant
>> test.junit" - all tests passed.  Anyone else?
>>
>> Don
>>
>> On Thu, 27 Nov 2003, Ted Husted wrote:
>>
>> > When I run the maven jar target, the upload tests fail
>> > (MultipartTestSuite).
>> >
>> > But, when I run the ant test.junit test, only the
>> > TestActionConfigMatcher test fails.
>> >
>> > Is it me, or do others share this experience?
>> >
>> > If so, any ideas as to why this would be?
>> >
>> > -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]
>>
>>
>>
>
>
>
> -
> 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]



cvs commit: jakarta-struts/src/test/org/apache/struts/config TestActionConfigMatcher.java

2003-11-28 Thread mrdon
mrdon   2003/11/28 00:48:29

  Modified:src/test/org/apache/struts/config
TestActionConfigMatcher.java
  Log:
  Fixed test to not depend on HashMap order for ForwardConfig's
  
  Revision  ChangesPath
  1.4   +14 -8 
jakarta-struts/src/test/org/apache/struts/config/TestActionConfigMatcher.java
  
  Index: TestActionConfigMatcher.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/config/TestActionConfigMatcher.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestActionConfigMatcher.java  28 Nov 2003 02:25:47 -  1.3
  +++ TestActionConfigMatcher.java  28 Nov 2003 08:48:29 -  1.4
  @@ -183,10 +183,16 @@
   assertTrue("Input hasn't been replaced", "input,Bar".equals(m.getInput()));
   
   ForwardConfig[] fConfigs = m.findForwardConfigs();
  -ForwardConfig cfg = fConfigs[0];
  -assertTrue("ContextRelative isn't correct", cfg.getContextRelative());
  -// :FIXME: assertTrue("Name isn't correct", "name".equals(cfg.getName()));
  -// :FIXME: assertTrue("Path hasn't been replaced", 
"path,Bar".equals(cfg.getPath()));
  +boolean found = false;
  +for (int x=0; x

cvs commit: jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/servlet PerformForward.java PerformInclude.java PopulateActionForm.java ValidateActionForm.java

2003-11-12 Thread mrdon
mrdon   2003/11/12 17:29:59

  Modified:contrib/struts-chain/src/conf chain-config.xml
   contrib/struts-chain/src/java/org/apache/struts/chain/legacy
ComposableRequestProcessor.java
   contrib/struts-chain/src/java/org/apache/struts/chain/servlet
PerformForward.java PerformInclude.java
PopulateActionForm.java ValidateActionForm.java
  Log:
  Added support for multipart requests (file uploads).  Should perfectly emulate
  legacy behavior.
  
  Revision  ChangesPath
  1.9   +2 -2  jakarta-struts/contrib/struts-chain/src/conf/chain-config.xml
  
  Index: chain-config.xml
  ===
  RCS file: /home/cvs/jakarta-struts/contrib/struts-chain/src/conf/chain-config.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- chain-config.xml  25 Oct 2003 01:16:52 -  1.8
  +++ chain-config.xml  13 Nov 2003 01:29:59 -  1.9
  @@ -58,7 +58,7 @@
  between the processXxx methods and the Commands that perform the
  corresponding functionality:
   
  -   processMultipartNOT SUPPORTED YET (so no file upload support)
  +   processMultipartIntegrated into servlet and legacy classes
   
  processPath SelectAction (which also does processMapping)
   
  
  
  
  1.5   +31 -4 
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/legacy/ComposableRequestProcessor.java
  
  Index: ComposableRequestProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/legacy/ComposableRequestProcessor.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ComposableRequestProcessor.java   29 Sep 2003 06:55:07 -  1.4
  +++ ComposableRequestProcessor.java   13 Nov 2003 01:29:59 -  1.5
  @@ -73,6 +73,7 @@
   import org.apache.struts.action.ActionServlet;
   import org.apache.struts.chain.Constants;
   import org.apache.struts.config.ModuleConfig;
  +import org.apache.struts.upload.MultipartRequestWrapper;
   
   import org.apache.commons.chain.Catalog;
   import org.apache.commons.chain.Command;
  @@ -95,6 +96,7 @@
* @author Craig R. McClanahan
* @author Cedric Dumoulin
* @author Greg Reddin
  + * @author Don Brown
*
* @version $Revision$ $Date$
* @since Struts 1.1
  @@ -173,6 +175,9 @@
   HttpServletResponse response)
   throws IOException, ServletException {
   
  +// Wrap the request in the case of a multipart request
  +request = processMultipart(request);
  +
   // Create and populate a Context for this request
   ServletWebContext context = new ServletWebContext();
   context.initialize(getServletContext(), request, response);
  @@ -197,6 +202,28 @@
   
   // Release the context.
   context.release();
  +}
  +
  +/**
  + * If this is a multipart request, wrap it with a special wrapper.
  + * Otherwise, return the request unchanged.
  + *
  + * @param request The HttpServletRequest we are processing
  + */
  +protected HttpServletRequest processMultipart(HttpServletRequest request) {
  +
  +if (!"POST".equalsIgnoreCase(request.getMethod())) {
  +return (request);
  +}
  +
  +String contentType = request.getContentType();
  +if ((contentType != null) &&
  +contentType.startsWith("multipart/form-data")) {
  +return (new MultipartRequestWrapper(request));
  +} else {
  +return (request);
  +}
  +
   }
   
   
  
  
  
  1.2   +15 -6 
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/servlet/PerformForward.java
  
  Index: PerformForward.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/servlet/PerformForward.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PerformForward.java   11 Aug 2003 04:55:34 -  1.1
  +++ PerformForward.java   13 Nov 2003 01:29:59 -  1.2
  @@ -63,12 +63,14 @@
   
   
   import javax.servlet.RequestDispatcher;
  +import javax.servlet.http.HttpServletRequest;
   import org.apache.commons.chain.Context;
   import org.apache.commons.chain.web.servlet.ServletWebContext;
   import org.apache.struts.Globals;
   import org.apache.struts.chain.AbstractPerformForward;
   import org.apache.struts.chain.Constants;
   import org.apache.struts.config.ForwardConfig;
  +import org.apache.struts.upload.MultipartRequestWrapper;
   import org.apache.struts.util.RequestUti

cvs commit: jakarta-struts/src/share/org/apache/struts/config ActionConfigMatcher.java

2003-10-24 Thread mrdon
mrdon   2003/10/24 18:39:54

  Modified:src/share/org/apache/struts/config ActionConfigMatcher.java
  Log:
  Made serializable as it is sometimes serialized with action forms
  
  Revision  ChangesPath
  1.4   +5 -4  
jakarta-struts/src/share/org/apache/struts/config/ActionConfigMatcher.java
  
  Index: ActionConfigMatcher.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/config/ActionConfigMatcher.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ActionConfigMatcher.java  18 Oct 2003 02:48:16 -  1.3
  +++ ActionConfigMatcher.java  25 Oct 2003 01:39:54 -  1.4
  @@ -61,6 +61,7 @@

   package org.apache.struts.config;
   
  +import java.io.Serializable;
   import java.util.ArrayList;
   import java.util.HashMap;
   import java.util.Iterator;
  @@ -82,7 +83,7 @@
*
* @authorDon Brown
*/
  -public class ActionConfigMatcher {
  +public class ActionConfigMatcher implements Serializable {
   
   /**  
* The logging instance 
  
  
  

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



cvs commit: jakarta-struts/web/example/WEB-INF action.xml struts-config-registration.xml validation.xml

2003-10-24 Thread mrdon
mrdon   2003/10/24 18:37:12

  Modified:src/example/org/apache/struts/webapp/example
EditRegistrationAction.java
   web/example/WEB-INF action.xml
struts-config-registration.xml validation.xml
  Added:   web/example Registration.jsp
  Removed: web/example registration.jsp
  Log:
  Updated the struts-example webapp to include the usage of wildcards in
  action mappings
  
  Revision  ChangesPath
  1.15  +5 -5  
jakarta-struts/src/example/org/apache/struts/webapp/example/EditRegistrationAction.java
  
  Index: EditRegistrationAction.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/example/org/apache/struts/webapp/example/EditRegistrationAction.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- EditRegistrationAction.java   4 Sep 2003 16:03:42 -   1.14
  +++ EditRegistrationAction.java   25 Oct 2003 01:37:11 -  1.15
  @@ -145,7 +145,7 @@
* Since this Action has a RegistrationForm attribute, struts has
* already created the form.  The check below is just to guard against
* a null pointer exception in case someone inadvertently removes the 
  - * attribute="registrationForm" from struts-config-registration.xml
  + * attribute="RegistrationForm" from struts-config-registration.xml
*/
   if (form == null) {
   if (log.isTraceEnabled()) {
  
  
  
  1.1  jakarta-struts/web/example/Registration.jsp
  
  Index: Registration.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <%@ taglib uri="/WEB-INF/app.tld"prefix="app" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  

  
  
  
  
  

  
  

  
  
  
  
  
  
  
  
  
  
  

  
:
  
  

  


  <%--
  
  --%>


  

  

  
:
  
  

  

  

  
:
  
  

  

  

  
:
  
  

  

  

  
:
  
  

  

  

  
:
  
  

  

  

  

  

  
  

  

 

  

  

  
  
  
  
  
  
  
  
  
  
  
  

  

  
  

  
  

  
  

  
  

  

  
  

  

  
  

  
  

  
  

  
  

  


  

  

  
  
  
  
  

  
   
  
  
  
  
  
  
  
  
  
  
  
  1.9   +4 -4  jakarta-struts/web/example/WEB-INF/action.xml
  
  Index: action.xml
  ===
  RCS file: /home/cvs/jakarta-struts/web/example/WEB-INF/action.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- action.xml11 Apr 2001 02:08:20 -  1.8
  +++ action.xml25 Oct 2003 01:37:12 -  1.9
  @@ -16,9 +16,9 @@
 
 
  -
  +
 
   
 
  @@ -48,9 +48,9 @@
 
 
  +inputForm="/Registration.jsp">
   
 
   
  
  
  
  1.4   +12 -12
jakarta-struts/web/example/WEB-INF/struts-config-registration.xml
  
  Index: struts-config-registration.xml
  ===
  RCS file: 
/home/cvs/jakarta-struts/web/example/WEB-INF/struts-config-registration.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- struts-config-registration.xml10 Aug 2003 02:52:55 -  1.3
  +++ struts-config-registration.xml25 Oct 2003 01:37:12 -  1.4
  @@ -19,34 +19,34 @@
 
   
   
  -
   
 
   
 
 
  -
  +
 
   
 
 
   
  -
  -
  +
  -  
  +  
   
   
  -
  -
  +
  +  input="{1}"/>
   
 
   
  
  
  
  1.10  +2 -2  jakarta-struts/web/example/WEB-INF/validation.xml
  
  Index: validation.xml
  ===
  RCS file: /home/cvs/jakarta-struts/web/example/WEB-INF/validation.xml,v
  retrieving revision 1.9
  ret

cvs commit: jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/servlet AuthorizeAction.java

2003-10-24 Thread mrdon
mrdon   2003/10/24 18:16:52

  Modified:contrib/struts-chain/src/conf chain-config.xml
   contrib/struts-chain/src/java/org/apache/struts/chain
AbstractAuthorizeAction.java
   contrib/struts-chain/src/java/org/apache/struts/chain/servlet
AuthorizeAction.java
  Added:   contrib/struts-chain/src/java/org/apache/struts/chain
UnauthorizedActionException.java
  Log:
  Changed AuthorizeAction to throw an UnauthorizedActionException rather
  than returning an HTTP 403 error
  
  Revision  ChangesPath
  1.8   +0 -0  jakarta-struts/contrib/struts-chain/src/conf/chain-config.xml
  
  Index: chain-config.xml
  ===
  RCS file: /home/cvs/jakarta-struts/contrib/struts-chain/src/conf/chain-config.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  
  
  
  1.2   +59 -5 
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractAuthorizeAction.java
  
  Index: AbstractAuthorizeAction.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractAuthorizeAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractAuthorizeAction.java  24 Oct 2003 02:35:02 -  1.1
  +++ AbstractAuthorizeAction.java  25 Oct 2003 01:16:52 -  1.2
  @@ -75,6 +75,9 @@
   import org.apache.struts.chain.util.ClassUtils;
   import org.apache.struts.config.ActionConfig;
   import org.apache.struts.config.FormBeanConfig;
  +import org.apache.struts.util.MessageResources;
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   
   
   /**
  @@ -93,6 +96,10 @@
   
   
   private String actionConfigKey = Constants.ACTION_CONFIG_KEY;
  +private String actionServletKey = Constants.ACTION_SERVLET_KEY;
  +
  +private static final Log log =
  +LogFactory.getLog(AbstractAuthorizeAction.class);
   
   
   // -- Properties
  @@ -122,6 +129,32 @@
   this.actionConfigKey = actionConfigKey;
   
   }
  +
  +
  +/**
  + * Return the context attribute key under which the
  + * ActionServlet for the currently selected application
  + * action is stored.
  + */
  +public String getActionServletKey() {
  +
  +return (this.actionServletKey);
  +
  +}
  +
  +
  +/**
  + * Set the context attribute key under which the
  + * ActionServlet for the currently selected application
  + * action is stored.
  + *
  + * @param actionServletKey The new context attribute key
  + */
  +public void setActionServletKey(String actionServletKey) {
  +
  +this.actionServletKey = actionServletKey;
  +
  +}
   
   
   // -- Public Methods
  @@ -149,7 +182,28 @@
   return (false);
   }
   
  -return !(isAuthorized(context, roles, actionConfig));
  +boolean throwEx = false;
  +try {
  +throwEx = !(isAuthorized(context, roles, actionConfig));
  +}
  +catch (Exception ex) {
  +throwEx = true;
  +log.error("Unable to complete authorization process", ex);
  +}
  +
  +if (throwEx) {
  +// Retrieve internal message resources
  +ActionServlet servlet = 
  +(ActionServlet) context.get(actionServletKey);
  +MessageResources resources = servlet.getInternal();
  +
  +// The current user is not authorized for this action
  +throw new UnauthorizedActionException(
  +resources.getMessage("notAuthorized",
  +actionConfig.getPath()));
  +} else {
  +return (false);
  +}
   
   }
   
  
  
  
  1.1  
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/UnauthorizedActionException.java
  
  Index: UnauthorizedActionException.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/UnauthorizedActionException.java,v
 1.1 2003/10/25 01:16:52 mrdon Exp $
   * $Revision: 1.1 $
   * $Date: 2003/10/25 01:16:52 $
   *
   * 
   *
   * 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 con

cvs commit: jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain AbstractPerformInclude.java

2003-10-24 Thread mrdon
mrdon   2003/10/24 18:12:38

  Modified:contrib/struts-chain/src/java/org/apache/struts/chain
AbstractPerformInclude.java
  Log:
  Fixed bug returning wrong value
  
  Revision  ChangesPath
  1.2   +1 -1  
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractPerformInclude.java
  
  Index: AbstractPerformInclude.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractPerformInclude.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractPerformInclude.java   25 Oct 2003 00:02:33 -  1.1
  +++ AbstractPerformInclude.java   25 Oct 2003 01:12:38 -  1.2
  @@ -163,7 +163,7 @@
   String include = (String)
   context.get(getIncludeKey());
   if (include == null) {
  -return (true);
  +return (false);
   }
   
   // Determine the currect uri
  
  
  

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



cvs commit: jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/servlet PerformInclude.java

2003-10-24 Thread mrdon
mrdon   2003/10/24 17:02:33

  Modified:contrib/struts-chain/src/conf chain-config.xml
   contrib/struts-chain/src/java/org/apache/struts/chain
Constants.java
  Added:   contrib/struts-chain/src/java/org/apache/struts/chain
AbstractPerformInclude.java SelectInclude.java
   contrib/struts-chain/src/java/org/apache/struts/chain/servlet
PerformInclude.java
  Log:
  Adding processInclude() replacement commands
  
  Revision  ChangesPath
  1.7   +12 -2 jakarta-struts/contrib/struts-chain/src/conf/chain-config.xml
  
  Index: chain-config.xml
  ===
  RCS file: /home/cvs/jakarta-struts/contrib/struts-chain/src/conf/chain-config.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- chain-config.xml  24 Oct 2003 02:35:02 -  1.6
  +++ chain-config.xml  25 Oct 2003 00:02:32 -  1.7
  @@ -88,7 +88,7 @@
   
  processForward  SelectForward
   
  -   processInclude  NOT SUPPORTED YET
  +   processInclude  SelectInclude / PerformInclude
   
  processActionCreate CreateAction
   
  @@ -161,7 +161,17 @@
 
  
  +  className="org.apache.struts.chain.servlet.SelectForward"/>
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
   
   
 
  
  
  
  1.5   +10 -4 
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/Constants.java
  
  Index: Constants.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/Constants.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Constants.java10 Oct 2003 04:26:16 -  1.4
  +++ Constants.java25 Oct 2003 00:02:33 -  1.5
  @@ -132,7 +132,13 @@
* will be stored.
*/
   public static final String FORWARD_CONFIG_KEY = "forwardConfig";
  -
  +
  +/**
  + * The default context attribute under which the
  + * include path for the current request
  + * will be stored.
  + */
  +public static final String INCLUDE_KEY = "include";
   
   /**
* The default context attribute under which the
  
  
  
  1.1  
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractPerformInclude.java
  
  Index: AbstractPerformInclude.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractPerformInclude.java,v
 1.1 2003/10/25 00:02:33 mrdon Exp $
   * $Revision: 1.1 $
   * $Date: 2003/10/25 00:02:33 $
   *
   * 
   *
   * 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

cvs commit: jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/servlet AuthorizeAction.java RequestNoCache.java SelectForward.java SetContentType.java

2003-10-23 Thread mrdon
mrdon   2003/10/23 19:35:02

  Modified:contrib/struts-chain/src/conf chain-config.xml
  Added:   contrib/struts-chain/src/java/org/apache/struts/chain
AbstractAuthorizeAction.java
AbstractRequestNoCache.java
AbstractSelectForward.java
AbstractSetContentType.java
   contrib/struts-chain/src/java/org/apache/struts/chain/servlet
AuthorizeAction.java RequestNoCache.java
SelectForward.java SetContentType.java
  Log:
  Adding in some missing pieces.  Pretty much straight one-to-one mappings of
  RequestProcessor methods to chain actions.
  
  Revision  ChangesPath
  1.6   +26 -5 jakarta-struts/contrib/struts-chain/src/conf/chain-config.xml
  
  Index: chain-config.xml
  ===
  RCS file: /home/cvs/jakarta-struts/contrib/struts-chain/src/conf/chain-config.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- chain-config.xml  10 Oct 2003 04:26:16 -  1.5
  +++ chain-config.xml  24 Oct 2003 02:35:02 -  1.6
  @@ -66,9 +66,9 @@
   
  processLocale   SelectLocale
   
  -   processContent  NOT SUPPORTED YET
  +   processContent  SetContentType
   
  -   processNoCache  NOT SUPPORTED YET
  +   processNoCache  RequestNoCache
   
  processPreprocess   LookupCommand with optional="true".  Multiple
  occurrences of this can easily be added, to
  @@ -78,7 +78,7 @@
   
  processMapping  SelectAction (which also does processPath)
   
  -   processRolesNOT SUPPORTED YET
  +   processRolesAuthorizeAction
   
  processActionForm   CreateActionForm
   
  @@ -86,7 +86,7 @@
   
  processValidate ValidateActionForm / SelectInput
   
  -   processForward  NOT SUPPORTED YET
  +   processForward  SelectForward
   
  processInclude  NOT SUPPORTED YET
   
  @@ -116,11 +116,26 @@
 
 
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
   
   
 
 
  +  
  +  
  +  
  +  
   
   
 
  @@ -141,6 +156,12 @@
 
 
  +   
  +   
  +  
  +   
   
   
 
  
  
  
  1.1  
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractAuthorizeAction.java
  
  Index: AbstractAuthorizeAction.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractAuthorizeAction.java,v
 1.1 2003/10/24 02:35:02 mrdon Exp $
   * $Revision: 1.1 $
   * $Date: 2003/10/24 02:35:02 $
   *
   * 
   *
   * 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 E

cvs commit: jakarta-struts/src/share/org/apache/struts/config ActionConfigMatcher.java

2003-10-17 Thread mrdon
mrdon   2003/10/17 19:48:16

  Modified:src/share/org/apache/struts/config ActionConfigMatcher.java
  Log:
  Better error checking
  
  Revision  ChangesPath
  1.3   +1 -1  
jakarta-struts/src/share/org/apache/struts/config/ActionConfigMatcher.java
  
  Index: ActionConfigMatcher.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/config/ActionConfigMatcher.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ActionConfigMatcher.java  10 Oct 2003 23:19:57 -  1.2
  +++ ActionConfigMatcher.java  18 Oct 2003 02:48:16 -  1.3
  @@ -110,7 +110,7 @@
   String path;
   for (int x = 0; x < configs.length; x++) {
   path = configs[x].getPath();
  -if (path.indexOf('*') > -1) {
  +if (path != null && path.indexOf('*') > -1) {
   if (path.length() > 0 && path.charAt(0) == '/') {
   path = path.substring(1);
   }
  
  
  

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



cvs commit: jakarta-struts/doc/resources extensions.xml views.xml

2003-10-17 Thread mrdon
mrdon   2003/10/17 19:45:53

  Modified:doc  status.xml
   doc/resources extensions.xml views.xml
  Log:
  Updated links to several struts.sf.net projects
  
  Revision  ChangesPath
  1.46  +3 -3  jakarta-struts/doc/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/status.xml,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- status.xml15 Sep 2003 12:23:04 -  1.45
  +++ status.xml18 Oct 2003 02:45:52 -  1.46
  @@ -171,8 +171,8 @@
   http://strutstestcase.sourceforge.net/";>TestCase
   http://stxx.sourceforge.net";>Stxx 
(XLST)
   http://www.livinglogic.de/Struts/";>Workflow
  -http://struts.sf.net";>Cocoon 
Plugin
  -http://struts.sf.net";>Scriptable Actions 
using BSF (Bean Scripting
  +http://struts.sf.net/struts-cocoon/";>Cocoon Plugin
  +http://struts.sf.net/struts-bsf/";>Scriptable Actions using BSF (Bean 
Scripting
   Framework)
   
   
  
  
  
  1.16  +1 -1  jakarta-struts/doc/resources/extensions.xml
  
  Index: extensions.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/resources/extensions.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- extensions.xml9 Sep 2003 17:49:20 -   1.15
  +++ extensions.xml18 Oct 2003 02:45:52 -  1.16
  @@ -15,7 +15,7 @@
   http://struts.sf.net/strutsdoc/";>StrutsDoc - A 
JavaDoc-type documentation tool for Struts and Struts-related configuration files
   http://www.twdata.org/struts-wildcard/";>Wildcard-Matched Actions by 
Don Brown - Allows wildcards to be used in Struts 1.1+ action mappings.
   http://alphaworks.ibm.com/tech/strutsscripting";>Struts Action 
Scripting by IBM AlphaWorks - a Struts plug-in that allows development of Struts 
actions using the power and simplicity of any favorite scripting language.
  -http://struts.sf.net";>Scriptable Actions by Don 
Brown - Allows Struts Actions to be written in the scripting language of one's choice 
rather than as Java classes. It uses the http://jakarta.apache.org/bsf";>Beans 
Scripting Framework to allow scripts to be written in any language BSF supports 
like Python (using http://www.jython.org/";>Jython), Ruby (using http://jruby.sourceforge.net/";>JRuby), JavaScript (using http://www.mozilla.org/rhino/";>Rhino), or http://www.beanshell.org";>BeanShell.
  +http://struts.sf.net/struts-bsf/";>Scriptable 
Actions by Don Brown - Allows Struts Actions to be written in the 
scripting language of one's choice rather than as Java classes. It uses the http://jakarta.apache.org/bsf";>Beans Scripting Framework to allow scripts to 
be written in any language BSF supports like Python (using http://www.jython.org/";>Jython), Ruby (using http://jruby.sourceforge.net/";>JRuby), JavaScript (using http://www.mozilla.org/rhino/";>Rhino), or http://www.beanshell.org";>BeanShell.
   http://jcorporate.com/";>Expresso 5.0.3 by 
jCorporate - Expresso provides a foundation set of reusable, standards-based Java 
software components designed to shorten time-to-delivery of Web applications, and is 
integrated with the Struts framework. See also http://www.xenonsoft.demon.co.uk/products/java.html";>Best Practice with Expresso 
Framework 4.0.
   http://sourceforge.net/projects/imagebuttonbean/";>ImageButtonBeanManager
 by Ken Fitzpatrick. Combines the HTML Image Tag and the ImageButtonBean class in a 
manner analgous to the Struts HTML Submit Tag.
   http://dynclass.sourceforge.net/";>dynclass.sourceforge.net 
by John Raley. A Class-creation API with very simple but powerful Map-to-JavaBeans 
translation
  
  
  
  1.10  +1 -1  jakarta-struts/doc/resources/views.xml
  
  Index: views.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/resources/views.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- views.xml 9 Sep 2003 17:49:20 -   1.9
  +++ views.xml 18 Oct 2003 02:45:52 -  1.10
  @@ -12,7 +12,7 @@
- 
   -->
   
  -http://struts.sf.net";>Cocoon Plugin by Don Brown. 
Integrates http://cocoon.apache.org";>Apache Cocoon into the Struts 1.1+ 
framework.  Struts forwards can be passed to Cocoon to be rendered in Cocoon XML 
pipelines.  Works alongside traditional Struts forwards.
  +htt

cvs commit: jakarta-struts/src/share/org/apache/struts/config ActionConfigMatcher.java

2003-10-10 Thread mrdon
mrdon   2003/10/10 16:19:57

  Modified:src/test/org/apache/struts/config
TestActionConfigMatcher.java
   src/share/org/apache/struts/config ActionConfigMatcher.java
  Log:
  Added more unit tests and fixed a bug they discovered (ExceptionConfigs
  not being copied over)
  
  Revision  ChangesPath
  1.2   +29 -5 
jakarta-struts/src/test/org/apache/struts/config/TestActionConfigMatcher.java
  
  Index: TestActionConfigMatcher.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/config/TestActionConfigMatcher.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestActionConfigMatcher.java  10 Oct 2003 22:09:26 -  1.1
  +++ TestActionConfigMatcher.java  10 Oct 2003 23:19:57 -  1.2
  @@ -167,7 +167,10 @@
   configs[0] = mapping;
   ActionConfigMatcher matcher = new ActionConfigMatcher(configs);
   
  -assertNotNull("ActionConfig should be matched", matcher.match("/fooBar"));
  +ActionConfig matched = matcher.match("/fooBar");
  +assertNotNull("ActionConfig should be matched", matched);
  +assertTrue("ActionConfig should have two action forward", 
matched.findForwardConfigs().length == 2);
  +assertTrue("ActionConfig should have two exception forward", 
matched.findExceptionConfigs().length == 2);
   }
   
   public void testCheckSubstitutionsMatch() {
  @@ -219,12 +222,33 @@
   mapping.setInclude("include,{1}");
   mapping.setInput("input,{1}");
   
  -ForwardConfig[] fConfigs = mapping.findForwardConfigs();
   ForwardConfig cfg = new ActionForward();
   cfg.setContextRelative(true);
   cfg.setName("name");
   cfg.setPath("path,{1}");
   mapping.addForwardConfig(cfg);
  +
  +cfg = new ActionForward();
  +cfg.setContextRelative(true);
  +cfg.setName("name2");
  +cfg.setPath("path2");
  +mapping.addForwardConfig(cfg);
  + 
  +ExceptionConfig excfg = new ExceptionConfig();
  +excfg.setKey("foo");
  +excfg.setType("foo.Bar");
  +excfg.setPath("path");
  +mapping.addExceptionConfig(excfg);
  +
  +excfg = new ExceptionConfig();
  +excfg.setKey("foo2");
  +excfg.setType("foo.Bar2");
  +excfg.setPath("path2");
  +mapping.addExceptionConfig(excfg);
  +
  +
  +mapping.freeze();
  +
   return mapping;
   }
   
  
  
  
  1.2   +8 -0  
jakarta-struts/src/share/org/apache/struts/config/ActionConfigMatcher.java
  
  Index: ActionConfigMatcher.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/config/ActionConfigMatcher.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ActionConfigMatcher.java  10 Oct 2003 22:03:33 -  1.1
  +++ ActionConfigMatcher.java  10 Oct 2003 23:19:57 -  1.2
  @@ -203,6 +203,14 @@
   config.removeForwardConfig(fConfigs[x]);
   config.addForwardConfig(cfg);
   }
  +
  +ExceptionConfig[] exConfigs = orig.findExceptionConfigs();
  +for (int x = 0; x < exConfigs.length; x++) {
  +config.addExceptionConfig(exConfigs[x]);
  +}
  +
  +config.freeze();
  +
   return config;
   }
   
  
  
  

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



cvs commit: jakarta-struts/src/test/org/apache/struts/action TestActionMappingMatcher.java

2003-10-10 Thread mrdon
mrdon   2003/10/10 15:37:20

  Removed: src/test/org/apache/struts/action
TestActionMappingMatcher.java
  Log:
  Removed old test

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



cvs commit: jakarta-struts build-tests.xml

2003-10-10 Thread mrdon
mrdon   2003/10/10 15:09:26

  Modified:.build-tests.xml
  Added:   src/test/org/apache/struts/config
TestActionConfigMatcher.java
  Log:
  Updated unit tests for ActionConfigMatcher
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/config/TestActionConfigMatcher.java
  
  Index: TestActionConfigMatcher.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/config/TestActionConfigMatcher.java,v
 1.1 2003/10/10 22:09:26 mrdon Exp $
   * $Revision: 1.1 $
   * $Date: 2003/10/10 22:09:26 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2001 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.config;
  
  
  import java.net.MalformedURLException;
  import java.util.HashMap;
  import java.util.Map;
  
  import javax.servlet.jsp.JspException;
  
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  import org.apache.struts.Globals;
  import org.apache.struts.action.ActionForm;
  import org.apache.struts.action.ActionMapping;
  import org.apache.struts.action.ActionForward;
  import org.apache.struts.action.DynaActionForm;
  import org.apache.struts.action.RequestProcessor;
  import org.apache.struts.config.ForwardConfig;
  import org.apache.struts.config.ActionConfig;
  import org.apache.struts.config.ModuleConfig;
  import org.apache.struts.mock.MockFormBean;
  import org.apache.struts.mock.MockPrincipal;
  import org.apache.struts.mock.TestMockBase;
  import org.apache.struts.taglib.html.Constants;
  
  
  /**
   * Unit tests for org.apache.struts.util.ActionConfigMatcher.
   *
   * @author Don Brown
   * @version $Revision: 1.1 $ $Date: 2003/10/10 22:09:26 $
   */
  
  public class TestActionConfigMatcher extends TestMockBase {
  
  
  // - Basics
  
  
  public TestActionConfigMatcher(String name) {
  super(name);
  }
  
  
  public static void main(String args[]) {
  junit.awtui.TestRunner.main
  (new String[] { TestActionConfigMatcher.class.getName() } );

cvs commit: jakarta-struts/src/share/org/apache/struts/config/impl ModuleConfigImpl.java

2003-10-10 Thread mrdon
mrdon   2003/10/10 15:03:33

  Modified:src/share/org/apache/struts/action RequestProcessor.java
   src/share/org/apache/struts/config/impl
ModuleConfigImpl.java
  Added:   src/share/org/apache/struts/config ActionConfigMatcher.java
  Removed: src/share/org/apache/struts/action ActionMappingMatcher.java
  Log:
  Moved wildcard action matching code into ModuleConfigImpl.findActionConfig()
  as several taglibs needed to match action mappings containing wildcards.
  Improved action mapping cloning to truely clone ActionConfig to support
  alternate action mapping classes.
  
  Revision  ChangesPath
  1.38  +5 -15 
jakarta-struts/src/share/org/apache/struts/action/RequestProcessor.java
  
  Index: RequestProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/RequestProcessor.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- RequestProcessor.java 5 Oct 2003 17:45:14 -   1.37
  +++ RequestProcessor.java 10 Oct 2003 22:03:33 -  1.38
  @@ -145,11 +145,6 @@
*/
   protected ActionServlet servlet = null;
   
  -/**
  - * Matches action mapping paths against compiled wildcard patterns
  - */
  -protected ActionMappingMatcher matcher = null;
  -
   // - Public Methods
   
   
  @@ -188,7 +183,6 @@
   
   this.servlet = servlet;
   this.moduleConfig = moduleConfig;
  -matcher = new ActionMappingMatcher(moduleConfig.findActionConfigs());
   }
   
   /**
  @@ -663,13 +657,9 @@
  String path)
   throws IOException {
   
  -// Is there a directly defined or wildcard-matched mapping for this 
  -// path?
  +// Is there a mapping for this path?
   ActionMapping mapping = (ActionMapping)
   moduleConfig.findActionConfig(path);
  -if (mapping == null) {
  -mapping = matcher.match(path);
  -}
   
   // If a mapping is found, put it in the request and return it
   if (mapping != null) {
  
  
  
  1.1  
jakarta-struts/src/share/org/apache/struts/config/ActionConfigMatcher.java
  
  Index: ActionConfigMatcher.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/config/ActionConfigMatcher.java,v 
1.1 2003/10/10 22:03:33 mrdon Exp $
   * $Revision: 1.1 $
   * $Date: 2003/10/10 22:03:33 $
   *
   * 
   *
   * 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 acknowledgement:
   *   "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 name, without prior written
   *permission of the Apache Software Foundation.
   *
   * 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

cvs commit: jakarta-struts/doc/userGuide building_controller.xml index.xml

2003-10-10 Thread mrdon
mrdon   2003/10/10 13:10:35

  Modified:doc/userGuide building_controller.xml index.xml
  Log:
  Added a section on using wildcards in action mappings
  
  Revision  ChangesPath
  1.71  +116 -2jakarta-struts/doc/userGuide/building_controller.xml
  
  Index: building_controller.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/building_controller.xml,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- building_controller.xml   11 Sep 2003 21:31:23 -  1.70
  +++ building_controller.xml   10 Oct 2003 20:10:35 -  1.71
  @@ -1039,7 +1039,8 @@
   
   path - The request URI path that is matched to select this
   mapping.  
  -See below for examples of how matching works.
  +See below for examples of how matching works and how to use wildcards 
  +to match multiple request URIs.
   
   
   
  @@ -1360,7 +1361,120 @@
   
   
   
  -
  +
  +
  +
  +As a Struts application grows in size, so will the number of action 
  +mappings.  Wildcards can be used to combine similiar mappings into one
  +more generic mapping.  
  +
  +
  +The best way to explain wildcards is to show an example and walk through 
  +how it works.  This example modifies the previous mapping in the ActionMapping Example section to use
  +wildcards to match all pages that start with /edit:
  + 
  +
  +
  +
  +
  +The "*" in the path attribute allows the mapping to match the 
  +request URIs /editSubscription, editRegistration,
  +or any other URI that starts with 
  +/edit, however /editSubscription/add would not be 
  +matched.  The part of 
  +the URI matched by the wildcard will then be substituted into various 
  +attributes of the action mapping and its action forwards replacing 
  +{1}.
  +For the rest of the request, Struts will see the action mapping and its 
  +action forwards containing the new values.
  +
  +
  +
  +Wildcard patterns can contain one or more of the following special tokens:
  +
  +
  +
  +
  +
  +*
  +
  +
  +Matches zero or more characters excluding the 
  +slash ('/') character.
  +
  +   
  +
  +**
  +
  +
  +Matches zero or more characters including the 
  +slash ('/') character.
  +
  +   
  +
  +\character
  +
  +
  +The backslash character is used as an escape
  +sequence.  Thus \* matches the character asterisk 
  +('*'), and \\
  +matches the character backslash ('\').
  +
  +
  +
  +
  +
  +In the action mapping and action forwards, the wildcard-matched values can
  +be accessed with the token {N} where N
  +is a number from 1 to 9 indicating
  +which wildcard-matched value to substitute.  The whole request URI can be
  +accessed with the {0} token.
  +
  +
  +
  +The action mapping attributes that will accept wildcard-matched strings
  +are:
  +
  +
  +
  +type
  +roles
  +parameter
  +attribute
  +forward
  +include
  +input
  +forward
  +forward
  +
  +
  +
  +The action forward attributes that will accept wildcard-matched strings
  +are:
  +
  +
  +
  +path
  +
  +
  +
  +
  +
   
   Struts doesn't configure logging itself -- it's all done by
   http://jakarta.apache.org/commons/";>commons-logging 
  
  
  
  1.42  +2 -1  jakarta-struts/doc/userGuide/index.xml
  
  Index: index.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/index.xml,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- index.xml 9 Sep 2003 17:49:18 -   1.41
  +++ index.xml 10 Oct 2003 20:10:35 -  1.42
  @@ -127,7 +127,8 @@
   
   
   4.9 Using ActionMappings for 
Pages
  -4.10 Using The 
Commons Logging Interface
  +4.10 Using Wildcards in 
ActionMappings   
  +4.11 Using The 
Commons Logging Interface   
   
   
5. Configuring Applications
  
  
  

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



cvs commit: jakarta-struts/src/test/org/apache/struts/action TestActionMappingMatcher.java

2003-09-28 Thread mrdon
mrdon   2003/09/28 20:24:09

  Modified:.build-tests.xml
  Added:   src/test/org/apache/struts/action
TestActionMappingMatcher.java
  Log:
  Added tests for ActionMappingMatcher
  
  Revision  ChangesPath
  1.23  +1 -0  jakarta-struts/build-tests.xml
  
  Index: build-tests.xml
  ===
  RCS file: /home/cvs/jakarta-struts/build-tests.xml,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- build-tests.xml   10 Aug 2003 06:00:49 -  1.22
  +++ build-tests.xml   29 Sep 2003 03:24:08 -  1.23
  @@ -648,6 +648,7 @@
   
   
   
  +
   
   
   
  
  
  
  1.1  
jakarta-struts/src/test/org/apache/struts/action/TestActionMappingMatcher.java
  
  Index: TestActionMappingMatcher.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/action/TestActionMappingMatcher.java,v
 1.1 2003/09/29 03:24:09 mrdon Exp $
   * $Revision: 1.1 $
   * $Date: 2003/09/29 03:24:09 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2001 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.action;
  
  
  import java.net.MalformedURLException;
  import java.util.HashMap;
  import java.util.Map;
  
  import javax.servlet.jsp.JspException;
  
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  import org.apache.struts.Globals;
  import org.apache.struts.action.ActionForm;
  import org.apache.struts.action.ActionMapping;
  import org.apache.struts.action.ActionForward;
  import org.apache.struts.action.DynaActionForm;
  import org.apache.struts.action.RequestProcessor;
  import org.apache.struts.config.ForwardConfig;
  import org.apache.struts.config.ActionConfig;
  import org.apache.struts.config.ModuleConfig;
  import org.apache.struts.mock.MockFormBean;
  import org.apache.struts.mock.MockPrincipal;
  import org.apache.struts.mock.TestMockBase;
  import org.apache.struts.taglib.html.Constants;
  
  
  /**
   * Unit tests for org.apache.struts.util.ActionMappingMatcher.
   *
   *

cvs commit: jakarta-struts/src/share/org/apache/struts/util ActionMappingMatcher.java

2003-09-28 Thread mrdon
mrdon   2003/09/28 20:23:30

  Modified:src/share/org/apache/struts/action RequestProcessor.java
  Added:   src/share/org/apache/struts/action ActionMappingMatcher.java
  Removed: src/share/org/apache/struts/util ActionMappingMatcher.java
  Log:
  Refactored for easier testing, changed package and access modifiers
  
  Revision  ChangesPath
  1.36  +5 -6  
jakarta-struts/src/share/org/apache/struts/action/RequestProcessor.java
  
  Index: RequestProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/RequestProcessor.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- RequestProcessor.java 29 Sep 2003 01:24:21 -  1.35
  +++ RequestProcessor.java 29 Sep 2003 03:23:30 -  1.36
  @@ -82,7 +82,6 @@
   import org.apache.struts.config.ModuleConfig;
   import org.apache.struts.taglib.html.Constants;
   import org.apache.struts.upload.MultipartRequestWrapper;
  -import org.apache.struts.util.ActionMappingMatcher;
   import org.apache.struts.util.MessageResources;
   import org.apache.struts.util.RequestUtils;
   
  @@ -189,7 +188,7 @@
   
   this.servlet = servlet;
   this.moduleConfig = moduleConfig;
  -matcher = new ActionMappingMatcher(moduleConfig);
  +matcher = new ActionMappingMatcher(moduleConfig.findActionConfigs());
   }
   
   /**
  
  
  
  1.1  
jakarta-struts/src/share/org/apache/struts/action/ActionMappingMatcher.java
  
  Index: ActionMappingMatcher.java
  ===
  /*
   *  
   *
   *  The Apache Software License, Version 1.1
   *
   *  Copyright (c) 1999-2001 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.action;
  
  // Struts imports:
  import org.apache.struts.action.ActionMapping;
  import org.apache.struts.action.ActionForward;
  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.WildcardHelper;
  
  import org.apache.commons.logging.Log

cvs commit: jakarta-struts/doc volunteers.xml

2003-09-28 Thread mrdon
mrdon   2003/09/28 18:35:16

  Modified:doc  volunteers.xml
  Log:
  Added my name to the volunteers page, fixed a couple of typos
  
  Revision  ChangesPath
  1.37  +7 -1  jakarta-struts/doc/volunteers.xml
  
  Index: volunteers.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/volunteers.xml,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- volunteers.xml24 Sep 2003 04:29:50 -  1.36
  +++ volunteers.xml29 Sep 2003 01:35:16 -  1.37
  @@ -35,6 +35,7 @@
  David Graham
  David Winterfeldt
  Dominique Plante
  +   Don Brown
  Don Clasen
  Florent Carpentier
  Greg Ludington  
  @@ -203,6 +204,11 @@
  Steve Raeburn
   
  (sraeburn at apache.org)
  +   
  +   
  +   Don Brown
  +
  +   (mrdon at apache.org)
   

   
  @@ -237,7 +243,7 @@

   Craig R. McClanahan -- Committer
   
  -I've been involved with servlet and JSP technology since around 
1998. It started out that I needed a way to build some web applications for several 
projects, and liked Java a lot better than the alternatives. I also liked theprice tag 
of open source software, and started using Apache JServ -- later , getting involved in 
the project (like many people, I was whining about the twelve months it took to get 
from version 0.9 to version 1.0, and my son said "Dad, you know Java -- go help them 
finish it!" -- so I did :-).
  +I've been involved with servlet and JSP technology since around 
1998. It started out that I needed a way to build some web applications for several 
projects, and liked Java a lot better than the alternatives. I also liked the price 
tag of open source software, and started using Apache JServ -- later, getting involved 
in the project (like many people, I was whining about the twelve months it took to get 
from version 0.9 to version 1.0, and my son said "Dad, you know Java -- go help them 
finish it!" -- so I did :-).
   
   For quite a while, I was participating a lot the JSP-INTEREST and 
SERVLET-INTEREST 
   http://archives.java.sun.com";>mailing lists
  
  
  

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



cvs commit: jakarta-struts/src/share/org/apache/struts/util ActionMappingMatcher.java WildcardHelper.java

2003-09-28 Thread mrdon
mrdon   2003/09/28 18:24:21

  Modified:src/share/org/apache/struts/action RequestProcessor.java
  Added:   src/share/org/apache/struts/util ActionMappingMatcher.java
WildcardHelper.java
  Log:
  Added optional wildcard support for action mappings
  
  PR: 21813
  
  Revision  ChangesPath
  1.35  +17 -6 
jakarta-struts/src/share/org/apache/struts/action/RequestProcessor.java
  
  Index: RequestProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/RequestProcessor.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- RequestProcessor.java 11 Sep 2003 01:18:45 -  1.34
  +++ RequestProcessor.java 29 Sep 2003 01:24:21 -  1.35
  @@ -82,6 +82,7 @@
   import org.apache.struts.config.ModuleConfig;
   import org.apache.struts.taglib.html.Constants;
   import org.apache.struts.upload.MultipartRequestWrapper;
  +import org.apache.struts.util.ActionMappingMatcher;
   import org.apache.struts.util.MessageResources;
   import org.apache.struts.util.RequestUtils;
   
  @@ -145,6 +146,10 @@
*/
   protected ActionServlet servlet = null;
   
  +/**
  + * Matches action mapping paths against compiled wildcard patterns
  + */
  +protected ActionMappingMatcher matcher = null;
   
   // - Public Methods
   
  @@ -184,7 +189,7 @@
   
   this.servlet = servlet;
   this.moduleConfig = moduleConfig;
  -
  +matcher = new ActionMappingMatcher(moduleConfig);
   }
   
   /**
  @@ -659,9 +664,15 @@
  String path)
   throws IOException {
   
  -// Is there a directly defined mapping for this path?
  +// Is there a directly defined or wildcard-matched mapping for this 
  +// path?
   ActionMapping mapping = (ActionMapping)
   moduleConfig.findActionConfig(path);
  +if (mapping == null) {
  +mapping = matcher.match(path);
  +}
  +
  +// If a mapping is found, put it in the request and return it
   if (mapping != null) {
   request.setAttribute(Globals.MAPPING_KEY, mapping);
   return (mapping);
  
  
  
  1.1  
jakarta-struts/src/share/org/apache/struts/util/ActionMappingMatcher.java
  
  Index: ActionMappingMatcher.java
  ===
  /*
   *  
   *
   *  The Apache Software License, Version 1.1
   *
   *  Copyright (c) 1999-2001 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 OTHERW

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html BaseTag.java

2003-09-20 Thread mrdon
mrdon   2003/09/20 00:31:18

  Modified:src/share/org/apache/struts/taglib/html BaseTag.java
  Log:
  Allow Struts to be compiled with JDK 1.4 and work on 1.3 or earlier
  
  PR: 23230
  Submitted by: [EMAIL PROTECTED] (Leonardo Quijano)
  
  Revision  ChangesPath
  1.19  +5 -5  
jakarta-struts/src/share/org/apache/struts/taglib/html/BaseTag.java
  
  Index: BaseTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseTag.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- BaseTag.java  28 Aug 2003 05:50:32 -  1.18
  +++ BaseTag.java  20 Sep 2003 07:31:18 -  1.19
  @@ -157,7 +157,7 @@
   String uri) {
   
   StringBuffer tag = new StringBuffer("

cvs commit: jakarta-struts/doc/faqs helping.xml

2003-09-19 Thread mrdon
mrdon   2003/09/19 15:09:42

  Modified:doc/faqs helping.xml
  Log:
  Fixed typos
  
  PR: 20609
  Submitted by: [EMAIL PROTECTED] (Yann Cébron)
  
  Revision  ChangesPath
  1.8   +26 -26jakarta-struts/doc/faqs/helping.xml
  
  Index: helping.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/faqs/helping.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- helping.xml   9 Sep 2003 17:49:22 -   1.7
  +++ helping.xml   19 Sep 2003 22:09:42 -  1.8
  @@ -110,7 +110,7 @@
   http://jakarta.apache.org/site/bugs.html";>Jakarta Bugzilla. 
   If you are unsure if this is an actual problem, feel free to bring it up the 
   list first. 
  -But to sure that an issue is resolved, read 
  +But to be sure that an issue is resolved, read 
   http://www.chiark.greenend.org.uk/~sgtatham/bugs.html";>
   How to Report Bugs Effectively and report it to
   http://jakarta.apache.org/site/bugs.html";>Bugzilla.
  @@ -125,7 +125,7 @@
   welcome. 
   If you can't write a patch to fix your bug, a unit 
test
   that demonstrates the problem is also welcome.
  -(And, of course, unit tests that prove your patch work are equally welcome.)
  +(And, of course, unit tests that prove your patch works are equally welcome.)
   
   
   
  @@ -198,7 +198,7 @@
   testing regime would actually execute the tag in a real container.  
   For that purpose, we use the 
   http://jakarta.apache.org/cactus";>Cactus testing framework, 
  -which re-executesthe JUnit-based tests as well to make sure that nothing 
  +which re-executes the JUnit-based tests as well to make sure that nothing 
   bad happens when you switch environments.  
   Right now, there are very few dynamic tests; ideally, we will have tests 
   for every tag, that cover every reasonable combination of tag attribute 
  @@ -224,7 +224,7 @@
   Then try adding your own XML page under doc/ to see if the build succeeds. 
   If it doesn't, it will report where the bad element is, much like it reports 
   where a bad programming expression is. 
  -If it does, then your page should available under target/documentation/.
  +If it does, then your page should be available under target/documentation/.
   
   
   
  @@ -232,25 +232,25 @@
   The User Guide portion is under the userGuide/ folder. 
   If the material you'd to add doesn't fit right in with what's there, 
   the best thing may to start a new section after the existing material. 
  -The navigation column can found in the project.xml document.
  +The navigation column can be found in the project.xml document.
   
   
   
   To display markup, substitute &lt; for <. 
  -The unmatched trailing > will ignored. 
  +The unmatched trailing > will be ignored. 
   Since it is XML, all elements also need to closed. 
   So elements like <br> and <hr> need to set out as <br/> and <hr/>.
   
   
   
  -Also watch for the length of code samples. 
  -These do not wrap. 
  +Also watch for the length of code samples - 
  +these do not wrap. 
   If a line is too long, it will force the right margin out past the edge of the 
   screen or printed page.
   
   
   
  -The stylesheets we use are adequate, but could certainly improved by an XML
  +The stylesheets we use are adequate, but could certainly be improved by an XML
   guru, if you happen to one of those.
   
   
  @@ -263,11 +263,11 @@
   
   
   
  -Jakarta products are released the basis of merit, and ~not~ according
  +Jakarta products are released on the basis of merit, and ~not~ according
   to a strict timetable. 
  -The volunteers devote whatever time they can to working the product. 
  +The volunteers devote whatever time they can to work on the product. 
   But all volunteers have real jobs and real lives, that do take precedence. 
  -Since Struts does not have paid personnel working the project, 
  +Since Struts does not have paid personnel working on the project, 
   we simply cannot make date-oriented commitments.
   
   
  @@ -276,7 +276,7 @@
   If a beta is not in circulation, 
   then it's a good bet that a release is not forthcoming any time soon. 
   Products sometimes go through several betas before final release. 
  -So if this is beta 1, then it still may not released any time soon.
  +So if this is beta 1, then it still may not be released any time soon.
   
   
   
  @@ -310,14 +310,14 @@
   
   
   So, what do you tell your team? 
  -If you can ship your application based the nightly build of your choice, 
  +If you can ship your application based on the nightly build of your choice, 
   then consider that an option. 
   You can still ship yours, even if we don't ship ours, 
   and you will have access to all the latest patches or enhancements. 
   (Just like we were working down the hall.) 
  -If you can only ship your application based 

Re: Wildcard-matched actions (again)

2003-08-14 Thread mrdon
You still wouldn't see any performance hit as since you aren't using any
action mappings with wildcards, there would be no pattern matching.  It
can only match a URI against a compiled pattern if one or more action
mappings use wildcards.  If there are no compiled patterns, the method
will simply exit and your default action will be matched.

Now, this also would be a good example of an app that could use wildcards.
 You could match the id's and stick them in the parameter of the action
mapping to retrieve in the action.  I currently use wildcards in my Struts
app that exposes REST-style web services where everything is encoded in
the URI.  The wildcard matching code is very fast as the patterns are
pre-compiled and since the code comes stright from Cocoon who has been
using it for quite a while, it has stood the test of time.

Don

> Well, it indeed looks pretty unlikely at first glance. Still, we are
> doing exactly this...
>
> We have built a Content Managment System (it's called XIST4C) that is
> based on Struts. Each normal content page (i. e. each page that is not
> part of an application integrated in the system) is served by a single
> action called DisplayAction, which is the default action. The different
> content pages are distinguished by ids. In order to be as search engine
> friendly as possible, we are encoding these ids in the url instead of
> appending them as query parameters.
>
> Thus, a typical url looks like this:
>  http://www.medi.de/llcms/web/displayAction_id_1586_.htm
>
> I would like to be able to turn off this pattern matching feature, as
> performance is a very critical issue for a CMS.
>
> --- Matthias
>
>
> -
> 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]



cvs commit: jakarta-struts/doc/resources views.xml

2003-08-14 Thread mrdon
mrdon   2003/08/11 16:33:19

  Modified:doc/resources views.xml
  Log:
  Updated stxx and VelocityTools links and descriptions
  
  Revision  ChangesPath
  1.4   +2 -2  jakarta-struts/doc/resources/views.xml
  
  Index: views.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/resources/views.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- views.xml 24 Dec 2002 01:20:57 -  1.3
  +++ views.xml 11 Aug 2003 23:33:19 -  1.4
  @@ -13,10 +13,10 @@
   -->
   
   http://it.cappuccinonet.com/strutscx";>StrutsCX: Struts with Castor 
XML and XSLT by Bernhard Woehrlin
  -http://www.openroad.ca/opencode/";>Stxx - Stxx is an 
extension to Struts, extending its existing functionality to help Action classes to 
return XMLthat will be transformed by an XSL file.
  +http://stxx.sourceforge.net";>Stxx - Stxx is an extension to 
Struts, extending its existing functionality to help Action classes build XML that 
will be transformed by technologies like XSL and http://jakarta.apache.org/velocity/anakia.html";>Velocity (Anakia).
   http://xsltgenerator.sourceforge.net/";>Struts XSLT Code 
Generator by Shengmeng Liu - An XSLT based code generator for Struts, 
completely based on the XSLT transformation and a set of stylesheet files. Ideally, 
users can customize the stylesheet for each type of Struts files  to have templates of 
their own without having to access the source code and recompile it.
   http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-strutsxslt.html";>Boost 
Struts with XSLT and XML By Julien Mercay and Gilbert Bouzeid.
  -http://husted.com/struts/resources/velstruts.zip";>Velocity-Tools / 
Struts by the http://jakarta.apache.org/velocity";>Velocity Team. 
(WAR zipped for download).  Use Velocity templates with Struts 1.0 and beyond! This is 
the sample WAR from a recent http://cvs.apache.org/viewcvs/jakarta-velocity-tools/";>CVS snapshott. Just 
autodeploy, and see for yourself!
  +http://jakarta.apache.org/velocity/tools/struts/";>VelocityStruts by 
the http://jakarta.apache.org/velocity";>Velocity Team. The VelocityStruts 
sub-project of http://jakarta.apache.org/velocity/tools";>Velocity Tools 
integrates Velocity with Struts and enables the use of velocity templates 
interchangeably with JSP pages for the view layer.
   
   
   
  
  
  

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



cvs commit: jakarta-struts/doc/resources extensions.xml

2003-08-14 Thread mrdon
mrdon   2003/08/11 16:51:03

  Modified:doc/resources extensions.xml
  Log:
  Added Struts BSF project link and description
  
  Revision  ChangesPath
  1.11  +1 -0  jakarta-struts/doc/resources/extensions.xml
  
  Index: extensions.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/resources/extensions.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- extensions.xml15 Feb 2003 20:55:24 -  1.10
  +++ extensions.xml11 Aug 2003 23:51:03 -  1.11
  @@ -38,6 +38,7 @@
   http://husted.com/struts/resources/mapper.htm";>Mapper 
Framework by Capco - The Mapper framework can be used for automating the 
process of validating/converting/transferring data fields. (See README 
to get started. Updated 18-JUL-2001.)
   http://www.sura.ru/~gonza/bean-factory/";>Bean factory by 
Oleg V Alexeev - Adds the ability to easily link data bean creation to any Struts 
Action. All information about databeans and actions mappings stored in the standard 
Struts configuraton file. 
   http://home.earthlink.net/~dwinterfeldt/";>Struts Validator 
[Now bundled with Struts 1.1] by David Winterfeldt - Perform basic validations to 
check if a field is required, matches a regular expression, and some basic type 
checking. Different validation rules can be defined for different locales. The 
framework has basic support for user defined constants which can be used in some field 
attributes. The validation routines are modifiable in the validation.xml file so 
custom validation routines can be created and added to the framework.
  +http://struts.sf.net";>Scriptable Actions by Don Brown - 
Allows Struts Actions to be written in the scripting language of one's choice rather 
than as Java classes. It uses the http://jakarta.apache.org/bsf";>Beans 
Scripting Framework to allow scripts to be written in any language BSF supports 
like Python (using http://www.jython.org/";>Jython), Ruby (using http://jruby.sourceforge.net/";>JRuby), JavaScript (using http://www.mozilla.org/rhino/";>Rhino), or http://www.beanshell.org";>BeanShell.
   
   
   
  
  
  

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



cvs commit: jakarta-struts/doc/resources views.xml

2003-08-11 Thread mrdon
mrdon   2003/08/11 16:38:33

  Modified:doc/resources views.xml
  Log:
  Added Cocoon Plugin link and description
  
  Revision  ChangesPath
  1.5   +1 -0  jakarta-struts/doc/resources/views.xml
  
  Index: views.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/resources/views.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- views.xml 11 Aug 2003 23:33:19 -  1.4
  +++ views.xml 11 Aug 2003 23:38:33 -  1.5
  @@ -17,6 +17,7 @@
   http://xsltgenerator.sourceforge.net/";>Struts XSLT Code 
Generator by Shengmeng Liu - An XSLT based code generator for Struts, 
completely based on the XSLT transformation and a set of stylesheet files. Ideally, 
users can customize the stylesheet for each type of Struts files  to have templates of 
their own without having to access the source code and recompile it.
   http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-strutsxslt.html";>Boost 
Struts with XSLT and XML By Julien Mercay and Gilbert Bouzeid.
   http://jakarta.apache.org/velocity/tools/struts/";>VelocityStruts by 
the http://jakarta.apache.org/velocity";>Velocity Team. The VelocityStruts 
sub-project of http://jakarta.apache.org/velocity/tools";>Velocity Tools 
integrates Velocity with Struts and enables the use of velocity templates 
interchangeably with JSP pages for the view layer.
  +http://struts.sf.net";>Cocoon Plugin by Don Brown.  
Integrates http://cocoon.apache.org";>Apache Cocoon into the Struts 1.1+ 
framework.  Struts forwards can be passed to Cocoon to be rendered in Cocoon XML 
pipelines.  Works alongside traditional Struts forwards.
   
   
   
  
  
  

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



cvs commit: jakarta-struts build.xml

2003-08-05 Thread mrdon
mrdon   2003/08/04 13:19:37

  Modified:.build.xml
  Log:
  Fixes depreciation messages from style task; stylesheets now declared relative
  to basedir
  
  PR: 18873
  Submitted by: Mohan Kishore
  
  Revision  ChangesPath
  1.116 +7 -7  jakarta-struts/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-struts/build.xml,v
  retrieving revision 1.115
  retrieving revision 1.116
  diff -u -r1.115 -r1.116
  --- build.xml 31 Jul 2003 20:18:52 -  1.115
  +++ build.xml 4 Aug 2003 20:19:37 -   1.116
  @@ -808,32 +808,32 @@
   description="Compile main website">
   
   
  +   extension=".html" style="${doc.dir}/stylesheets/struts.xsl" 
includes="*.xml"/>
   
   
   
   
   
   
   
   
   
   
   
 <param name="relative-path" expression=".."/>
   
  @@ -841,7 +841,7 @@