You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by hu...@apache.org on 2006/11/21 04:20:12 UTC

svn commit: r477484 - in /struts/struts2/trunk/apps/blank/src/main: resources/example.xml resources/struts.properties resources/struts.xml webapp/WEB-INF/applicationContext.xml webapp/WEB-INF/web.xml webapp/example/Login.jsp

Author: husted
Date: Mon Nov 20 19:20:11 2006
New Revision: 477484

URL: http://svn.apache.org/viewvc?view=rev&rev=477484
Log:
WW-1421 Move struts.properties settings to struts.xml 
WW-1458 Replace OGNL scriptlets with key attribute

Interim commit for discussion purposes. I'm trying to bring the blank up to date with the latest practice. As to the struts.properties, I tried moving these to struts.xml, but it doesn't seem to be working. I copied the elements from the Spring plugin struts-plugin.xml, but IDEA complains that the constant element is not defined. Strangely, I don't get the same prompt for the struts-plugin.xml. I tried deploying the application, and it seems that the struts.xml constants are ignored. 

Removed:
    struts/struts2/trunk/apps/blank/src/main/resources/struts.properties
    struts/struts2/trunk/apps/blank/src/main/webapp/WEB-INF/applicationContext.xml
Modified:
    struts/struts2/trunk/apps/blank/src/main/resources/example.xml
    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/Login.jsp

Modified: struts/struts2/trunk/apps/blank/src/main/resources/example.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/blank/src/main/resources/example.xml?view=diff&rev=477484&r1=477483&r2=477484
==============================================================================
--- struts/struts2/trunk/apps/blank/src/main/resources/example.xml (original)
+++ struts/struts2/trunk/apps/blank/src/main/resources/example.xml Mon Nov 20 19:20:11 2006
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE struts PUBLIC
         "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
         "http://struts.apache.org/dtds/struts-2.0.dtd">

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=477484&r1=477483&r2=477484
==============================================================================
--- struts/struts2/trunk/apps/blank/src/main/resources/struts.xml (original)
+++ struts/struts2/trunk/apps/blank/src/main/resources/struts.xml Mon Nov 20 19:20:11 2006
@@ -1,8 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE struts PUBLIC
-        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
-        "http://struts.apache.org/dtds/struts-2.0.dtd">
+    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+    "http://struts.apache.org/dtds/struts-2.0.dtd">
 
 <struts>
+
+    <constant name="struts.devMode" value="true" />
+    <constant name="struts.enable.DynamicMethodInvocation" value="false" />
 
     <include file="example.xml"/>
 

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=477484&r1=477483&r2=477484
==============================================================================
--- 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 Nov 20 19:20:11 2006
@@ -13,22 +13,8 @@
         <url-pattern>/*</url-pattern>
     </filter-mapping>
 
-    <listener>
-        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
-    </listener>
-
     <welcome-file-list>
         <welcome-file>index.html</welcome-file>
     </welcome-file-list>
 
-    <!--
-        This typically isn't required, as the taglib is included in struts-core.jar.
-        If you really need a taglib configuration within web.xml,
-        copy struts2-core/core/src/main/resources/META-INF/struts-tags.tld
-        to the WEB-INF directory as struts-tags.tld.
-     -->
-    <!--taglib>
-        <taglib-uri>/s</taglib-uri>
-        <taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
-    </taglib-->
 </web-app>

Modified: struts/struts2/trunk/apps/blank/src/main/webapp/example/Login.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/blank/src/main/webapp/example/Login.jsp?view=diff&rev=477484&r1=477483&r2=477484
==============================================================================
--- struts/struts2/trunk/apps/blank/src/main/webapp/example/Login.jsp (original)
+++ struts/struts2/trunk/apps/blank/src/main/webapp/example/Login.jsp Mon Nov 20 19:20:11 2006
@@ -7,8 +7,8 @@
 
 <body>
 <s:form action="Login">
-    <s:textfield label="%{getText('username')}" name="username"/>
-    <s:password label="%{getText('password')}" name="password" />
+    <s:textfield key="username"/>
+    <s:password key="password" />
     <s:submit/>
 </s:form>
 </body>