2 Replies Latest reply on Aug 16, 2010 5:29 AM by Cato Eik

    Spring 3 Portlet in GateIn 3.1 problem

    Cato Eik Newbie

      I'm trying to get some portlets up and running on GateIn 3.1 on JBoss AS (that is working fine on GateIn 3.1 on Tomcat).

      When opening page with portlet(s), I get a message saying: "The requested resource (/SpringPortletPOC-0.0.1-SNAPSHOT/WEB-INF/servlet/view/classic/home/search) is not available"

       

      Why does this work on Tomcat but not JBoss AS?

      Why can't I access my portlets?

      Any help is appreciated.

       

      web.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
          <context-param>
              <param-name>log4jConfigLocation</param-name>
              <param-value>/WEB-INF/classes/locale/portlet/custom/log4j.properties</param-value>
          </context-param>
          <context-param>
              <param-name>contextConfigLocation</param-name>
              <param-value>/WEB-INF/applicationContext.xml</param-value>
          </context-param>

       

          <listener>
              <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
          </listener>

       

          <servlet>
              <servlet-name>ViewRendererServlet</servlet-name>
              <servlet-class>org.springframework.web.servlet.ViewRendererServlet</servlet-class>
              <load-on-startup>1</load-on-startup>
          </servlet>
          <!--  -->
          <servlet-mapping>
              <servlet-name>ViewRendererServlet</servlet-name>
              <url-pattern>/WEB-INF/servlet/view</url-pattern>
          </servlet-mapping>

      </web-app>

       

      portlet.xml

      <?xml version="1.0" encoding="UTF-8"?>

       

      <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
              http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0">
          <portlet>
              <portlet-name>search</portlet-name>
              <display-name>Search Portlet</display-name>
              <portlet-class>org.springframework.web.portlet.DispatcherPortlet</portlet-class>
              <init-param>
                  <name>contextConfigLocation</name>
                  <value>/WEB-INF/search-portlet.xml</value>
              </init-param>
              <supports>
                  <mime-type>text/html</mime-type>
                  <portlet-mode>view</portlet-mode>
              </supports>
              <resource-bundle>locale.portlet.custom.SpringPortletPOC</resource-bundle>
              <portlet-info>
                  <title>Search Portlet</title>
                  <short-title>Search Portlet</short-title>
              </portlet-info>
              <supported-publishing-event>
                  <qname>MatrikkelSearch</qname>
              </supported-publishing-event>
          </portlet>
         
          <portlet>
              <portlet-name>productlist</portlet-name>
              <display-name>Product List Portlet</display-name>
              <portlet-class>org.springframework.web.portlet.DispatcherPortlet</portlet-class>
              <init-param>
                  <name>contextConfigLocation</name>
                  <value>/WEB-INF/productlist-portlet.xml</value>
              </init-param>
              <supports>
                  <mime-type>text/html</mime-type>
                  <portlet-mode>view</portlet-mode>
              </supports>
              <resource-bundle>locale.portlet.custom.SpringPortletPOC</resource-bundle>
              <portlet-info>
                  <title>Product List Portlet</title>
                  <short-title>Product List Portlet</short-title>
              </portlet-info>
              <supported-processing-event>
                  <qname>MatrikkelSearch</qname>
              </supported-processing-event>
              <supported-public-render-parameter>productDetailsCode</supported-public-render-parameter>
          </portlet>
         
          <portlet>
              <portlet-name>productdetails</portlet-name>
              <display-name>Product Details Portlet</display-name>
              <portlet-class>org.springframework.web.portlet.DispatcherPortlet</portlet-class>
              <init-param>
                  <name>contextConfigLocation</name>
                  <value>/WEB-INF/productdetails-portlet.xml</value>
              </init-param>
              <supports>
                  <mime-type>text/html</mime-type>
                  <portlet-mode>view</portlet-mode>
              </supports>
              <resource-bundle>locale.portlet.custom.SpringPortletPOC</resource-bundle>
              <portlet-info>
                  <title>Product Details Portlet</title>
                  <short-title>Product Details Portlet</short-title>
              </portlet-info>
              <supported-public-render-parameter>productDetailsCode</supported-public-render-parameter>
          </portlet>

       

          <event-definition>
              <!--<qname xmlns:x="http://eiendomsinfo.no/portlets/ns">x:MatrikkelSearch</qname>-->
              <qname>MatrikkelSearch</qname>
              <value-type>no.eiendomsinfo.il.web.prototype.command.SearchData</value-type>
          </event-definition>
         
          <public-render-parameter>
              <identifier>productDetailsCode</identifier>
              <qname>ProductDetailsProdCode</qname>
          </public-render-parameter>

       

      </portlet-app>