Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can also use the resource bundle instead of the xml files. This worked for me.</p> <p>For that you would need to contain a bundle file <code>any_name.properties</code> file having your views declared as below, e.g.</p> <p>I have the following portlet jsp files</p> <p><em>WEB-INF/jsp/flight/bookingForm.jsp <br> WEB-INF/jsp/flight/bookingSuccess.jsp<br> WEB-INF/jsp/appError.jsp</em></p> <p>Contents of <strong>any_name.properties</strong> file are as below. Please observe that the view names are followed by <code>.(class)</code> and <code>.url</code> in the declaration.</p> <hr> <pre><code>bookingForm.(class)=org.springframework.web.servlet.view.JstlView bookingForm.url=/WEB-INF/jsp/flight/bookingForm.jsp bookingSuccess.(class)=org.springframework.web.servlet.view.JstlView bookingSuccess.url=/WEB-INF/jsp/flight/bookingSuccess.jsp </code></pre> <hr> <p>This any_name.properties bundle has to be integrated in your <em>appView-portlet.xml</em> configuration file (assuming you have <strong>appView</strong> portlet declared in your portlet.xml).</p> <p><strong>If you have placed the any_name.properties in the <em>com.module.views</em> package</strong>, then you would need to configure as below.</p> <pre><code>&lt;!-- View Resolver --&gt; &lt;bean class="org.springframework.web.servlet.view.ResourceBundleViewResolver"&gt; &lt;property name="basenames"&gt; &lt;list&gt; &lt;value&gt;com.module.views.any_name&lt;/value&gt; &lt;/list&gt; &lt;/property&gt; &lt;/bean&gt; </code></pre> <p>For the appError.jsp, you can have the default view resolver, if any, declared in your applicationContext.xml file.</p> <pre><code>&lt;!-- Default View Resolver --&gt; &lt;bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt; &lt;property name="cache" value="true"/&gt; &lt;property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/&gt; &lt;property name="prefix" value="/WEB-INF/jsp/"/&gt; &lt;property name="suffix" value=".jsp"/&gt; &lt;/bean&gt; </code></pre> <p>Hope it helps.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload