svn commit: r415008 - /struts/action2/trunk/apps/showcase/src/main/webapp/chat/

2006-06-17 Thread tmjee
Author: tmjee
Date: Sat Jun 17 01:27:50 2006
New Revision: 415008

URL: http://svn.apache.org/viewvc?rev=415008&view=rev
Log:
WW-1351
  - add a simple chat wabapp to showcase demonstrating SAF2's AJAX
features


Added:
struts/action2/trunk/apps/showcase/src/main/webapp/chat/
struts/action2/trunk/apps/showcase/src/main/webapp/chat/chatLogin.ftl
struts/action2/trunk/apps/showcase/src/main/webapp/chat/createRoom.ftl

struts/action2/trunk/apps/showcase/src/main/webapp/chat/messagesAvailableInRoom.ftl
struts/action2/trunk/apps/showcase/src/main/webapp/chat/roomSelection.ftl
struts/action2/trunk/apps/showcase/src/main/webapp/chat/roomsAvailable.ftl

struts/action2/trunk/apps/showcase/src/main/webapp/chat/sendMessageToRoomResult.ftl
struts/action2/trunk/apps/showcase/src/main/webapp/chat/showRoom.ftl
struts/action2/trunk/apps/showcase/src/main/webapp/chat/usersAvailable.ftl

struts/action2/trunk/apps/showcase/src/main/webapp/chat/usersAvailableInRoom.ftl

Added: struts/action2/trunk/apps/showcase/src/main/webapp/chat/chatLogin.ftl
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/chat/chatLogin.ftl?rev=415008&view=auto
==
--- struts/action2/trunk/apps/showcase/src/main/webapp/chat/chatLogin.ftl 
(added)
+++ struts/action2/trunk/apps/showcase/src/main/webapp/chat/chatLogin.ftl Sat 
Jun 17 01:27:50 2006
@@ -0,0 +1,16 @@
+
+
+   
+   Showcase - Chat - Login
+   <@saf.head theme="ajax" />
+   
+   
+   <@saf.actionerror />
+   <@saf.actionmessage />
+   <@saf.fielderror />
+   <@saf.form action="login" namespace="/chat" method="POST">
+   <@saf.textfield name="name" label="Name" required="true" />
+   <@saf.submit/>
+   
+   
+

Added: struts/action2/trunk/apps/showcase/src/main/webapp/chat/createRoom.ftl
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/chat/createRoom.ftl?rev=415008&view=auto
==
--- struts/action2/trunk/apps/showcase/src/main/webapp/chat/createRoom.ftl 
(added)
+++ struts/action2/trunk/apps/showcase/src/main/webapp/chat/createRoom.ftl Sat 
Jun 17 01:27:50 2006
@@ -0,0 +1,2 @@
+<@saf.actionerror />
+<@saf.fielderror />

Added: 
struts/action2/trunk/apps/showcase/src/main/webapp/chat/messagesAvailableInRoom.ftl
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/chat/messagesAvailableInRoom.ftl?rev=415008&view=auto
==
--- 
struts/action2/trunk/apps/showcase/src/main/webapp/chat/messagesAvailableInRoom.ftl
 (added)
+++ 
struts/action2/trunk/apps/showcase/src/main/webapp/chat/messagesAvailableInRoom.ftl
 Sat Jun 17 01:27:50 2006
@@ -0,0 +1,33 @@
+
+
+
+   Sender
+   Date
+   Message
+
+<@saf.iterator id="message" value="%{messagesAvailableInRoom}" status="stat">
+
+   <#if stat.odd>
+
+   <#else>
+   
+   
+   <@saf.property value="%{#message.creator.name}" />
+   
+   <#if stat.odd>
+   
+   <#else>
+   
+   
+   <@saf.property value="%{#message.creationDate}" />
+   
+   <#if stat.odd>
+   
+   <#else>
+   
+   
+   <@saf.property value="%{#message.message}" />
+   
+
+
+

Added: struts/action2/trunk/apps/showcase/src/main/webapp/chat/roomSelection.ftl
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/chat/roomSelection.ftl?rev=415008&view=auto
==
--- struts/action2/trunk/apps/showcase/src/main/webapp/chat/roomSelection.ftl 
(added)
+++ struts/action2/trunk/apps/showcase/src/main/webapp/chat/roomSelection.ftl 
Sat Jun 17 01:27:50 2006
@@ -0,0 +1,163 @@
+
+
+
+   
+   Showcase - Chat - Room Selection
+   <@saf.head theme="ajax" />
+   
+   div.box {
+   border: 1px solid red;
+   margin: 5px;
+   }
+   
+   div.box h3 {
+   color: white;
+   background: red;
+   margin: 3px;
+   padding: 2px;
+   }
+   
+   div.nobox {
+   margin: 5px;
+   }
+   
+   table.table {
+   border: 1px solid red;
+   width: 98%;
+   margin: 5px;
+   }
+   
+   table.tabl

svn commit: r415009 - /struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators.xml

2006-06-17 Thread tmjee
Author: tmjee
Date: Sat Jun 17 01:29:16 2006
New Revision: 415009

URL: http://svn.apache.org/viewvc?rev=415009&view=rev
Log:
WW-1351
  - added a simple chat webapp into showcase decomstrating SAF2's ajax
features


Modified:
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators.xml

