0 Replies Latest reply on Oct 11, 2009 3:12 AM by Greg Zoller

    Seam Remoting and Apache

    Greg Zoller Newbie


      I'm trying to take my Seam remoting to the next level.  I can get a simple remote service working with everything served from JBoss.

      Now I'd like to be able to serve the html from apache and have it call the Seam app running on JBoss as before.  (The search service called is trivial and merely echos some text back to the caller.)

      Here's my HTML:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <script src="http://localhost:8080/hah/js/jquery-1.3.1.js"></script>
                <script src="http://localhost:8080/hah/seam/resource/remoting/resource/remote.js"></script>
                <script src="http://localhost:8080/hah/seam/resource/remoting/interface.js?store"></script>
                <script language="javascript">
                     jQuery(function() {
                     var search = function() {
                          alert("Calling search...");
                          Seam.Component.getInstance("store").search("Foo", searchResults);
                          alert("Back from search.");
                     function searchResults(result) {
                          alert("Seam says>>> "+result);

      The call does not complete successfully as it did when the html was served by JBoss.  There was a POST error:

      <title>404 Not Found</title>
      <h1>Not Found</h1>
      <p>The requested URL /hah/seam/resource/remoting/execute was not found on this server.</p>

      Just guessing but it may be that this file is referenced inside the server-generated js files and these files got generated with relative urls, which is causing the trouble.

      Has anyone been successful separating the html content from the Seam ear/war file and having remoting work?

      Thanks in advance,