[Struts Wiki] Update of "StrutsAndSpring" by ndeloof

2006-08-04 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by ndeloof:
http://wiki.apache.org/struts/StrutsAndSpring

The comment on the change is:
  

--
- === References ===
+ === Using Spring and Groovy to quick prototype actions ===
  
-  * Struts + Spring 2.0 + Groovy: 
http://forum.springframework.org/showthread.php?t=27534
+ Spring 2.0 adds support for scripted beans. This mean a script engine can be 
used to run a script that will look like a regular java class. 
  
+ Struts also support scripted actions, but this requires to change the struts 
config. This may be a good option, but not if you want your production web 
application to use compiled java classes, and just use scripting support for 
quick application prototyping.
+ 
+ Using Spring 2.0 scripted-beans, Groovy that can parse a 100% java source 
file and Struts allow to quickly change a "classic" java action into a scripted 
bean, and just hit refresh in the browser to see effects of a code change.
+ 
+ == How to ? ==
+ 
+   1. Create a simple interface that define the Struts action "execute" method:
+  
+ {{{
+ public interface StrutsAction
+ {
+ public abstract ActionForward execute(ActionMapping mapping,
+ ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) throws Exception;
+ 
+ }
+ }}}
+ 
+   1. Create a SciptedBeanActionAdapter class :
+ 
+ {{{
+ public class SciptedBeanActionAdapter extends Action {
+ private StrutsAction delegate;
+ 
+ public SciptedBeanActionAdapter(StrutsAction delegate) {
+ this.delegate = delegate;
+ }
+ 
+ public ActionForward execute(ActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response) throws Exception {
+ return delegate.execute(mapping, form, request, response);
+ }
+ }
+ }}}
+ 
+   1. Configure your web application to use this requestProcessor :
+ 
+ {{{
+ public class GroovyAutowiringTilesRequestProcessor extends 
AutowiringTilesRequestProcessor {
+ 
+ protected Action processActionCreate(HttpServletRequest request, 
HttpServletResponse response, ActionMapping mapping)
+ throws IOException {
+ WebApplicationContext wac = getWebApplicationContext();
+ String beanName = DelegatingActionUtils
+ .determineActionBeanName(mapping);
+ if (wac.containsBean(beanName)) {
+ StrutsAction bean = (StrutsAction) wac.getBean(beanName, 
StrutsAction.class);
+ return new SciptedBeanActionAdapter(bean);
+ }
+ return super.processActionCreate(request, response, mapping);
+ }   
+ }
+ }}}
+ 
+ This processor will look into spring context for a bean that implements 
StrutsAction and wich name is the action mapping path.
+ 
+   1. Add classpath*:localContext.xml to your spring web application context. 
This file will not be required at runtime, so there is no impact on the 
production application.
+ 
+   1. Put a localContext.xml file into your application server classpath. I 
myself created it in $TOMCAT/shared/classes. 
+ 
+   1. Add Groovy, asm and Spring-support jars in your web application libs
+ 
+ Your application is now ready for quick prototyping !
+ 
+ == Hot reload action's java code ==
+ 
+ Now, consider you have a FooAction mapped to "/foo.do" you want to edit 
quickly.
+ 
+   1. Make your action implement StrutsAction. You only have to add 
"implements StrutsAction" as your action allready extends struts Action and 
defines the execute method.
+ 
+   1. Edit your localContext.xml and add :
+ 
+ {{{
+   
+   
+   
+ }}}
+ 
+ If you want to use dependency injection, simply add 
+ {{{
+ 
+ }}}
+ 
+   1. Start the app, go to your web page. 
+  
+   1. Change the code and simply hit refresh to see effects. No recompile, 
repackage, redeploy required !
+ 


[Struts Wiki] Update of "StrutsAndSpring" by ndeloof

2006-08-04 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by ndeloof:
http://wiki.apache.org/struts/StrutsAndSpring

--
  }
  }}}
  
-   1. Create a SciptedBeanActionAdapter class :
+   1.#2 Create a SciptedBeanActionAdapter class :
  
  {{{
  public class SciptedBeanActionAdapter extends Action {
@@ -38, +38 @@

  }
  }}}
  
