[CONF] Confluence Changes in the last 24 hours
- This is a daily summary of all recent changes in Confluence. - Updated Spaces: - Apache Struts 2 Plugin Regististry (S2PLUGINS) http://cwiki.apache.org/confluence/display/S2PLUGINS | |-Pages Added or Edited in This Space |-- Home was last edited by husted (05:14 AM). | http://cwiki.apache.org/confluence/display/S2PLUGINS/Home |-- Scope plugin was created by husted (05:09 AM). | http://cwiki.apache.org/confluence/display/S2PLUGINS/Scope+plugin Apache Struts 2 Documentation (WW) http://cwiki.apache.org/confluence/display/WW | |-Pages Added or Edited in This Space |-- Creating and Signing a Distribution was last edited by husted (11:30 AM). | http://cwiki.apache.org/confluence/display/WW/Creating+and+Signing+a+Distribution |-- Release Notes 2.0.2 was last edited by husted (11:06 AM). | http://cwiki.apache.org/confluence/display/WW/Release+Notes+2.0.2 |-- Release Notes 2.0.3 was created by husted (10:19 AM). | http://cwiki.apache.org/confluence/display/WW/Release+Notes+2.0.3 |-- Plugins was last edited by husted (06:01 AM). | http://cwiki.apache.org/confluence/display/WW/Plugins |-- Home was last edited by husted (05:36 AM). | http://cwiki.apache.org/confluence/display/WW/Home |-- UI Tag Reference was last edited by husted (05:34 AM). | http://cwiki.apache.org/confluence/display/WW/UI+Tag+Reference |-- Ajax Tags was last edited by husted (05:33 AM). | http://cwiki.apache.org/confluence/display/WW/Ajax+Tags |-- Tag Reference was last edited by husted (05:33 AM). | http://cwiki.apache.org/confluence/display/WW/Tag+Reference |-- Tag Developers Guide was last edited by husted (05:32 AM). | http://cwiki.apache.org/confluence/display/WW/Tag+Developers+Guide |-- Contributors Guide was last edited by husted (04:43 AM). | http://cwiki.apache.org/confluence/display/WW/Contributors+Guide Apache Directory Server v1.0 Documentation (DIRxSRVx10) http://cwiki.apache.org/confluence/display/DIRxSRVx10 | |-Pages Added or Edited in This Space |-- LDAP Operations, Modification was last edited by szoerner (03:38 AM). | http://cwiki.apache.org/confluence/display/DIRxSRVx10/LDAP+Operations%2C+Modification Apache Wicket (WICKET) http://cwiki.apache.org/confluence/display/WICKET | |-Pages Added or Edited in This Space |-- Migrate-2.0 was last edited by ivaynberg (06:08 PM). | http://cwiki.apache.org/confluence/display/WICKET/Migrate-2.0 - CONFLUENCE INFORMATION This message is automatically generated by Confluence Unsubscribe or edit your notifications preferences http://cwiki.apache.org/confluence/users/viewnotifications.action If you think it was sent incorrectly contact one of the administrators http://cwiki.apache.org/confluence/administrators.action If you want more information on Confluence, or have a bug to report see http://www.atlassian.com/software/confluence
svn commit: r491545 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.
Author: mrdon Date: Mon Jan 1 00:49:14 2007 New Revision: 491545 URL: http://svn.apache.org/viewvc?view=rev&rev=491545 Log: Added better detection of existing namespaces by requiring an ending slash on the match WW-1523 Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java?view=diff&rev=491545&r1=491544&r2=491545 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java Mon Jan 1 00:49:14 2007 @@ -349,7 +349,7 @@ for (Iterator i = config.getPackageConfigs().values().iterator(); i .hasNext();) { String ns = ((PackageConfig) i.next()).getNamespace(); -if (ns != null && prefix.startsWith(ns)) { +if (ns != null && prefix.startsWith(ns + "/")) { if (ns.length() > namespace.length()) { namespace = ns; } Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java?view=diff&rev=491545&r1=491544&r2=491545 == --- struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java (original) +++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java Mon Jan 1 00:49:14 2007 @@ -116,6 +116,29 @@ assertEquals("foo/actionName", mapping.getName()); assertNull(mapping.getMethod()); } + +public void testGetMappingWithNamespaceSlash() throws Exception { + +req.setupGetRequestURI("/my.hh/abc.action"); +req.setupGetServletPath("/my.hh/abc.action"); +req.setupGetAttribute(null); +req.addExpectedGetAttributeName("javax.servlet.include.servlet_path"); + +DefaultActionMapper mapper = new DefaultActionMapper(); +ActionMapping mapping = mapper.getMapping(req, configManager); + +assertEquals("", mapping.getNamespace()); +assertEquals("abc", mapping.getName()); + +req.setupGetAttribute(null); +req.addExpectedGetAttributeName("javax.servlet.include.servlet_path"); +mapper = new DefaultActionMapper(); +mapper.setSlashesInActionNames("true"); +mapping = mapper.getMapping(req, configManager); + +assertEquals("", mapping.getNamespace()); +assertEquals("my.hh/abc", mapping.getName()); +} public void testGetMappingWithUnknownNamespace() throws Exception { setUp();
svn commit: r491547 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
Author: mrdon Date: Mon Jan 1 00:54:16 2007 New Revision: 491547 URL: http://svn.apache.org/viewvc?view=rev&rev=491547 Log: Fixing namespace slash check in such a way it doesn't break half the tests WW-1523 Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java?view=diff&rev=491547&r1=491546&r2=491547 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java Mon Jan 1 00:54:16 2007 @@ -349,7 +349,7 @@ for (Iterator i = config.getPackageConfigs().values().iterator(); i .hasNext();) { String ns = ((PackageConfig) i.next()).getNamespace(); -if (ns != null && prefix.startsWith(ns + "/")) { +if (ns != null && prefix.startsWith(ns) && (prefix.length() == ns.length() || prefix.charAt(ns.length()) == '/')) { if (ns.length() > namespace.length()) { namespace = ns; }
svn commit: r491548 - /struts/struts2/trunk/core/src/main/resources/struts-default.xml
Author: mrdon Date: Mon Jan 1 01:01:28 2007 New Revision: 491548 URL: http://svn.apache.org/viewvc?view=rev&rev=491548 Log: Added exclusion of dojo parameters WW-1551 Modified: struts/struts2/trunk/core/src/main/resources/struts-default.xml Modified: struts/struts2/trunk/core/src/main/resources/struts-default.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/struts-default.xml?view=diff&rev=491548&r1=491547&r2=491548 == --- struts/struts2/trunk/core/src/main/resources/struts-default.xml (original) +++ struts/struts2/trunk/core/src/main/resources/struts-default.xml Mon Jan 1 01:01:28 2007 @@ -191,7 +191,9 @@ - + + dojo\..* + input,back,cancel,browse
svn commit: r491549 - /struts/struts2/trunk/all/
Author: mrdon Date: Mon Jan 1 01:03:03 2007 New Revision: 491549 URL: http://svn.apache.org/viewvc?view=rev&rev=491549 Log: Removed the all module WW-1586 Removed: struts/struts2/trunk/all/
svn commit: r491550 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java
Author: mrdon Date: Mon Jan 1 01:18:30 2007 New Revision: 491550 URL: http://svn.apache.org/viewvc?view=rev&rev=491550 Log: Temporary fix for threadlocal cleanup on request context impl, in lieu of Bob's proper resolution WW-1543 Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java?view=diff&rev=491550&r1=491549&r2=491550 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java Mon Jan 1 01:18:30 2007 @@ -150,7 +150,7 @@ return proceed; } -static ThreadLocal threadLocalRequestContext = new ThreadLocal() { +static ThreadLocal threadLocalRequestContext = new ThreadLocal() { protected RequestContextImpl[] initialValue() { return new RequestContextImpl[1]; } @@ -162,7 +162,7 @@ */ public static String callInContext(ActionInvocation invocation, Callable callable) throws Exception { -RequestContextImpl[] reference = threadLocalRequestContext.get(); +RequestContextImpl[] reference = (RequestContextImpl[])threadLocalRequestContext.get(); if (reference[0] == null) { // Initial invocation. @@ -187,7 +187,7 @@ } public static RequestContextImpl get() { -RequestContextImpl requestContext = threadLocalRequestContext.get()[0]; +RequestContextImpl requestContext = ((RequestContextImpl[])threadLocalRequestContext.get())[0]; if (requestContext == null) throw new IllegalStateException("RequestContext has not been created.");
Issues Opened: week of 2007-01-01
Struts2 - Monday, January 1, 2007 3 opened in last 7 days [WW-1578] ComboBox works incorrect within - Type: Bug - Reporter: Vadim Homchik - Components: [Views] - Affects Versions: [] - http://issues.apache.org/struts/browse/WW-1578 [WW-1588] Struts 2.0.3 omnibus ticket - Type: Task - Reporter: Ted Husted - Components: [] - Affects Versions: [] - http://issues.apache.org/struts/browse/WW-1588 [WW-1587] Maven build should produce -sources and -javadoc jars for the repository - Type: Improvement - Reporter: Wendy Smoak - Components: [] - Affects Versions: [] - http://issues.apache.org/struts/browse/WW-1587
svn commit: r491597 - /struts/struts2/trunk/pom.xml
Author: wsmoak Date: Mon Jan 1 08:57:44 2007 New Revision: 491597 URL: http://svn.apache.org/viewvc?view=rev&rev=491597 Log: Remove the deleted 'all' module from the build. WW-1586 Modified: struts/struts2/trunk/pom.xml Modified: struts/struts2/trunk/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/pom.xml?view=diff&rev=491597&r1=491596&r2=491597 == --- struts/struts2/trunk/pom.xml (original) +++ struts/struts2/trunk/pom.xml Mon Jan 1 08:57:44 2007 @@ -116,7 +116,6 @@ all -all plugins apps
svn commit: r491599 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Submit.java
Author: mrdon Date: Mon Jan 1 09:28:37 2007 New Revision: 491599 URL: http://svn.apache.org/viewvc?view=rev&rev=491599 Log: Fixing url to not be built automatically in href tag on submit component WW-1547 Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Submit.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Submit.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Submit.java?view=diff&rev=491599&r1=491598&r2=491599 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Submit.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Submit.java Mon Jan 1 09:28:37 2007 @@ -181,7 +181,7 @@ super.evaluateExtraParams(); if (href != null) -addParameter("href", UrlHelper.buildUrl(findString(href), request, response, null)); +addParameter("href", findString(href)); if (errorText != null) addParameter("errorText", findString(errorText)); if (loadingText != null)
svn commit: r491622 - in /struts/struts2/trunk: core/pom.xml core/src/main/java/org/apache/struts2/views/xslt/AdapterFactory.java pom.xml
Author: mrdon Date: Mon Jan 1 12:22:54 2007 New Revision: 491622 URL: http://svn.apache.org/viewvc?view=rev&rev=491622 Log: Integrating xwork docs with struts docs WW-1395 Modified: struts/struts2/trunk/core/pom.xml struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/AdapterFactory.java struts/struts2/trunk/pom.xml Modified: struts/struts2/trunk/core/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/pom.xml?view=diff&rev=491622&r1=491621&r2=491622 == --- struts/struts2/trunk/core/pom.xml (original) +++ struts/struts2/trunk/core/pom.xml Mon Jan 1 12:22:54 2007 @@ -20,23 +20,31 @@ - -maven-javadoc-plugin -2.0 - -src/main/java;../../xwork/src/java - - -Struts Packages -org.apache.struts2* - - -XWork Packages -com.opensymphony.xwork2* - - - + +maven-dependency-plugin +2.0-alpha-1-SNAPSHOT + + +unpack-xwork +generate-sources + +unpack + + + + + opensymphony + xwork + 2.0-SNAPSHOT + sources + + + ${project.build.directory}/xwork-sources + + + + + + + + +maven-javadoc-plugin +2.2 + + ${basedir}/src/main/java;${basedir}/target/xwork-sources +UTF-8 + + +Struts Packages +org.apache.struts2* + + +XWork Packages +com.opensymphony.xwork2* + + +private + +http://java.sun.com/j2se/1.5.0/docs/api +http://java.sun.com/javaee/5/docs/api/ + http://jakarta.apache.org/commons/logging/apidocs/ +http://logging.apache.org/log4j/docs/api/ + + + + + Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/AdapterFactory.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/AdapterFactory.java?view=diff&rev=491622&r1=491621&r2=491622 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/AdapterFactory.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/AdapterFactory.java Mon Jan 1 12:22:54 2007 @@ -90,9 +90,6 @@ */ public class AdapterFactory { -/** - * Map> - */ private Map adapterTypes = new HashMap(); /** Modified: struts/struts2/trunk/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/pom.xml?view=diff&rev=491622&r1=491621&r2=491622 == --- struts/struts2/trunk/pom.xml (original) +++ struts/struts2/trunk/pom.xml Mon Jan 1 12:22:54 2007 @@ -307,6 +307,14 @@ false + +apache.snapshots +Apache Maven Repository (Snapshots and Test Builds) +http://people.apache.org/repo/m2-snapshot-repository +false +true + +
svn commit: r491633 - in /struts/struts2/trunk: core/pom.xml pom.xml
Author: mrdon Date: Mon Jan 1 13:19:27 2007 New Revision: 491633 URL: http://svn.apache.org/viewvc?view=rev&rev=491633 Log: Adding generation of javadocs and sources jars when profile "alljars" is activated WW-1587 Modified: struts/struts2/trunk/core/pom.xml struts/struts2/trunk/pom.xml Modified: struts/struts2/trunk/core/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/pom.xml?view=diff&rev=491633&r1=491632&r2=491633 == --- struts/struts2/trunk/core/pom.xml (original) +++ struts/struts2/trunk/core/pom.xml Mon Jan 1 13:19:27 2007 @@ -44,7 +44,6 @@ - - + + +alljars + + + +maven-javadoc-plugin +2.2 + + + +attach-source + +jar + + + + + +org.apache.maven.plugins +maven-source-plugin + + +attach-source + +jar + + + + + + + @@ -220,7 +256,7 @@ maven-javadoc-plugin -2.0 +2.2
svn commit: r491642 - in /struts/maven/trunk/struts2-archetype-plugin: ./ src/ src/main/ src/main/resources/ src/main/resources/META-INF/ src/main/resources/archetype-resources/ src/main/resources/arc
Author: mrdon Date: Mon Jan 1 13:42:49 2007 New Revision: 491642 URL: http://svn.apache.org/viewvc?view=rev&rev=491642 Log: Initial commit of a Struts 2 plugin archetype Added: struts/maven/trunk/struts2-archetype-plugin/ struts/maven/trunk/struts2-archetype-plugin/pom.xml struts/maven/trunk/struts2-archetype-plugin/src/ struts/maven/trunk/struts2-archetype-plugin/src/main/ struts/maven/trunk/struts2-archetype-plugin/src/main/resources/ struts/maven/trunk/struts2-archetype-plugin/src/main/resources/META-INF/ struts/maven/trunk/struts2-archetype-plugin/src/main/resources/META-INF/archetype.xml struts/maven/trunk/struts2-archetype-plugin/src/main/resources/archetype-resources/ struts/maven/trunk/struts2-archetype-plugin/src/main/resources/archetype-resources/LICENSE.txt struts/maven/trunk/struts2-archetype-plugin/src/main/resources/archetype-resources/NOTICE.txt struts/maven/trunk/struts2-archetype-plugin/src/main/resources/archetype-resources/README.txt struts/maven/trunk/struts2-archetype-plugin/src/main/resources/archetype-resources/pom.xml struts/maven/trunk/struts2-archetype-plugin/src/main/resources/archetype-resources/src/ struts/maven/trunk/struts2-archetype-plugin/src/main/resources/archetype-resources/src/main/ struts/maven/trunk/struts2-archetype-plugin/src/main/resources/archetype-resources/src/main/resources/ struts/maven/trunk/struts2-archetype-plugin/src/main/resources/archetype-resources/src/main/resources/struts-plugin.xml Added: struts/maven/trunk/struts2-archetype-plugin/pom.xml URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-plugin/pom.xml?view=auto&rev=491642 == --- struts/maven/trunk/struts2-archetype-plugin/pom.xml (added) +++ struts/maven/trunk/struts2-archetype-plugin/pom.xml Mon Jan 1 13:42:49 2007 @@ -0,0 +1,22 @@ + + + + +org.apache.struts +struts-master +4 + + + 4.0.0 + struts2-archetype-plugin + 2.0.3-SNAPSHOT + maven-plugin + Struts 2 Archetypes - Plugin + + + scm:svn:http://svn.apache.org/repos/asf/struts/maven/trunk/struts2-archetype-plugin/ + scm:svn:https://svn.apache.org/repos/asf/struts/maven/trunk/struts2-archetype-plugin/ + http://svn.apache.org/viewcvs.cgi/struts/maven/trunk/struts2-archetype-plugin/ + + + Added: struts/maven/trunk/struts2-archetype-plugin/src/main/resources/META-INF/archetype.xml URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-plugin/src/main/resources/META-INF/archetype.xml?view=auto&rev=491642 == --- struts/maven/trunk/struts2-archetype-plugin/src/main/resources/META-INF/archetype.xml (added) +++ struts/maven/trunk/struts2-archetype-plugin/src/main/resources/META-INF/archetype.xml Mon Jan 1 13:42:49 2007 @@ -0,0 +1,31 @@ + + + + struts2-archetype-blank + +src/main/java/example/ExampleSupport.java +src/main/java/example/HelloWorld.java +src/main/java/example/Login.java + + + src/main/resources/example/Login-validation.xml + src/main/resources/example/package.properties + src/main/resources/example/package_es.properties + src/main/resources/example.xml + src/main/resources/struts.xml + src/main/webapp/index.html + src/main/webapp/example/HelloWorld.jsp + src/main/webapp/example/Login.jsp + src/main/webapp/example/Menu.jsp + src/main/webapp/example/Missing.jsp + src/main/webapp/example/Register.jsp + src/main/webapp/example/Welcome.jsp + src/main/webapp/WEB-INF/web.xml + + +src/test/java/example/ConfigTest.java +src/test/java/example/HelloWorldTest.java +src/test/java/example/LoginTest.java + + + Added: struts/maven/trunk/struts2-archetype-plugin/src/main/resources/archetype-resources/LICENSE.txt URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-plugin/src/main/resources/archetype-resources/LICENSE.txt?view=auto&rev=491642 == --- struts/maven/trunk/struts2-archetype-plugin/src/main/resources/archetype-resources/LICENSE.txt (added) +++ struts/maven/trunk/struts2-archetype-plugin/src/main/resources/archetype-resources/LICENSE.txt Mon Jan 1 13:42:49 2007 @@ -0,0 +1,174 @@ + Apache License + Version 2.0, January 2004 +http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union
svn commit: r491644 - /struts/maven/trunk/struts2-archetype-plugin/src/main/resources/META-INF/archetype.xml
Author: mrdon Date: Mon Jan 1 13:50:31 2007 New Revision: 491644 URL: http://svn.apache.org/viewvc?view=rev&rev=491644 Log: Fixing struts 2 plugin archetype with correct resource list Modified: struts/maven/trunk/struts2-archetype-plugin/src/main/resources/META-INF/archetype.xml Modified: struts/maven/trunk/struts2-archetype-plugin/src/main/resources/META-INF/archetype.xml URL: http://svn.apache.org/viewvc/struts/maven/trunk/struts2-archetype-plugin/src/main/resources/META-INF/archetype.xml?view=diff&rev=491644&r1=491643&r2=491644 == --- struts/maven/trunk/struts2-archetype-plugin/src/main/resources/META-INF/archetype.xml (original) +++ struts/maven/trunk/struts2-archetype-plugin/src/main/resources/META-INF/archetype.xml Mon Jan 1 13:50:31 2007 @@ -1,31 +1,9 @@ - struts2-archetype-blank - -src/main/java/example/ExampleSupport.java -src/main/java/example/HelloWorld.java -src/main/java/example/Login.java - + struts2-archetype-plugin - src/main/resources/example/Login-validation.xml - src/main/resources/example/package.properties - src/main/resources/example/package_es.properties - src/main/resources/example.xml - src/main/resources/struts.xml - src/main/webapp/index.html - src/main/webapp/example/HelloWorld.jsp - src/main/webapp/example/Login.jsp - src/main/webapp/example/Menu.jsp - src/main/webapp/example/Missing.jsp - src/main/webapp/example/Register.jsp - src/main/webapp/example/Welcome.jsp - src/main/webapp/WEB-INF/web.xml + src/main/resources/struts-plugin.xml - -src/test/java/example/ConfigTest.java -src/test/java/example/HelloWorldTest.java -src/test/java/example/LoginTest.java -
svn commit: r491656 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/ main/java/org/apache/struts2/components/template/ main/java/org/apache/struts2/views/freemarker/ main/java/org/ap
Author: mrdon Date: Mon Jan 1 14:10:12 2007 New Revision: 491656 URL: http://svn.apache.org/viewvc?view=rev&rev=491656 Log: Added ability to discover new tag libraries and template engines automatically WW-1590 Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/TemplateEngineManager.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/TemplateEngineManagerTest.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java?view=diff&rev=491656&r1=491655&r2=491656 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java Mon Jan 1 14:10:12 2007 @@ -141,10 +141,6 @@ public static final String STRUTS_ACTIONPROXYFACTORY = "struts.actionProxyFactory"; -public static final String STRUTS_TEMPLATE_ENGINES = "struts.templateEngines"; - -public static final String STRUTS_TAG_LIBRARIES = "struts.tagLibraries"; - public static final String STRUTS_FREEMARKER_WRAPPER_ALT_MAP = "struts.freemarker.wrapper.altMap"; /** The name of the xwork converter implementation */ Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/TemplateEngineManager.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/TemplateEngineManager.java?view=diff&rev=491656&r1=491655&r2=491656 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/TemplateEngineManager.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/TemplateEngineManager.java Mon Jan 1 14:10:12 2007 @@ -20,11 +20,11 @@ */ package org.apache.struts2.components.template; +import java.util.Collections; import java.util.HashMap; import java.util.Map; +import java.util.Set; -import org.apache.struts2.StrutsConstants; -import org.apache.struts2.dispatcher.Dispatcher; import com.opensymphony.xwork2.config.ConfigurationException; import com.opensymphony.xwork2.inject.Container; import com.opensymphony.xwork2.inject.Inject; @@ -51,17 +51,13 @@ @Inject public void setContainer(Container container) { this.container = container; -} - -@Inject(StrutsConstants.STRUTS_TEMPLATE_ENGINES) -public void setTemplateEngines(String engines) { -if (engines != null) { -TemplateEngine eng = null; -String[] list = engines.split(","); -for (String name : list) { -templateEngines.put(name, new LazyEngineFactory(name)); -} +Map map = new HashMap(); +Set prefixes = container.getInstanceNames(TemplateEngine.class); +for (String prefix : prefixes) { +map.put(prefix, new LazyEngineFactory(prefix)); } +this.templateEngines = Collections.unmodifiableMap(map); + } /** Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java?view=diff&rev=491656&r1=491655&r2=491656 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java Mon Jan 1 14:10:12 2007 @@ -125,9 +125,6 @@ private String encoding; private boolean altMapWrapper; private Map tagLibraries; -private String tagLibraryPrefixes; -private Container container; - @Inject(StrutsConstants.STRUTS_I18N_ENCODING) public void setEncoding(String encoding) { @@ -139,17 +136,6 @@ altMapWrapper = "true".equals(val); } -@Inject(StrutsConstants.STRUTS_TAG_LIBRARIES) -public void setTagLibraryPrefixes(String libnames) { -this.tagLibraryPrefixes = libnames; -} - -@Inject -public void setContainer(Container container) { -this.container = container; -} - -/* @Inject public void setContainer(Container container) { Map map = new HashMap(); @@ -159,7 +145,