0 Replies Latest reply on Jan 14, 2011 9:25 AM by shwetank sharma

    Web Remoting is not running properly

    shwetank sharma Newbie

      Click HELP for text formatting instructions. Then edit this text and check the preview.


      Hi All,


      I m implementing web remoting in SEAM 2.0.2 CR1
      Some Time web remoting is running and some time when i just restart JBOSS then web remoting is also stop.



      <ui:define name="body">     
            
                     <s:remote include="manageRole" />               
                     
      
                     <script type='text/javascript' src='../js/timeSlots.js'></script>
      
                     <script language="javascript"> 
                      function sayHelloWk() {
                      Seam.Remoting.setDebug(true);            
                      
                         var name = prompt("What is your name?");
                         Seam.Component.getInstance("manageRole").sayHello(name, sayHelloCallback);
                            }
                            
                            function sayHelloCallback(result) {
                         alert(result);
                            }
                     
                     </script>
      <button onclick="javascript:sayHelloWk()">
                          Say Hello
                     </button>
      
      </ui:define>
      </ui:composition>
      
      


      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>
           
           
                <!-- Seam Remoting -->
           <servlet>
                <servlet-name>Seam Remoting</servlet-name>
                <servlet-class>
                     org.jboss.seam.remoting.SeamRemotingServlet
                </servlet-class>
           </servlet>
      
           <servlet-mapping>
                <servlet-name>Seam Remoting</servlet-name>
                <url-pattern>/seam/remoting/*</url-pattern>
           </servlet-mapping>
      
      </web-app>
      
      


      THANK YOU SO MUCH IN ADVANCE