-   1. Configure your web application to use this requestProcessor :
+   1.#3 Configure your web application to use this requestProcessor :
  
  {{{
  public class GroovyAutowiringTilesRequestProcessor extends 
AutowiringTilesRequestProcessor {
@@ -59, +59 @@

  
  This processor will look into spring context for a bean that implements 
StrutsAction and wich name is the action mapping path.
  
-   1. Add classpath*:localContext.xml to your spring web application context. 
This file will not be required at runtime, so there is no impact on the 
production application.
+   1.#4 Add classpath*:localContext.xml to your spring web application 
context. This file will not be required at runtime, so there is no impact on 
the production application.
  
1. Put a localContext.xml file into your application server classpath. I 
myself created it in $TOMCAT/shared/classes. 
  
@@ -88, +88 @@

  
  }}}
  
-   1. Start the app, go to your web page. 
+   1.#3 Start the app, go to your web page. 
   
1. Change the code and simply hit refresh to see effects. No recompile, 
repackage, redeploy required !
  


[Struts Wiki] Update of "StrutsAndSpring" by GarethEvans

2006-08-04 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by GarethEvans:
http://wiki.apache.org/struts/StrutsAndSpring

--
  === Using Spring and Groovy to quick prototype actions ===
  
- Spring 2.0 adds support for scripted beans. This mean a script engine can be 
used to run a script that will look like a regular java class. 
+ Spring 2.0 adds support for scripted beans. This means a script engine can be 
used to run a script that will look like a regular java class. 
  
  Struts also support scripted actions, but this requires to change the struts 
config. This may be a good option, but not if you want your production web 
application to use compiled java classes, and just use scripting support for 
quick application prototyping.
  


[Struts Wiki] Update of "StrutsAndSpring" by GarethEvans

2006-08-04 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by GarethEvans:
http://wiki.apache.org/struts/StrutsAndSpring

--
  
  Spring 2.0 adds support for scripted beans. This means a script engine can be 
used to run a script that will look like a regular java class. 
  
- Struts also support scripted actions, but this requires to change the struts 
config. This may be a good option, but not if you want your production web 
application to use compiled java classes, and just use scripting support for 
quick application prototyping.
+ Struts also supports scripted actions, but this requires to change the struts 
config. This may be a good option, but not if you want your production web 
application to use compiled java classes, and just use scripting support for 
quick application prototyping.
  
  Using Spring 2.0 scripted-beans, Groovy that can parse a 100% java source 
file and Struts allow to quickly change a "classic" java action into a scripted 
bean, and just hit refresh in the browser to see effects of a code change.
  


[Struts Wiki] Update of "StrutsAndSpring" by GarethEvans

2006-08-04 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by GarethEvans:
http://wiki.apache.org/struts/StrutsAndSpring

--
  }
  }}}
  
- This processor will look into spring context for a bean that implements 
StrutsAction and wich name is the action mapping path.
+ This processor will look into spring context for a bean that implements 
StrutsAction and which name is the action mapping path.
  
1.#4 Add classpath*:localContext.xml to your spring web application 
context. This file will not be required at runtime, so there is no impact on 
the production application.
  


[Struts Wiki] Update of "StrutsTraining" by StuartSmith

2006-08-04 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by StuartSmith:
http://wiki.apache.org/struts/StrutsTraining

--
  
  '''Canada'''
   *  ExitCertified -- http://www.exitcertified.com
+  *  Web Age Solutions -- 
http://www.webagesolutions.com/training/java/Struts.html
  
  '''Denmark'''
  
@@ -43, +44 @@

   *  baseBeans -- http://www.baseBeans.com
   *  ExitCertified -- http://www.exitcertified.com
   *  ObjectSource LLC -- http://www.objectsource.com/training.html
+  *  Web Age Solutions -- 
http://www.webagesolutions.com/training/java/Struts.html
  


svn commit: r428783 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Text.java

2006-08-04 Thread tmjee
Author: tmjee
Date: Fri Aug  4 10:01:53 2006
New Revision: 428783

