2 Replies Latest reply on Feb 26, 2008 9:37 AM by jeff liu

    org.jboss.seam.servlet.SeamFilter Issue

    jeff liu Newbie

      Hi all


      When I try to plug some 3rd part servlet, I encounter the following issue:




      1. 1. I access the url ex: localhost:8080/seam/myservlet.jeff

      2. 2. The response is blank without any html tag.




      If i comment out the SeamFilter, it works fine.


      Is there any setting i should take care?


      Thank you very much !

        • 1. Re: org.jboss.seam.servlet.SeamFilter Issue
          Nicklas Karlsson Master

          Are you mapping the seam servlet to .jeff also?

          • 2. Re: org.jboss.seam.servlet.SeamFilter Issue
            jeff liu Newbie

            Hi I am newbie at seam


            Following is my web.xml


            <?xml version="1.0" ?>
            <web-app 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" 
                     version="2.5">
            
                <!-- Ajax4jsf -->
                
                <context-param>
                    <param-name>org.richfaces.SKIN</param-name>
                    <param-value>blueSky</param-value>
                </context-param>
             
               <!-- Seam   -->
                
               <listener>
                  <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
               </listener>
                <!-- 
                <filter>
                    <filter-name>Seam Filter</filter-name>
                    <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
                </filter>
            
                <filter-mapping>
                    <filter-name>Seam Filter</filter-name>
                    <url-pattern>/*</url-pattern>
                </filter-mapping>
                     -->
               <servlet>
                  <servlet-name>Seam Resource Servlet</servlet-name>
                  <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
               </servlet>
                
               <servlet-mapping>
                  <servlet-name>Seam Resource Servlet</servlet-name>
                  <url-pattern>/seam/resource/*</url-pattern>
               </servlet-mapping>
             
               <!-- Facelets development mode (disable in production) 
               
               <context-param>
                  <param-name>facelets.DEVELOPMENT</param-name>
                  <param-value>true</param-value>
               </context-param>
                -->
               <!-- JSF -->
                   
               <context-param>
                  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                  <param-value>.xhtml</param-value>
               </context-param>
            
               <servlet>
                  <servlet-name>Faces Servlet</servlet-name>
                  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                  <load-on-startup>1</load-on-startup>
               </servlet>
                
               <servlet-mapping>
                  <servlet-name>Faces Servlet</servlet-name>
                  <url-pattern>*.seam</url-pattern>
               </servlet-mapping>
               <!--    
               <security-constraint> 
                   <display-name>Restrict raw XHTML Documents</display-name>
                   <web-resource-collection>
                       <web-resource-name>XHTML</web-resource-name>
                       <url-pattern>*.xhtml</url-pattern>
                   </web-resource-collection>
                   <auth-constraint/>
               </security-constraint>
                -->   
               <!-- ZK Configuration-->
                 <listener>
                      <description>
                           Used to cleanup when a session is destroyed
                      </description>
                      <display-name>ZK Session Cleaner</display-name>
                      <listener-class>
                           org.zkoss.zk.ui.http.HttpSessionListener
                      </listener-class>
                 </listener>
                 <servlet>
                      <description>ZK loader for ZUML pages</description>
                      <servlet-name>zkLoader</servlet-name>
                      <servlet-class>
                           org.zkoss.zk.ui.http.DHtmlLayoutServlet
                      </servlet-class>
                      <!-- Must. Specifies URI of the update engine (DHtmlUpdateServlet).
                           It must be the same as <url-pattern> for the update engine.
                      -->
                      <init-param>
                           <param-name>update-uri</param-name>
                           <param-value>/zkau</param-value>
                      </init-param>
                      <!-- Optional. Specifies the default log level: OFF, ERROR, WARNING,
                           INFO, DEBUG and FINER. If not specified, the system default is used.
                           <init-param>
                           <param-name>log-level</param-name>
                           <param-value>OFF</param-value>
                           </init-param>
                      -->
                      <load-on-startup>1</load-on-startup><!-- Must -->
                 </servlet>
                 <servlet-mapping>
                      <servlet-name>zkLoader</servlet-name>
                      <url-pattern>*.zul</url-pattern>
                 </servlet-mapping>
                 <servlet-mapping>
                      <servlet-name>zkLoader</servlet-name>
                      <url-pattern>*.zhtml</url-pattern>
                 </servlet-mapping>
                 <servlet-mapping>
                      <servlet-name>zkLoader</servlet-name>
                      <url-pattern>*.zuml</url-pattern>
                 </servlet-mapping>
            
                 <!-- Optional. Uncomment it if you want to use richlets.
                 -->
                 <servlet-mapping>
                      <servlet-name>zkLoader</servlet-name>
                      <url-pattern>/zk/*</url-pattern>
                 </servlet-mapping>
            
                 <servlet>
                      <description>The asynchronous update engine for ZK</description>
                      <servlet-name>auEngine</servlet-name>
                      <servlet-class>
                           org.zkoss.zk.au.http.DHtmlUpdateServlet
                      </servlet-class>
                 </servlet>
                 <servlet-mapping>
                      <servlet-name>auEngine</servlet-name>
                      <url-pattern>/zkau/*</url-pattern>
                 </servlet-mapping>
               
               
            </web-app>
            



            How come I tell that the .zul is mapped to seam servlet?
            Also, I tried this in seam 1.2, it works.


            Thank you very much