Modified: 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators.xml?rev=415009&r1=415008&r2=415009&view=diff
==
--- struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators.xml 
(original)
+++ struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators.xml 
Sat Jun 17 01:29:16 2006
@@ -13,6 +13,7 @@
 /AjaxTest.action
 /ajax/remoteforms/AjaxRemoteForm.action
 /tags/ui/ajax/*
+/chat/ajax/*
 
 
 




svn commit: r415011 - /struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/

2006-06-17 Thread tmjee
Author: tmjee
Date: Sat Jun 17 01:33:02 2006
New Revision: 415011

URL: http://svn.apache.org/viewvc?rev=415011&view=rev
Log:
WW-1351
  - added a simple chat webapp into showcase demonstrating SAF2's AJAX
features


Added:

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/ChatAuthenticationInterceptor.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/ChatException.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/ChatInterceptor.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/ChatLoginAction.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/ChatLogoutAction.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/ChatMessage.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/ChatService.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/ChatServiceImpl.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/Constants.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/CrudRoomAction.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/DateConverter.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/EnterRoomAction.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/ExitRoomAction.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/MessagesAvailableInRoomAction.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/Room.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/RoomsAvailableAction.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/SendMessageToRoomAction.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/User.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/UsersAvailableAction.java
   (with props)

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/UsersAvailableInRoomAction.java
   (with props)

Added: 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/ChatAuthenticationInterceptor.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/ChatAuthenticationInterceptor.java?rev=415011&view=auto
==
--- 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/ChatAuthenticationInterceptor.java
 (added)
+++ 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/chat/ChatAuthenticationInterceptor.java
 Sat Jun 17 01:33:02 2006
@@ -0,0 +1,40 @@
+package org.apache.struts.action2.showcase.chat;
+
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts.action2.dispatcher.SessionMap;
+
+import com.opensymphony.xwork.Action;
+import com.opensymphony.xwork.ActionContext;
+import com.opensymphony.xwork.ActionInvocation;
+import com.opensymphony.xwork.interceptor.Interceptor;
+
+public class ChatAuthenticationInterceptor implements Interceptor {
+
+   private static final long serialVersionUID = 1L;
+   
+   private static final Log _log = 
LogFactory.getLog(ChatAuthenticationInterceptor.class);
+   
+   public static final String USER_SESSION_KEY = "chatUserSessionKey";
+
+   public void destroy() {
+   }
+
+   public void init() {
+   }
+
+   public String intercept(ActionInvocation invocation) throws Exception {
+   
+   _log.debug("Authenticating chat user");
+   
+   SessionMap session = (SessionMap) 
ActionContext.getContext().get(ActionContext.SESSION);
+   User user = (User) session.get(USER_SESSION_KEY);
+   
+   if (user == null) {
+   return Action.LOGIN;
+   }
+   return invocation.invoke();
+   }
+
+}

Propchange: 
struts/act

svn commit: r415010 - /struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/

2006-06-17 Thread tmjee
Author: tmjee
Date: Sat Jun 17 01:31:30 2006
New Revision: 415010

URL: http://svn.apache.org/viewvc?rev=415010&view=rev
Log:
WW-1351
  - added a simple chat webapp into showcase demonstrating SAF2's AJAX
features


Added:

struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/

struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/ChatLoginAction-chatLogin-validation.xml
   (with props)

struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/ChatMessage-conversion.properties
   (with props)

struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/CrudRoomAction-createRoom-validation.xml
   (with props)

struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/Room-conversion.properties
   (with props)

struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/SendMessageToRoomAction-sendMessageToRoom-validation.xml
   (with props)

Added: 
struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/ChatLoginAction-chatLogin-validation.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/ChatLoginAction-chatLogin-validation.xml?rev=415010&view=auto
==
--- 
struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/ChatLoginAction-chatLogin-validation.xml
 (added)
+++ 
struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/ChatLoginAction-chatLogin-validation.xml
 Sat Jun 17 01:31:30 2006
@@ -0,0 +1,14 @@
+
+http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";>
+   
+
+   
+   
+   true
+   Name is required
+   
+   
+
+

Propchange: 
struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/ChatLoginAction-chatLogin-validation.xml
--
svn:eol-style = native

Added: 
struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/ChatMessage-conversion.properties
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/ChatMessage-conversion.properties?rev=415010&view=auto
==
--- 
struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/ChatMessage-conversion.properties
 (added)
+++ 
struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/ChatMessage-conversion.properties
 Sat Jun 17 01:31:30 2006
@@ -0,0 +1 @@
+creationDate=org.apache.struts.action2.showcase.chat.DateConverter

Propchange: 
struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/ChatMessage-conversion.properties
--
svn:eol-style = native

Added: 
struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/CrudRoomAction-createRoom-validation.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/CrudRoomAction-createRoom-validation.xml?rev=415010&view=auto
==
--- 
struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/CrudRoomAction-createRoom-validation.xml
 (added)
+++ 
struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/CrudRoomAction-createRoom-validation.xml
 Sat Jun 17 01:31:30 2006
@@ -0,0 +1,20 @@
+
+http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";>
+
+
+   
+   
+   true
+   Room name is required
+   
+   
+   
+   
+   true
+   Room description is required
+   
+   
+  
+   
\ No newline at end of file

Propchange: 
struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/CrudRoomAction-createRoom-validation.xml
--
svn:eol-style = native

Added: 
struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/chat/Room-conversion.properties
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/resources/org/apache/struts/action2/showcase/cha

svn commit: r415014 - /struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/applicationContext.xml

2006-06-17 Thread tmjee
Author: tmjee
Date: Sat Jun 17 01:36:47 2006
New Revision: 415014

URL: http://svn.apache.org/viewvc?rev=415014&view=rev
Log:
WW-1351 
  - added a simple chat webapp into showcase demonstrating SAF2's ajax
capabilities


Modified:

struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/applicationContext.xml

Modified: 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/applicationContext.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/applicationContext.xml?rev=415014&r1=415013&r2=415014&view=diff
==
--- 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/applicationContext.xml
 (original)
+++ 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/applicationContext.xml
 Sat Jun 17 01:36:47 2006
@@ -20,5 +20,69 @@
 
 
 
+
+
+
+
+
+
+   
+   
+   
+
+
+
+   
+   
+   
+
+
+
+   
+   
+   
+
+
+
+   
+   
+   
+
+
+ 
+   
+   
+   
+
+
+
+   
+   
+   
+
+
+
+   
+   
+   
+
+
+
+   
+   
+   
+
+
+
+   
+   
+   
+
+
+
+   
+   
+   
+
 
 




svn commit: r415013 - /struts/action2/trunk/apps/showcase/src/main/resources/xwork.xml

2006-06-17 Thread tmjee
Author: tmjee
Date: Sat Jun 17 01:35:26 2006
New Revision: 415013

URL: http://svn.apache.org/viewvc?rev=415013&view=rev
Log:
WW-1351
   - added a simple chat webapp into showcase demonstrating SAF2's ajax
 functionality


Modified:
struts/action2/trunk/apps/showcase/src/main/resources/xwork.xml

Modified: struts/action2/trunk/apps/showcase/src/main/resources/xwork.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/resources/xwork.xml?rev=415013&r1=415012&r2=415013&view=diff
==
--- struts/action2/trunk/apps/showcase/src/main/resources/xwork.xml (original)
+++ struts/action2/trunk/apps/showcase/src/main/resources/xwork.xml Sat Jun 17 
01:35:26 2006
@@ -12,6 +12,8 @@
 
 
 
+
+
 
 
 




svn commit: r415023 - in /struts/action2/trunk/core/src: main/java/org/apache/struts/action2/components/ main/java/org/apache/struts/action2/views/jsp/ui/ main/resources/template/simple/ test/resource

2006-06-17 Thread tmjee
Author: tmjee
Date: Sat Jun 17 05:26:03 2006
New Revision: 415023

URL: http://svn.apache.org/viewvc?rev=415023&view=rev
Log:
WW-1319
 - added up/down buttons on both side of the select tag, allow item to
   be crossed transfered as well as being moved up and down in its
containing select tag.
 


Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/OptionTransferSelect.java

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/views/jsp/ui/OptionTransferSelectTag.java

struts/action2/trunk/core/src/main/resources/template/simple/optiontransferselect.ftl

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/optiontransferselect-1.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/optiontransferselect-2.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/optiontransferselect-3.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/optiontransferselect-4.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/optiontransferselect-5.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/optiontransferselect-6.txt

struts/action2/trunk/core/src/test/resources/org/apache/struts/action2/views/jsp/ui/optiontransferselect-7.txt

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/OptionTransferSelect.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/OptionTransferSelect.java?rev=415023&r1=415022&r2=415023&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/OptionTransferSelect.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/OptionTransferSelect.java
 Sat Jun 17 05:26:03 2006
@@ -100,6 +100,8 @@
protected String allowAddAllToLeft;
protected String allowAddAllToRight;
protected String allowSelectAll;
+   protected String allowUpDownOnLeft;
+   protected String allowUpDownOnRight;

protected String leftTitle;
protected String rightTitle;
@@ -112,6 +114,10 @@
protected String addAllToLeftLabel;
protected String addAllToRightLabel;
protected String selectAllLabel;
+   protected String leftUpLabel;
+   protected String leftDownlabel;
+   protected String rightUpLabel;
+   protected String rightDownLabel;


public OptionTransferSelect(OgnlValueStack stack, HttpServletRequest 
request, HttpServletResponse response) {
@@ -182,6 +188,13 @@
addParameter("allowAddAllToRight", 
allowAddAllToRight != null ? 
findValue(allowAddAllToRight, Boolean.class) : Boolean.TRUE);

+   // allowUpDownOnLeft
+   addParameter("allowUpDownOnLeft", 
+   allowUpDownOnLeft != null ? 
findValue(allowUpDownOnLeft, Boolean.class) : Boolean.TRUE);
+   
+   // allowUpDownOnRight
+   addParameter("allowUpDownOnRight", 
+   allowUpDownOnRight != null ? 
findValue(allowUpDownOnRight, Boolean.class) : Boolean.TRUE);


// leftTitle
@@ -215,6 +228,24 @@
addParameter("selectAllLabel",
selectAllLabel != null ? 
findValue(selectAllLabel, String.class) : "<*>");

+   // leftUpLabel
+   addParameter("leftUpLabel", 
+   leftUpLabel != null ? findValue(leftUpLabel, 
String.class) : "^");
+   
+   
+   // leftDownLabel
+   addParameter("leftDownLabel", 
+   leftDownlabel != null ? 
findValue(leftDownlabel, String.class) : "v");
+   
+   
+   // rightUpLabel
+   addParameter("rightUpLabel", 
+   rightUpLabel != null ? findValue(rightUpLabel, 
String.class) : "^");
+   
+   
+   // rightDownlabel
+   addParameter("rightDownLabel", 
+   rightDownLabel != null ? 
findValue(rightDownLabel, String.class) : "v");



@@ -364,6 +395,33 @@
public String getLeftTitle() {
return leftTitle;
}
+   
+   
+   /**
+* enable up / down on the left side
+* @a2 tagattribute required="false" 
+*/
+   public void setAllowUpDownOnLeft(String allowUpDownOnLeft) {
+   this.allowUpDownOnLeft = allowUpDownOnLeft;
+   }
+   

