struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hus...@apache.org
Subject svn commit: r454642 - in /struts/struts2/trunk: apps/blank/src/main/resources/ apps/blank/src/main/webapp/ apps/blank/src/main/webapp/WEB-INF/ apps/blank/src/main/webapp/example/ apps/mailreader/src/main/java/ core/src/main/java/org/apache/struts2/disp...
Date Tue, 10 Oct 2006 06:52:50 GMT
Author: husted
Date: Mon Oct  9 23:52:49 2006
New Revision: 454642

URL: http://svn.apache.org/viewvc?view=rev&rev=454642
Log:
WW-1453 Struts-Blank: Add missing Register.jsp. Dispatcher: Move default file list to default.properties.


Added:
    struts/struts2/trunk/apps/blank/src/main/webapp/example/Register.jsp
      - copied unchanged from r454616, struts/struts2/trunk/apps/blank/src/main/webapp/example/Menu.jsp
Modified:
    struts/struts2/trunk/apps/blank/src/main/resources/struts.xml
    struts/struts2/trunk/apps/blank/src/main/webapp/WEB-INF/web.xml
    struts/struts2/trunk/apps/blank/src/main/webapp/example/Welcome.jsp
    struts/struts2/trunk/apps/blank/src/main/webapp/index.html
    struts/struts2/trunk/apps/mailreader/src/main/java/struts.xml
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
    struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties

Modified: struts/struts2/trunk/apps/blank/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/blank/src/main/resources/struts.xml?view=diff&rev=454642&r1=454641&r2=454642
==============================================================================
--- struts/struts2/trunk/apps/blank/src/main/resources/struts.xml (original)
+++ struts/struts2/trunk/apps/blank/src/main/resources/struts.xml Mon Oct  9 23:52:49 2006
@@ -4,8 +4,6 @@
 
 <struts>
 
-    <include file="struts-default.xml"/>
-
     <include file="example.xml"/>
 
     <!-- Add packages here -->

Modified: struts/struts2/trunk/apps/blank/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/blank/src/main/webapp/WEB-INF/web.xml?view=diff&rev=454642&r1=454641&r2=454642
==============================================================================
--- struts/struts2/trunk/apps/blank/src/main/webapp/WEB-INF/web.xml (original)
+++ struts/struts2/trunk/apps/blank/src/main/webapp/WEB-INF/web.xml Mon Oct  9 23:52:49 2006
@@ -1,6 +1,5 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-<web-app>
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
 
     <display-name>Struts Blank</display-name>
 

Modified: struts/struts2/trunk/apps/blank/src/main/webapp/example/Welcome.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/blank/src/main/webapp/example/Welcome.jsp?view=diff&rev=454642&r1=454641&r2=454642
==============================================================================
--- struts/struts2/trunk/apps/blank/src/main/webapp/example/Welcome.jsp (original)
+++ struts/struts2/trunk/apps/blank/src/main/webapp/example/Welcome.jsp Mon Oct  9 23:52:49
2006
@@ -10,7 +10,6 @@
 <body>
 <h3>Commands</h3>
 <ul>
-    <li><a href="<s:url action="Register"/>">Register</a></li>
     <li><a href="<s:url action="Login!input"/>">Sign On</a></li>
 </ul>
 
@@ -24,9 +23,9 @@
     </li>
     <li>
         <s:url id="url" action="Welcome">
-            <s:param name="request_locale">ja</s:param>
+            <s:param name="request_locale">es</s:param>
         </s:url>
-        <s:a href="%{url}">Japanese</s:a>
+        <s:a href="%{url}">Espanol</s:a>
     </li>
 </ul>
 

Modified: struts/struts2/trunk/apps/blank/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/blank/src/main/webapp/index.html?view=diff&rev=454642&r1=454641&r2=454642
==============================================================================
--- struts/struts2/trunk/apps/blank/src/main/webapp/index.html (original)
+++ struts/struts2/trunk/apps/blank/src/main/webapp/index.html Mon Oct  9 23:52:49 2006
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html>
 <head>
