Author: ate
Date: Tue Aug 7 10:01:35 2012
New Revision: 1370156
URL: http://svn.apache.org/viewvc?rev=1370156&view=rev
Log:
RAVE-698: more Spring HMVC framework plumbing
Modified:
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/mybody.jsp
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/mycontent.jsp
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/myfooter.jsp
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/myheader.jsp
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/mymenu.jsp
rave/sandbox/content-services/rave-web-hmvc/src/main/java/org/apache/rave/portal/web/hmvc/servlet/HmvcDispatcherServlet.java
Modified:
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/mybody.jsp
URL:
http://svn.apache.org/viewvc/rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/mybody.jsp?rev=1370156&r1=1370155&r2=1370156&view=diff
==============================================================================
---
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/mybody.jsp
(original)
+++
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/mybody.jsp
Tue Aug 7 10:01:35 2012
@@ -0,0 +1,8 @@
+<%@ page language="java" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib uri="http://www.apache-rave.org/jsp/core" prefix="rave" %>
+
+<h2>mybody</h2>
\ No newline at end of file
Modified:
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/mycontent.jsp
URL:
http://svn.apache.org/viewvc/rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/mycontent.jsp?rev=1370156&r1=1370155&r2=1370156&view=diff
==============================================================================
---
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/mycontent.jsp
(original)
+++
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/mycontent.jsp
Tue Aug 7 10:01:35 2012
@@ -0,0 +1,8 @@
+<%@ page language="java" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib uri="http://www.apache-rave.org/jsp/core" prefix="rave" %>
+
+<h3>mycontent</h3>
\ No newline at end of file
Modified:
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/myfooter.jsp
URL:
http://svn.apache.org/viewvc/rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/myfooter.jsp?rev=1370156&r1=1370155&r2=1370156&view=diff
==============================================================================
---
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/myfooter.jsp
(original)
+++
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/myfooter.jsp
Tue Aug 7 10:01:35 2012
@@ -0,0 +1,8 @@
+<%@ page language="java" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib uri="http://www.apache-rave.org/jsp/core" prefix="rave" %>
+
+<h2>myfooter</h2>
\ No newline at end of file
Modified:
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/myheader.jsp
URL:
http://svn.apache.org/viewvc/rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/myheader.jsp?rev=1370156&r1=1370155&r2=1370156&view=diff
==============================================================================
---
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/myheader.jsp
(original)
+++
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/myheader.jsp
Tue Aug 7 10:01:35 2012
@@ -0,0 +1,8 @@
+<%@ page language="java" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib uri="http://www.apache-rave.org/jsp/core" prefix="rave" %>
+
+<h2>myheader</h2>
\ No newline at end of file
Modified:
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/mymenu.jsp
URL:
http://svn.apache.org/viewvc/rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/mymenu.jsp?rev=1370156&r1=1370155&r2=1370156&view=diff
==============================================================================
---
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/mymenu.jsp
(original)
+++
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/jsp/hmvc/mymenu.jsp
Tue Aug 7 10:01:35 2012
@@ -0,0 +1,8 @@
+<%@ page language="java" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib uri="http://www.apache-rave.org/jsp/core" prefix="rave" %>
+
+<h3>mymenu</h3>
\ No newline at end of file
Modified:
rave/sandbox/content-services/rave-web-hmvc/src/main/java/org/apache/rave/portal/web/hmvc/servlet/HmvcDispatcherServlet.java
URL:
http://svn.apache.org/viewvc/rave/sandbox/content-services/rave-web-hmvc/src/main/java/org/apache/rave/portal/web/hmvc/servlet/HmvcDispatcherServlet.java?rev=1370156&r1=1370155&r2=1370156&view=diff
==============================================================================
---
rave/sandbox/content-services/rave-web-hmvc/src/main/java/org/apache/rave/portal/web/hmvc/servlet/HmvcDispatcherServlet.java
(original)
+++
rave/sandbox/content-services/rave-web-hmvc/src/main/java/org/apache/rave/portal/web/hmvc/servlet/HmvcDispatcherServlet.java
Tue Aug 7 10:01:35 2012
@@ -17,6 +17,7 @@
package org.apache.rave.portal.web.hmvc.servlet;
import java.util.LinkedHashMap;
+import java.util.Locale;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
@@ -27,6 +28,8 @@ import org.apache.rave.portal.web.hmvc.s
import org.apache.rave.portal.web.hmvc.support.HmvcServletResponse;
import org.springframework.web.servlet.DispatcherServlet;
import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.View;
+import org.springframework.web.servlet.view.InternalResourceView;
public class HmvcDispatcherServlet extends DispatcherServlet {
@@ -47,8 +50,22 @@ public class HmvcDispatcherServlet exten
ccvrMap.put(entry.getKey(),
servletResponse.getResponseHolder());
}
}
- HttpServletRequest servletRequest = new HmvcServletRequest(request);
- HttpServletResponse servletResponse = new
HmvcServletResponse(response);
- super.render(mv, servletRequest, servletResponse);
+ if (!mv.isReference()) {
+ setInternalResourceViewIncludeAlways(mv.getView());
+ }
+ super.render(mv, request, response);
+ }
+
+ protected View resolveViewName(String viewName, Map<String, Object> model,
Locale locale,
+ HttpServletRequest request) throws Exception {
+ View view = super.resolveViewName(viewName, model, locale, request);
+ setInternalResourceViewIncludeAlways(view);
+ return view;
+ }
+
+ protected void setInternalResourceViewIncludeAlways(View view) {
+ if (view != null && view instanceof InternalResourceView) {
+ ((InternalResourceView)view).setAlwaysInclude(true);
+ }
}
}