svn commit: r415045 - in /struts/action2/trunk/core/src/main/java/org/apache/struts/action2/plexus: PlexusFilter.java PlexusObjectFactory.java

2006-06-17 Thread mrdon
Author: mrdon
Date: Sat Jun 17 12:02:02 2006
New Revision: 415045

URL: http://svn.apache.org/viewvc?rev=415045&view=rev
Log:
Adding the ability to use a role-hint in the plexus configuration
Patch provided by Emmanuel Venisse

WW-1329

Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/plexus/PlexusFilter.java

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/plexus/PlexusObjectFactory.java

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/plexus/PlexusFilter.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/plexus/PlexusFilter.java?rev=415045&r1=415044&r2=415045&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/plexus/PlexusFilter.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/plexus/PlexusFilter.java
 Sat Jun 17 12:02:02 2006
@@ -31,6 +31,7 @@
  */
 public class PlexusFilter implements Filter {
 private static final Log log = 
LogFactory.getLog(PlexusObjectFactory.class);
+private static final String CHILD_CONTAINER_NAME = "request";
 
 public static boolean loaded = false;
 
@@ -44,33 +45,41 @@
 public void doFilter(ServletRequest req, ServletResponse res, FilterChain 
chain) throws IOException, ServletException {
 PlexusContainer child = null;
 try {
-HttpServletRequest request = (HttpServletRequest) req;
-HttpSession session = request.getSession(false);
-PlexusContainer parent;
-if (session != null) {
-parent = (PlexusContainer) 
session.getAttribute(PlexusLifecycleListener.KEY);
-} else {
-parent = (PlexusContainer) 
ctx.getAttribute(PlexusLifecycleListener.KEY);
+try {
+HttpServletRequest request = (HttpServletRequest) req;
+HttpSession session = request.getSession(false);
+PlexusContainer parent;
+if (session != null) {
+parent = (PlexusContainer) 
session.getAttribute(PlexusLifecycleListener.KEY);
+} else {
+parent = (PlexusContainer) 
ctx.getAttribute(PlexusLifecycleListener.KEY);
+}
+
+if (parent.hasChildContainer(CHILD_CONTAINER_NAME)) {
+log.warn("Plexus container (scope: request) alredy 
exist.");
+child = parent.getChildContainer(CHILD_CONTAINER_NAME);
+} else {
+child = parent.createChildContainer(CHILD_CONTAINER_NAME, 
Collections.EMPTY_LIST, Collections.EMPTY_MAP);
+PlexusUtils.configure(child, "plexus-request.xml");
+child.initialize();
+child.start();
+}
+PlexusThreadLocal.setPlexusContainer(child);
+} catch (Exception e) {
+log.error("Error initializing plexus container (scope: 
request)", e);
 }
 
-child = parent.createChildContainer("request", 
Collections.EMPTY_LIST, Collections.EMPTY_MAP);
-PlexusUtils.configure(child, "plexus-request.xml");
-child.initialize();
-child.start();
-PlexusThreadLocal.setPlexusContainer(child);
-} catch (Exception e) {
-log.error("Error initializing plexus container (scope: request)", 
e);
+chain.doFilter(req, res);
 }
-
-chain.doFilter(req, res);
-
-try {
-if (child != null) {
-child.dispose();
+finally {
+try {
+if (child != null) {
+child.dispose();
+}
+PlexusThreadLocal.setPlexusContainer(null);
+} catch (Exception e) {
+log.error("Error disposing plexus container (scope: request)", 
e);
 }
-PlexusThreadLocal.setPlexusContainer(null);
-} catch (Exception e) {
-log.error("Error disposing plexus container (scope: request)", e);
 }
 }
 

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/plexus/PlexusObjectFactory.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/plexus/PlexusObjectFactory.java?rev=415045&r1=415044&r2=415045&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/plexus/PlexusObjectFactory.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/plexus/PlexusObjectFactory.java
 Sat Jun 17 12:02:02 2006
@@ -17,21 +17,31 @@
  */
 package org.apache.struts.action2.plexus;
 
-import org.apache.struts.action2.util.ObjectFactoryInitializable;
+import 

svn commit: r415046 - /struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java

2006-06-17 Thread mrdon
Author: mrdon
Date: Sat Jun 17 12:14:09 2006
New Revision: 415046

URL: http://svn.apache.org/viewvc?rev=415046&view=rev
Log:
Fixing potential recurision problem with ActionContext cleanup in
Weblogic.  Patch provided by Pete Matern

WW-1335

Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java?rev=415046&r1=415045&r2=415046&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java
 Sat Jun 17 12:14:09 2006
@@ -55,7 +55,7 @@
 
 private static final Log LOG = 
LogFactory.getLog(ActionContextCleanUp.class);
 
-private static final String CLEANUP_PRESENT = "__cleanup_present";
+private static final String COUNTER = "__cleanup_recursion_counter";
 
 protected FilterConfig filterConfig;
 
@@ -89,20 +89,29 @@
 }
 
 try {
-request.setAttribute(CLEANUP_PRESENT, Boolean.TRUE);
+Integer count = (Integer)request.getAttribute(COUNTER);
+if (count == null) {
+count = new Integer(1);
+}
+else {
+count = new Integer(count.intValue()+1);
+}
+request.setAttribute(COUNTER, count);
 chain.doFilter(request, response);
 } finally {
-request.setAttribute(CLEANUP_PRESENT, Boolean.FALSE);
+int counterVal = 
((Integer)request.getAttribute(COUNTER)).intValue();
+counterVal -= 1;
+request.setAttribute(COUNTER, new Integer(counterVal));
 cleanUp(request);
 }
 }
 
 protected static void cleanUp(ServletRequest req) {
 // should we clean up yet?
-Boolean dontClean = (Boolean) req.getAttribute(CLEANUP_PRESENT);
-if (dontClean != null && dontClean.booleanValue()) {
-return;
-}
+if (req.getAttribute(COUNTER) != null &&
+ ((Integer)req.getAttribute(COUNTER)).intValue() > 0 ) {
+ return;
+ }
 
 // tear down the component manager if it was created
 ComponentManager componentManager = (ComponentManager) 
req.getAttribute(ComponentManager.COMPONENT_MANAGER_KEY);




svn commit: r415047 - in /struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher: DispatcherUtils.java multipart/JakartaMultiPartRequest.java

2006-06-17 Thread mrdon
Author: mrdon
Date: Sat Jun 17 12:20:52 2006
New Revision: 415047

URL: http://svn.apache.org/viewvc?rev=415047&view=rev
Log:
Changing request encoding to apply to file uploads, allowing zero-sized
file uploads

WW-1324

Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/DispatcherUtils.java

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/multipart/JakartaMultiPartRequest.java

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/DispatcherUtils.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/DispatcherUtils.java?rev=415047&r1=415046&r2=415047&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/DispatcherUtils.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/DispatcherUtils.java
 Sat Jun 17 12:20:52 2006
@@ -411,7 +411,7 @@
 locale = 
LocalizedTextUtil.localeFromString(Configuration.getString(StrutsConstants.STRUTS_LOCALE),
 request.getLocale());
 }
 
-if (encoding != null && !MultiPartRequest.isMultiPart(request)) {
+if (encoding != null) {
 try {
 request.setCharacterEncoding(encoding);
 } catch (Exception e) {

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/multipart/JakartaMultiPartRequest.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/multipart/JakartaMultiPartRequest.java?rev=415047&r1=415046&r2=415047&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/multipart/JakartaMultiPartRequest.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/multipart/JakartaMultiPartRequest.java
 Sat Jun 17 12:20:52 2006
@@ -85,8 +85,6 @@
 values.add(item.getString());
 }
 params.put(item.getFieldName(), values);
-} else if (item.getSize() == 0) {
-log.warn("Item is a file upload of 0 size, ignoring");
 } else {
 log.debug("Item is a file upload");
 




svn commit: r415054 - in /struts/action2/trunk/core/src/main: java/org/apache/struts/action2/portlet/dispatcher/Jsr168Dispatcher.java resources/struts-default.xml

2006-06-17 Thread mrdon
Author: mrdon
Date: Sat Jun 17 13:12:40 2006
New Revision: 415054

URL: http://svn.apache.org/viewvc?rev=415054&view=rev
Log:
Fixing stack in portlet mode so action always on top, removing IoC intercepter 
stack
Portlet patch provided by Nils-Helge Garli

WW-1313 WW-1286 WW-1342

Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/portlet/dispatcher/Jsr168Dispatcher.java
struts/action2/trunk/core/src/main/resources/struts-default.xml

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/portlet/dispatcher/Jsr168Dispatcher.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/portlet/dispatcher/Jsr168Dispatcher.java?rev=415054&r1=415053&r2=415054&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/portlet/dispatcher/Jsr168Dispatcher.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/portlet/dispatcher/Jsr168Dispatcher.java
 Sat Jun 17 13:12:40 2006
@@ -36,11 +36,8 @@
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import com.opensymphony.util.ClassLoaderUtil;
-import com.opensymphony.util.FileManager;
-import org.apache.struts.action2.StrutsStatics;
 import org.apache.struts.action2.StrutsConstants;
+import org.apache.struts.action2.StrutsStatics;
 import org.apache.struts.action2.config.Configuration;
 import org.apache.struts.action2.dispatcher.ApplicationMap;
 import org.apache.struts.action2.dispatcher.RequestMap;
@@ -54,12 +51,16 @@
 import org.apache.struts.action2.portlet.context.ServletContextHolderListener;
 import org.apache.struts.action2.util.AttributeMap;
 import org.apache.struts.action2.util.ObjectFactoryInitializable;
+
+import com.opensymphony.util.ClassLoaderUtil;
+import com.opensymphony.util.FileManager;
 import com.opensymphony.xwork.ActionContext;
 import com.opensymphony.xwork.ActionProxy;
 import com.opensymphony.xwork.ActionProxyFactory;
 import com.opensymphony.xwork.ObjectFactory;
 import com.opensymphony.xwork.config.ConfigurationException;
 import com.opensymphony.xwork.util.LocalizedTextUtil;
+import com.opensymphony.xwork.util.OgnlValueStack;
 
 /**
  * 
@@ -420,8 +421,10 @@
 ActionProxy action = (ActionProxy) request.getPortletSession()
 .getAttribute(EVENT_ACTION);
 if (action != null) {
-proxy.getInvocation().getStack().push(
-action.getInvocation().getAction());
+OgnlValueStack stack = proxy.getInvocation().getStack();
+Object top = stack.pop();
+stack.push(action.getInvocation().getAction());
+stack.push(top);
 }
 }
 proxy.execute();

Modified: struts/action2/trunk/core/src/main/resources/struts-default.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/resources/struts-default.xml?rev=415054&r1=415053&r2=415054&view=diff
==
--- struts/action2/trunk/core/src/main/resources/struts-default.xml (original)
+++ struts/action2/trunk/core/src/main/resources/struts-default.xml Sat Jun 17 
13:12:40 2006
@@ -67,14 +67,6 @@
 
 
 
-
-
-
-
-
-
 
 
 




svn commit: r415052 - in /struts/action2/trunk: apps/showcase/src/main/webapp/jsf/ core/src/main/java/org/apache/struts/action2/dispatcher/ core/src/main/java/org/apache/struts/action2/lifecycle/ core

2006-06-17 Thread mrdon
Author: mrdon
Date: Sat Jun 17 12:59:52 2006
New Revision: 415052

URL: http://svn.apache.org/viewvc?rev=415052&view=rev
Log:
Removing XWork IoC references, adding missing jsf showcase index page

WW-1342 WW-1320

Added:
struts/action2/trunk/apps/showcase/src/main/webapp/jsf/index.jsp
Removed:
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/lifecycle/
Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/DispatcherUtils.java

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/FilterDispatcher.java
struts/action2/trunk/core/src/main/resources/struts-default.xml

Added: struts/action2/trunk/apps/showcase/src/main/webapp/jsf/index.jsp
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/jsf/index.jsp?rev=415052&view=auto
==
--- struts/action2/trunk/apps/showcase/src/main/webapp/jsf/index.jsp (added)
+++ struts/action2/trunk/apps/showcase/src/main/webapp/jsf/index.jsp Sat Jun 17 
12:59:52 2006
@@ -0,0 +1,24 @@
+<[EMAIL PROTECTED] prefix="saf" uri="/struts-action" %>
+
+
+
+Showcase - JSF Integration
+
+
+ JavaServer Faces Integration 
+
+
+The following pages show how Struts Action 2 and JSF components can work 
together,
+each doing what they do best.
+
+   
+
+   
+   List available 
Employees
+Create/Edit Employee
+   
+
+
+
+
+
\ No newline at end of file

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java?rev=415052&r1=415051&r2=415052&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java
 Sat Jun 17 12:59:52 2006
@@ -18,7 +18,6 @@
 package org.apache.struts.action2.dispatcher;
 
 import com.opensymphony.xwork.ActionContext;
-import com.opensymphony.xwork.interceptor.component.ComponentManager;
 
 import javax.servlet.*;
 import javax.servlet.http.HttpServletRequest;
@@ -112,12 +111,6 @@
  ((Integer)req.getAttribute(COUNTER)).intValue() > 0 ) {
  return;
  }
-
-// tear down the component manager if it was created
-ComponentManager componentManager = (ComponentManager) 
req.getAttribute(ComponentManager.COMPONENT_MANAGER_KEY);
-if (componentManager != null) {
-componentManager.dispose();
-}
 
 // always dontClean up the thread request, even if an action hasn't 
been executed
 ActionContext.setContext(null);

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/DispatcherUtils.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/DispatcherUtils.java?rev=415052&r1=415051&r2=415052&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/DispatcherUtils.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/DispatcherUtils.java
 Sat Jun 17 12:59:52 2006
@@ -31,8 +31,6 @@
 import org.apache.struts.action2.util.ObjectFactoryInitializable;
 import com.opensymphony.xwork.*;
 import com.opensymphony.xwork.config.ConfigurationException;
-import com.opensymphony.xwork.interceptor.component.ComponentInterceptor;
-import com.opensymphony.xwork.interceptor.component.ComponentManager;
 import com.opensymphony.xwork.util.*;
 import com.opensymphony.xwork.util.location.Location;
 import com.opensymphony.xwork.util.location.LocationUtils;
@@ -326,7 +324,6 @@
 extraContext.put(StrutsStatics.HTTP_REQUEST, request);
 extraContext.put(StrutsStatics.HTTP_RESPONSE, response);
 extraContext.put(StrutsStatics.SERVLET_CONTEXT, servletContext);
-extraContext.put(ComponentInterceptor.COMPONENT_MANAGER, 
request.getAttribute(ComponentManager.COMPONENT_MANAGER_KEY));
 
 // helpers to get access to request/session/application scope
 extraContext.put("request", requestMap);

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/FilterDispatcher.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/FilterDispatcher.java?rev=415052&r1=415051&r2=415052&view=diff
==
--- 
struts/actio

[Struts Wiki] Trivial Update of "StrutsAction1Planning" by MartinCooper

2006-06-17 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 MartinCooper:
http://wiki.apache.org/struts/StrutsAction1Planning

The comment on the change is:
Typos.

--
  
  There are three major issues with supporting JSR-168 (and probably a bunch of 
smaller ones as well):
  
- * The framrwork APIs assume servlet API objects (!ServletContext, 
!ServletRequest, !ServletResponse), whereas JSR-168 talks about 
!PortletContext, !PortletRequest, and !PortletResponse. We'd either need to 
change the calling sequence for Action.execute() -- problematic for backwards 
compatibility -- or fake it somehow in a portlet environment.
+ * The framework APIs assume servlet API objects (!ServletContext, 
!ServletRequest, !ServletResponse), whereas JSR-168 talks about 
!PortletContext, !PortletRequest, and !PortletResponse. We'd either need to 
change the calling sequence for Action.execute() -- problematic for backwards 
compatibility -- or fake it somehow in a portlet environment.
  * The lifecycle of a portlet request is actually divided into two chunks 
-- processing and then rendering. From a Struts perspective, that means making 
sure that the first part of the request processor pipeline need to happen in 
the "process" part, and the forwarding to the resulting page needs to happen in 
the "render" part.
  * Today, Struts owns the process of calculating URLs for pages and 
actions. Because it's in a webapp, it knows exactly what to do for the 
developer. However, in a portlet container it's actually the portal server that 
manages URLs, so a Struts-based portlet would need to interact with the portlet 
APIs for this purpose.
  
- A strong goal should be that an application should be usable either as a 
webapp or as a portlet, with little (ideally no) changes. Therefore, we should 
build whatever it takes to support this into the standard framework 
distribution, which could then be used in both environments.
+ A strong goal should be that an application should be usable either as a 
webapp or as a portlet, with few (ideally no) changes. Therefore, we should 
build whatever it takes to support this into the standard framework 
distribution, which could then be used in both environments.
  
  == Relevant Proposals ==
  


svn commit: r415088 - /struts/shale/trunk/shale-apps/pom.xml

2006-06-17 Thread wsmoak
Author: wsmoak
Date: Sat Jun 17 21:07:49 2006
New Revision: 415088

URL: http://svn.apache.org/viewvc?rev=415088&view=rev
Log:
Add  and  elements since the directory name shale-apps does not 
match the artifactId shale-apps-parent.

Modified:
struts/shale/trunk/shale-apps/pom.xml

Modified: struts/shale/trunk/shale-apps/pom.xml
URL: 
http://svn.apache.org/viewvc/struts/shale/trunk/shale-apps/pom.xml?rev=415088&r1=415087&r2=415088&view=diff
==
--- struts/shale/trunk/shale-apps/pom.xml (original)
+++ struts/shale/trunk/shale-apps/pom.xml Sat Jun 17 21:07:49 2006
@@ -31,6 +31,20 @@
 Apache Shale Framework Sample Apps
 http://struts.apache.org/struts-shale
 
+
+
scm:svn:http://svn.apache.org/repos/asf/struts/shale/trunk/shale-apps
+
scm:svn:https://svn.apache.org/repos/asf/struts/shale/trunk/shale-apps
+http://svn.apache.org/viewvc/struts/shale/trunk/shale-apps
+
+
+
+
+apache-site
+
scp://people.apache.org/www/struts.apache.org/struts-shale/shale-apps
+
+
+
+
 
 
 




svn commit: r415091 - in /struts/action2/trunk/apps/showcase/src/main/webapp: WEB-INF/decorators/main.jsp chat/index.jsp showcase.jsp

2006-06-17 Thread tmjee
Author: tmjee
Date: Sat Jun 17 22:11:59 2006
New Revision: 415091

URL: http://svn.apache.org/viewvc?rev=415091&view=rev
Log:
WW-1351
  - added link to chat (ajax) example 
  - added redirect to chat example when hitting url /chat/


Added:
struts/action2/trunk/apps/showcase/src/main/webapp/chat/index.jsp   (with 
props)
Modified:

struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp
struts/action2/trunk/apps/showcase/src/main/webapp/showcase.jsp

Modified: 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp?rev=415091&r1=415090&r2=415091&view=diff
==
--- 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp 
(original)
+++ 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp 
Sat Jun 17 22:11:59 2006
@@ -78,6 +78,7 @@
 "/>Conversion
 ">JSF
 ">Freemarker
+">Chat 
(AJAX)
 ">Help
 
 

Added: struts/action2/trunk/apps/showcase/src/main/webapp/chat/index.jsp
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/chat/index.jsp?rev=415091&view=auto
==
--- struts/action2/trunk/apps/showcase/src/main/webapp/chat/index.jsp (added)
+++ struts/action2/trunk/apps/showcase/src/main/webapp/chat/index.jsp Sat Jun 
17 22:11:59 2006
@@ -0,0 +1,3 @@
+
+<% response.sendRedirect("main.action"); %>
+

Propchange: struts/action2/trunk/apps/showcase/src/main/webapp/chat/index.jsp
--
svn:eol-style = native

Modified: struts/action2/trunk/apps/showcase/src/main/webapp/showcase.jsp
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/showcase.jsp?rev=415091&r1=415090&r2=415091&view=diff
==
--- struts/action2/trunk/apps/showcase/src/main/webapp/showcase.jsp (original)
+++ struts/action2/trunk/apps/showcase/src/main/webapp/showcase.jsp Sat Jun 17 
22:11:59 2006
@@ -65,6 +65,9 @@
 
 
 JavaServer 
Faces Example
+
+
+Chat 
(AJAX) Example
 
 
 




svn commit: r415094 - /struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/mapper/DefaultActionMapper.java

2006-06-17 Thread tmjee
Author: tmjee
Date: Sat Jun 17 22:37:19 2006
New Revision: 415094

URL: http://svn.apache.org/viewvc?rev=415094&view=rev
Log:
WW-1340
  - corrected some mistake in javadoc, it should be  instead of 


Modified:

struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/mapper/DefaultActionMapper.java

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/mapper/DefaultActionMapper.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/mapper/DefaultActionMapper.java?rev=415094&r1=415093&r2=415094&view=diff
==
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/mapper/DefaultActionMapper.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/mapper/DefaultActionMapper.java
 Sat Jun 17 22:37:19 2006
@@ -70,7 +70,7 @@
  *
  * 
  * 
- * 
+ * 
  * 
  * 
  * 
@@ -90,7 +90,7 @@
  *
  * 
  * 
- * 
+ * 
  * 
  * 
  * 
@@ -110,7 +110,7 @@
  *
  * 
  * 
- * 
+ * 
  * 
  * 
  * 
@@ -130,7 +130,7 @@
  *
  * 
  * 
- * 
+ * 
  * 
  * 
  * 




svn commit: r415096 - in /struts/shale/trunk/shale-test: pom.xml src/main/java/org/apache/shale/test/cargo/ src/main/java/org/apache/shale/test/cargo/CargoTestSetup.java

2006-06-17 Thread wsmoak
Author: wsmoak
Date: Sat Jun 17 22:46:26 2006
New Revision: 415096

URL: http://svn.apache.org/viewvc?rev=415096&view=rev
Log:
[SHALE-193] Added CargoTestSetup to start and stop a container for integration 
testing.
Shale Test now has an optional dependency on Cargo.

Added:
struts/shale/trunk/shale-test/src/main/java/org/apache/shale/test/cargo/

struts/shale/trunk/shale-test/src/main/java/org/apache/shale/test/cargo/CargoTestSetup.java
   (with props)
Modified:
struts/shale/trunk/shale-test/pom.xml

Modified: struts/shale/trunk/shale-test/pom.xml
URL: 
http://svn.apache.org/viewvc/struts/shale/trunk/shale-test/pom.xml?rev=415096&r1=415095&r2=415096&view=diff
==
--- struts/shale/trunk/shale-test/pom.xml (original)
+++ struts/shale/trunk/shale-test/pom.xml Sat Jun 17 22:46:26 2006
@@ -45,6 +45,18 @@
 
 
 
+
+org.codehaus.cargo
+cargo-core-uberjar
+0.8
+true
+
+
+org.codehaus.cargo
+cargo-ant
+0.8
+true
+
 
 
 

Added: 
struts/shale/trunk/shale-test/src/main/java/org/apache/shale/test/cargo/CargoTestSetup.java
URL: 
http://svn.apache.org/viewvc/struts/shale/trunk/shale-test/src/main/java/org/apache/shale/test/cargo/CargoTestSetup.java?rev=415096&view=auto
==
--- 
struts/shale/trunk/shale-test/src/main/java/org/apache/shale/test/cargo/CargoTestSetup.java
 (added)
+++ 
struts/shale/trunk/shale-test/src/main/java/org/apache/shale/test/cargo/CargoTestSetup.java
 Sat Jun 17 22:46:26 2006
@@ -0,0 +1,175 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id$
+ */
+
+package org.apache.shale.test.cargo;
+
+import java.io.File;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+
+import org.codehaus.cargo.container.InstalledLocalContainer;
+import org.codehaus.cargo.container.ContainerType;
+import org.codehaus.cargo.container.tomcat.Tomcat5xInstalledLocalContainer;
+import org.codehaus.cargo.container.deployable.Deployable;
+import org.codehaus.cargo.container.deployable.DeployableType;
+import org.codehaus.cargo.container.configuration.LocalConfiguration;
+import org.codehaus.cargo.container.configuration.ConfigurationType;
+import org.codehaus.cargo.generic.deployable.DefaultDeployableFactory;
+import org.codehaus.cargo.generic.configuration.ConfigurationFactory;
+import org.codehaus.cargo.generic.configuration.DefaultConfigurationFactory;
+import org.codehaus.cargo.generic.DefaultContainerFactory;
+import org.codehaus.cargo.util.log.FileLogger;
+
+/**
+ * Convenience TestSetup class which uses Cargo to start
+ * and stop a Servlet container.
+ */
+public class CargoTestSetup extends TestSetup {
+
+//  
Constructors
+
+/**
+ * Construct a new instance of this test setup.
+ *
+ * @param test Tests to be run within this test setup.
+ */
+public CargoTestSetup(Test test) {
+super(test);
+}
+
+// -- Instance 
Variables
+
+/**
+ * The installed local container for this test setup.
+ */
+private InstalledLocalContainer container;
+
+// -- Test Setup 
Methods
+
+/**
+ * Start the container prior to running the tests.
+ * The following System properties are used:
+ * 
+ * cargo.container.id - ID of the container to use. [tomcat5x]
+ * cargo.container.home - Full path to a local installation of the 
container.
+ * If not set, uses the value of the TOMCAT_HOME environment variable.
+ * One of cargo.container.home or TOMCAT_HOME is REQUIRED.
+ * cargo.deployable - Full path to the war file to deploy. 
REQUIRED.
+ * cargo.container.output - Full path to a file to use for output. 
[none]
+ * cargo.container.log - Full path to a file to use for logging. 
[none]
+ * cargo.servlet.port - The port on which the container should listen. 
[8080]
+ * 
+ * 
+ *
+ * @throws Exception if an error occurs.
+ */
+protected void setUp() throws Exception {
+
+super.setUp();
+
+// If there is no container id, defa

svn commit: r415098 - in /struts/action2/trunk/apps/showcase/src/main: java/org/apache/struts/action2/showcase/action/ java/org/apache/struts/action2/showcase/jsf/ resources/ webapp/WEB-INF/ webapp/WE

2006-06-17 Thread mrdon
Author: mrdon
Date: Sat Jun 17 22:47:30 2006
New Revision: 415098

URL: http://svn.apache.org/viewvc?rev=415098&view=rev
Log:
Changed JSF example to use common CRUD actions and DAO's, reorganizes
pages to match other example

WW-1320

Added:

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/jsf/JsfEmployeeAction.java
struts/action2/trunk/apps/showcase/src/main/webapp/jsf/employee/
struts/action2/trunk/apps/showcase/src/main/webapp/jsf/employee/edit.jsp
struts/action2/trunk/apps/showcase/src/main/webapp/jsf/employee/list.jsp
Removed:

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/jsf/EditEmployeeAction.java

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/jsf/Employee.java

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/jsf/EmployeeDao.java

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/jsf/ListEmployeesAction.java
struts/action2/trunk/apps/showcase/src/main/webapp/jsf/editEmployee.jsp
struts/action2/trunk/apps/showcase/src/main/webapp/jsf/listEmployees.jsp
Modified:

struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/action/EmployeeAction.java
struts/action2/trunk/apps/showcase/src/main/resources/xwork-jsf.xml

struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/web.xml
struts/action2/trunk/apps/showcase/src/main/webapp/jsf/index.jsp

Modified: 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/action/EmployeeAction.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/action/EmployeeAction.java?rev=415098&r1=415097&r2=415098&view=diff
==
--- 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/action/EmployeeAction.java
 (original)
+++ 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/action/EmployeeAction.java
 Sat Jun 17 22:47:30 2006
@@ -31,7 +31,7 @@
 import java.util.List;
 
 /**
- * EditEmployeeAction.
+ * JsfEmployeeAction.
  */
 
 public class EmployeeAction extends AbstractCRUDAction implements Preparable {
@@ -83,7 +83,7 @@
 
 public void setEmployeeDao(EmployeeDao employeeDao) {
 if (log.isDebugEnabled()) {
-log.debug("EditEmployeeAction - [setEmployeeDao]: employeeDao 
injected.");
+log.debug("JsfEmployeeAction - [setEmployeeDao]: employeeDao 
injected.");
 }
 this.employeeDao = employeeDao;
 }

Added: 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/jsf/JsfEmployeeAction.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/jsf/JsfEmployeeAction.java?rev=415098&view=auto
==
--- 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/jsf/JsfEmployeeAction.java
 (added)
+++ 
struts/action2/trunk/apps/showcase/src/main/java/org/apache/struts/action2/showcase/jsf/JsfEmployeeAction.java
 Sat Jun 17 22:47:30 2006
@@ -0,0 +1,119 @@
+/*
+ * $Id: QuizAction.java 394498 2006-04-16 15:28:06Z tmjee $
+ *
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.struts.action2.showcase.jsf;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.struts.action2.showcase.action.EmployeeAction;
+import org.apache.struts.action2.showcase.dao.SkillDao;
+import org.apache.struts.action2.showcase.model.Employee;
+import org.apache.struts.action2.showcase.model.Skill;
+
+/**
+ * Overriding the EmployeeAction to main provide getters returning the data in
+ * the form required by the JSF components
+ */
+public class JsfEmployeeAction extends EmployeeAction {
+
+private static final long serialVersionUID = 1L;
+
+/**
+ * Creating a default employee and main skill, since the JSF EL can't 
handle
+ * creating new objects as necessary

svn commit: r415099 - in /struts/shale/trunk/shale-apps/shale-blank: pom.xml src/test/java/org/apache/shale/blank/systest/Tomcat5xWelcomeTestCase.java src/test/java/org/apache/shale/blank/systest/Welc

2006-06-17 Thread wsmoak
Author: wsmoak
Date: Sat Jun 17 23:11:04 2006
New Revision: 415099

URL: http://svn.apache.org/viewvc?rev=415099&view=rev
Log:
Adapt the Shale Blank system integration test to use the new CargoTestSetup 
added to Shale Test in SHALE-193.
To run the tests, enable the 'itest' profile:  mvn install -Pitest
TODO:  Determine how to stop Tomcat from writing SESSIONS.ser to ${basedir} 
(the shale-blank directory).

Added:

struts/shale/trunk/shale-apps/shale-blank/src/test/java/org/apache/shale/blank/systest/Tomcat5xWelcomeTestCase.java
   (with props)
Modified:
struts/shale/trunk/shale-apps/shale-blank/pom.xml

struts/shale/trunk/shale-apps/shale-blank/src/test/java/org/apache/shale/blank/systest/WelcomeTestCase.java

Modified: struts/shale/trunk/shale-apps/shale-blank/pom.xml
URL: 
http://svn.apache.org/viewvc/struts/shale/trunk/shale-apps/shale-blank/pom.xml?rev=415099&r1=415098&r2=415099&view=diff
==
--- struts/shale/trunk/shale-apps/shale-blank/pom.xml (original)
+++ struts/shale/trunk/shale-apps/shale-blank/pom.xml Sat Jun 17 23:11:04 2006
@@ -129,12 +129,12 @@
 test
 
 
-
-none
-
 
 **/systest/**
 
+
+
**/WelcomeTestCase.java
+
 
 
 url
@@ -144,6 +144,18 @@
 
 cargo.tomcat5x.home
 
${cargo.tomcat5x.home}
+
+
+cargo.tomcat5x.output
+
${basedir}/target/tomcat5x.out
+
+
+cargo.tomcat5x.log
+
${basedir}/target/tomcat5x.log
+
+
+cargo.deployable
+
${basedir}/target/${artifactId}.war
 
 
 

Added: 
struts/shale/trunk/shale-apps/shale-blank/src/test/java/org/apache/shale/blank/systest/Tomcat5xWelcomeTestCase.java
URL: 
http://svn.apache.org/viewvc/struts/shale/trunk/shale-apps/shale-blank/src/test/java/org/apache/shale/blank/systest/Tomcat5xWelcomeTestCase.java?rev=415099&view=auto
==
--- 
struts/shale/trunk/shale-apps/shale-blank/src/test/java/org/apache/shale/blank/systest/Tomcat5xWelcomeTestCase.java
 (added)
+++ 
struts/shale/trunk/shale-apps/shale-blank/src/test/java/org/apache/shale/blank/systest/Tomcat5xWelcomeTestCase.java
 Sat Jun 17 23:11:04 2006
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id$
+ */
+
+package org.apache.shale.blank.systest;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.framework.TestCase;
+import org.apache.shale.test.cargo.CargoTestSetup;
+
+/**
+ * Setup for running tests in Tomcat 5x.
+ */
+public class Tomcat5xWelcomeTestCase extends TestCase {
+
+/**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+public Tomcat5xWelcomeTestCase(String testName) {
+super(testName);
+}
+
+/**
+ * Set the necessary System properties, and return the suite of tests,
+ * wrapped in CargoTestSetup to start and stop the container.
+ *
+ * @return the suite of tests being tested
+ */
+public static Test suite()
+{
+// Set the System properties expected by CargoTestSetup
+System.setProperty( "cargo.container.home",
+Sys