-    <META HTTP-EQUIV="Refresh" CONTENT="0;URL=example/Welcome.action">
+    <META HTTP-EQUIV="Refresh" CONTENT="0;URL=example/HelloWorld.action">
 </head>
 
 <body>

Modified: struts/struts2/trunk/apps/mailreader/src/main/java/struts.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/mailreader/src/main/java/struts.xml?view=diff&rev=454642&r1=454641&r2=454642
==============================================================================
--- struts/struts2/trunk/apps/mailreader/src/main/java/struts.xml (original)
+++ struts/struts2/trunk/apps/mailreader/src/main/java/struts.xml Mon Oct  9 23:52:49 2006
@@ -5,8 +5,6 @@
 
 <struts>
 
-    <include file="struts-default.xml"/>
-
     <include file="mailreader-default.xml"/>
 
     <include file="mailreader-support.xml"/>

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java?view=diff&rev=454642&r1=454641&r2=454642
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
(original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
Mon Oct  9 23:52:49 2006
@@ -88,9 +88,9 @@
     private static final Log LOG = LogFactory.getLog(Dispatcher.class);
 
     private static ThreadLocal<Dispatcher> instance = new ThreadLocal<Dispatcher>();
-    private static List<DispatcherListener> dispatcherListeners = 
+    private static List<DispatcherListener> dispatcherListeners =
         new ArrayList<DispatcherListener>();
-    
+
     private ConfigurationManager configurationManager;
     private static boolean portletSupportActive;
     private boolean devMode = false;
@@ -100,34 +100,34 @@
 
     /**
      * Gets the current instance for this thread
-     * 
+     *
      * @return The dispatcher instance
      */
     public static Dispatcher getInstance() {
         return (Dispatcher) instance.get();
     }
 
-    /** 
+    /**
      * Sets the dispatcher instance for this thread
-     * 
+     *
      * @param instance The instance
      */
     public static void setInstance(Dispatcher instance) {
         Dispatcher.instance.set(instance);
     }
-    
+
     /**
      * Adds a dispatcher lifecycle listener
-     * 
+     *
      * @param l The listener
      */
     public static synchronized void addDispatcherListener(DispatcherListener l) {
         dispatcherListeners.add(l);
     }
-    
-    /** 
+
+    /**
      * Removes a dispatcher lifecycle listener
-     * 
+     *
      * @param l The listener
      */
     public static synchronized void removeDispatcherListener(DispatcherListener l) {
@@ -136,14 +136,14 @@
 
     /**
      * The constructor with its servlet context instance (optional)
-     * 
+     *
      * @param servletContext The servlet context
      */
     public Dispatcher(ServletContext servletContext) {
         init(servletContext);
     }
 
-    /** 
+    /**
      * Cleans up thread local variables
      */
     public void cleanup() {
@@ -172,7 +172,7 @@
 
     /**
      * Initializes the instance
-     * 
+     *
      * @param servletContext The servlet context
      */
     private void init(ServletContext servletContext) {
@@ -242,7 +242,7 @@
         }
 
         // test wether param-access workaround needs to be enabled
-        if (servletContext != null && servletContext.getServerInfo() != null 
+        if (servletContext != null && servletContext.getServerInfo() != null
                 && servletContext.getServerInfo().indexOf("WebLogic") >= 0) {
             LOG.info("WebLogic server detected. Enabling Struts parameter access work-around.");
             paramsWorkaroundEnabled = true;
@@ -253,7 +253,6 @@
         }
 
         configurationManager = new ConfigurationManager();
-        String configFiles = "struts-default.xml,struts-plugin.xml,struts.xml";
         if (Settings.isSet(StrutsConstants.STRUTS_CONFIGURATION_FILES)) {
             configFiles = Settings.get(StrutsConstants.STRUTS_CONFIGURATION_FILES);
         }
@@ -265,7 +264,7 @@
                 configurationManager.addConfigurationProvider(new StrutsXmlConfigurationProvider(file,
false));
             }
         }
-        
+
         synchronized(Dispatcher.class) {
             if (dispatcherListeners.size() > 0) {
                 for (DispatcherListener l : dispatcherListeners) {
@@ -345,14 +344,14 @@
 
     /**
      * Creates a context map containing all the wrapped request objects
-     * 
+     *
      * @param request The servlet request
      * @param response The servlet response
      * @param mapping The action mapping
      * @param context The servlet context
      * @return A map of context objects
      */
-    public Map<String,Object> createContextMap(HttpServletRequest request, HttpServletResponse
response, 
+    public Map<String,Object> createContextMap(HttpServletRequest request, HttpServletResponse
response,
             ActionMapping mapping, ServletContext context) {
         // request map wrapping the http request objects
         Map requestMap = new RequestMap(request);
@@ -493,7 +492,7 @@
 
     /**
      * Prepares a request, including setting the encoding and locale
-     * 
+     *
      * @param request The request
      * @param response The response
      */
@@ -558,22 +557,22 @@
      * @param code     the HttpServletResponse error code (see {@link javax.servlet.http.HttpServletResponse}
for possible error codes).
      * @param e        the Exception that is reported.
      */
-    public void sendError(HttpServletRequest request, HttpServletResponse response, 
+    public void sendError(HttpServletRequest request, HttpServletResponse response,
             ServletContext ctx, int code, Exception e) {
         if (devMode) {
             response.setContentType("text/html");
-            
+
             try {
                 freemarker.template.Configuration config = FreemarkerManager.getInstance().getConfiguration(ctx);
                 Template template = config.getTemplate("/org/apache/struts2/dispatcher/error.ftl");
-                
+
                 List<Throwable> chain = new ArrayList<Throwable>();
                 Throwable cur = e;
                 chain.add(cur);
                 while ((cur = cur.getCause()) != null) {
                     chain.add(cur);
                 }
-                
+
                 HashMap<String,Object> data = new HashMap<String,Object>();
                 data.put("exception", e);
                 data.put("unknown", Location.UNKNOWN);
@@ -593,10 +592,10 @@
                 // send a http error response to use the servlet defined error handler
                 // make the exception availible to the web.xml defined error page
                 request.setAttribute("javax.servlet.error.exception", e);
-    
+
                 // for compatibility
                 request.setAttribute("javax.servlet.jsp.jspException", e);
-    
+
                 // send the error response
                 response.sendError(code, e.getMessage());
             } catch (IOException e1) {
@@ -628,14 +627,14 @@
             Location loc = LocationUtils.getLocation(obj);
             if (loc == null) {
                 return Location.UNKNOWN;
-            } 
+            }
             return loc;
         }
     }
 
     /**
      * Gets the current configuration manager instance
-     * 
+     *
      * @return The instance
      */
     public ConfigurationManager getConfigurationManager() {
@@ -644,7 +643,7 @@
 
     /**
      * Sets the current configuration manager instance
-     * 
+     *
      * @param mgr The configuration manager
      */
     public void setConfigurationManager(ConfigurationManager mgr) {
@@ -664,5 +663,5 @@
     public void setDevMode(boolean devMode) {
         this.devMode = devMode;
     }
-    
+
 }

Modified: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties?view=diff&rev=454642&r1=454641&r2=454642
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties (original)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties Mon
Oct  9 23:52:49 2006
@@ -71,9 +71,11 @@
 ###            headers)
 struts.serve.static.browserCache=true
 
-### Set this to false if you wish to disable all forms of dynamic method invocation
+### Set this to false if you wish to disable implicit dynamic method invocation
 ### via the URL request. This includes URLs like foo!bar.action, as well as params
-### like method:bar (but not action:foo). See the DefaultActionMapper for more info.
+### like method:bar (but not action:foo). 
+### An alternative to implicit dynamic method invocation is to use wildcard 
+### mappings, such as <action name="*/*" method="{2}" class="actions.{1}">
 struts.enable.DynamicMethodInvocation = true
 
 ### use alternative syntax that requires %{} in most places
@@ -137,5 +139,8 @@
 ### configure the XSLTResult class to use stylesheet caching.
 ### Set to true for developers and false for production.
 struts.xslt.nocache=false
+
+### A list of configuration files automatically loaded by Struts
+struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml
 
 ### END SNIPPET: complete_file



Mime
View raw message