title: Can I make a struts based portlet remember its view when another portlet is used?
body: <p>I've written a fairly basic portlet using the struts portlet bridge and deployed it to liferay, navigation within my portlet seems fine, but whenever I click a link on another portlet in the portal my portlet reverts to the view action setup in my portlet.xml rather than re-rendering the existing state. What am I doing wrong?</p>
  
  <p>My <code>portlet.xml</code> is:</p>
  
  
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0"?&gt;
  
  &lt;portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"&gt;
    &lt;portlet&gt;
      &lt;portlet-name&gt;test&lt;/portlet-name&gt;
      &lt;display-name&gt;Test&lt;/display-name&gt;
      &lt;portlet-class&gt;com.perceptive.ctms.test.portlet.TestPortlet&lt;/portlet-class&gt;
  
      &lt;init-param&gt;
        &lt;name&gt;ServletContextProvider&lt;/name&gt;
        &lt;value&gt;com.liferay.util.bridges.struts.LiferayServletContextProviderWrapper&lt;/value&gt;
      &lt;/init-param&gt;
      &lt;init-param&gt;
        &lt;name&gt;StrutsPortletConfigLocation&lt;/name&gt;
        &lt;value&gt;/WEB-INF/struts-portlet-config.xml&lt;/value&gt;
      &lt;/init-param&gt;
      &lt;init-param&gt;
        &lt;name&gt;HelpPage&lt;/name&gt;
        &lt;value&gt;/portlet_action/test/help&lt;/value&gt;
      &lt;/init-param&gt;
      &lt;init-param&gt;
        &lt;name&gt;ViewPage&lt;/name&gt;
        &lt;value&gt;/portlet_action/test/start&lt;/value&gt;
      &lt;/init-param&gt;
      &lt;init-param&gt;
        &lt;name&gt;EditPage&lt;/name&gt;
        &lt;value&gt;/portlet_action/test/preferences&lt;/value&gt;
      &lt;/init-param&gt;
  
      &lt;expiration-cache&gt;0&lt;/expiration-cache&gt;
      &lt;supports&gt;
        &lt;mime-type&gt;text/html&lt;/mime-type&gt;
        &lt;portlet-mode&gt;view&lt;/portlet-mode&gt;
        &lt;portlet-mode&gt;edit&lt;/portlet-mode&gt;
        &lt;portlet-mode&gt;help&lt;/portlet-mode&gt;
      &lt;/supports&gt;
      &lt;portlet-info&gt;
        &lt;title&gt;Test&lt;/title&gt;
        &lt;short-title&gt;Test&lt;/short-title&gt;
        &lt;keywords&gt;Test&lt;/keywords&gt;
      &lt;/portlet-info&gt;
    &lt;/portlet&gt;
  
    &lt;filter&gt;
      &lt;filter-name&gt;AuthenticationFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;com.perceptive.ctms.framework.portlet.filter.AuthenticationFilter&lt;/filter-class&gt;
      &lt;lifecycle&gt;RENDER_PHASE&lt;/lifecycle&gt;
      &lt;lifecycle&gt;ACTION_PHASE&lt;/lifecycle&gt;
    &lt;/filter&gt;
  
    &lt;filter-mapping&gt;
      &lt;filter-name&gt;AuthenticationFilter&lt;/filter-name&gt;
      &lt;portlet-name&gt;test&lt;/portlet-name&gt;
    &lt;/filter-mapping&gt;
  &lt;/portlet-app&gt;
  </code></pre>
  
  <p>and <code>struts-portlet-config.xml</code> is:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;config&gt;
    &lt;render-context&gt;
      &lt;attribute name="errors"/&gt;
      &lt;attribute name="message" keep="true"/&gt;
      &lt;attribute prefix="com.perceptive" keep="true"/&gt;
    &lt;/render-context&gt;
    &lt;portlet-url-type default="render"&gt;
      &lt;render path="/test/help.do"/&gt;
      &lt;render path="/test/start.do"/&gt;
      &lt;render path="/test/preferences.do"/&gt;
      &lt;render path="/test/tableTest.do"/&gt;
      &lt;render path="/test/displayTagTest.do"/&gt;
      &lt;render path="/test/lookupTest.do"/&gt;
      &lt;render path="/test/lookupTestSave.do"/&gt;
    &lt;/portlet-url-type&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p>PS I've already asked this on the liferay forums, but am asking here as well in the hope of a quick answer.</p>