URL: http://svn.apache.org/viewvc?rev=428783&view=rev
Log:
WW-1340
  - added another example to javadoc snippet


Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Text.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Text.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Text.java?rev=428783&r1=428782&r2=428783&view=diff
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Text.java 
(original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Text.java 
Fri Aug  4 10:01:53 2006
@@ -82,6 +82,11 @@
  * 
  * 
  * 
+ * 
+ * 
+ *Mr Smith
+ * 
+ * 
  * 
  * 
  * 
@@ -89,10 +94,10 @@
  * 
  * 
  * 
- * <-- Third Example -->
+ * <-- Fourth Example -->
  * 
  * 
- * <-- Fourth Example -->
+ * <-- Fifth Example -->
  * 
  *The Default Message That Will Be Displayed
  * 




svn commit: r428939 - in /struts/sandbox/trunk/tiles: src/site/site.xml tiles-core/pom.xml tiles-core/src/site/site.xml

2006-08-04 Thread wsmoak
Author: wsmoak
Date: Fri Aug  4 19:06:41 2006
New Revision: 428939

URL: http://svn.apache.org/viewvc?rev=428939&view=rev
Log:
Add configuration for dtddoc-maven-plugin and menu links to the generated 
output.
See the StrutsMaintenanceWebsite wiki page for more information.

Modified:
struts/sandbox/trunk/tiles/src/site/site.xml
struts/sandbox/trunk/tiles/tiles-core/pom.xml
struts/sandbox/trunk/tiles/tiles-core/src/site/site.xml

Modified: struts/sandbox/trunk/tiles/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/src/site/site.xml?rev=428939&r1=428938&r2=428939&view=diff
==
--- struts/sandbox/trunk/tiles/src/site/site.xml (original)
+++ struts/sandbox/trunk/tiles/src/site/site.xml Fri Aug  4 19:06:41 2006
@@ -29,6 +29,9 @@
 
+
 
 
 

Modified: struts/sandbox/trunk/tiles/tiles-core/pom.xml
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-core/pom.xml?rev=428939&r1=428938&r2=428939&view=diff
==
--- struts/sandbox/trunk/tiles/tiles-core/pom.xml (original)
+++ struts/sandbox/trunk/tiles/tiles-core/pom.xml Fri Aug  4 19:06:41 2006
@@ -72,6 +72,13 @@
 net.sourceforge.maven-taglib
 maven-taglib-plugin
 
+
+net.sf.dtddoc
+dtddoc-maven-plugin
+
+  
${basedir}/src/main/resources
+
+
 
 
 
@@ -126,4 +133,17 @@
 

 
+   
+  
+ dtddoc
+  http://dtddoc.sf.net/maven2
+  
+   
+   
+  
+ dtddoc
+ http://dtddoc.sf.net/maven2
+  
+   
+   
 

Modified: struts/sandbox/trunk/tiles/tiles-core/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-core/src/site/site.xml?rev=428939&r1=428938&r2=428939&view=diff
==
--- struts/sandbox/trunk/tiles/tiles-core/src/site/site.xml (original)
+++ struts/sandbox/trunk/tiles/tiles-core/src/site/site.xml Fri Aug  4 19:06:41 
2006
@@ -12,6 +12,9 @@
 
+
 
 
 




[Struts Wiki] Update of "StrutsMaintenanceWebsite" by WendySmoak

2006-08-04 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by WendySmoak:
http://wiki.apache.org/struts/StrutsMaintenanceWebsite

The comment on the change is:
Update info on DTDDoc

--
- == RELEVANT PENDING ISSUES WITH MAVEN 2 BETA 5 ==
+ == RELEVANT PENDING ISSUES WITH maven-site-plugin 2.0-beta-5 ==
   * [http://jira.codehaus.org/browse/MSITE-156 site with FAQ plugin strips XML 
entities]
   * [http://jira.codehaus.org/browse/MSITE-155  site:run does not work with 
upper case letters in URIs]
   * [http://jira.codehaus.org/browse/MSITE-153 Paragraphs after list being 
"dropped" by site generation]
@@ -69, +69 @@

 }}}
  
   DTDDoc 
-   * [TODO] Investigate [http://dtddoc.sourceforge.net/index.html DTDDoc]
+   * http://dtddoc.sourceforge.net/index.html
+   * The DTDDoc Maven 2 plugin is available, see 
[http://sourceforge.net/mailarchive/forum.php?thread_id=26935061&forum_id=33177 
this post].
+   * DTDDoc is currently being tested with Tiles 2 DTDs in the sandbox, see 
[http://svn.apache.org/repos/asf/struts/sandbox/trunk/tiles/tiles-core/pom.xml 
this pom].