I'm writing a Cernunnos portlet that is in it's own context (war
file). I have the simplest scripts in the actions/ and views/
directories. The one in the actions directory is like this:
<!--
| doSimple.crn
+-->
<with>
<attribute key="webapps">${groovy
(WebAttributes.REQUEST.getPortletSession().getPortletContext
().getRealPath('/'))}</attribute>
<subtasks>
<groovy>
<script>
WebAttributes.RESPONSE.setRenderParameter('myresult', 'SUCCESS'); //
Assume until we know otherwise
</script>
<subtasks>
<log logger-name="doDeploy" level="debug">yay!</log>
</subtasks>
</groovy>
</subtasks>
</with>
The view looks like this:
<!--
| simple.crn
+-->
<request-dispatcher resource="/WEB-INF/jsp/SimplePortlet/simple.jsp"/>
And the JSP:
<%@ taglib prefix="c" uri="
http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="portlet" uri="
http://java.sun.com/portlet"%>
<portlet:defineObjects/>
<form method="POST" action="<portlet:actionURL><portlet:param
name="action" value="doDeploy"/><portlet:param name="view"
value="deploy"/></portlet:actionURL>">
<input type="submit" value="Do Something Simple"/>
</form>
<c:if test="${myresult != null}">
<p>result: <c:out value="${myresult}"/></p>
</c:if>
There is a spring context file (SimplePortlet-Portlet.xml) and it
looks like this:
<beans>
<bean id="settings" class="java.util.HashMap">
<constructor-arg>
<map>
<entry key="CernunnosPortlet.ACTION_PREFIX"><value>/
WEB-INF/actions/SimplePortlet/</value></entry>
<entry key="CernunnosPortlet.VIEW_PREFIX"><value>/WEB-
INF/views/SimplePortlet/</value></entry>
<entry
key="CernunnosPortlet.DEFAULT_VIEW"><value>simple</value></entry>
</map>
</constructor-arg>
</bean>
</beans>
Now, when I deploy this to uPortal running on my workstation, the JSP
renders just fine. But when I click the button, I expect to see
SUCCESS, but I don't see anything. Any suggestions?