3 Replies Latest reply on Jun 29, 2008 6:33 PM by admin.admin.email.tld

    How Does Seam resolve URL's ?

    johnc5

      Take for instance this URL:


      http://localhost:8080/someapp/page.seam


      How does this get resolved? Does seem look for page.xhtml?
      What if I have page.xhtml, page.html, page.jspf in the same directory. Which one will it open? Is there an order it searches?


      Secondly if I have a stateless session EJB with seam name someaction. What URL will hit this action directly.
      Is it:
      http://localhost:8080/someapp/someaction.seam ?


      John.

        • 1. Re: How Does Seam resolve URL's ?
          amitev

          *.seam is resolved by the Faces Servlet. Then Facelets is looking for a view with suffix javax.faces.DEFAULT_SUFFIX (.xhtml).
          You can't hit url directly unless you exactly specify an onpageload action.

          • 2. Re: How Does Seam resolve URL's ?
            johnc5

            Thanks. So is it possible to hit a seam session EJB bean using a browser URL ?


            John.

            • 3. Re: How Does Seam resolve URL's ?
              admin.admin.email.tld

              What he was referring to was most likely a JSF EL call like such:


              event="onpageload" action="#{fooAction.fooMethod}"



              in a a4j:support tag perhaps.


              or using Seam Remoting JS function to call a EJB method exposed using @WebRemote.


              or maybe it's possible to configure this in the pages.xml??


              In what use case would you need to hit an EJB method on a GET request from URL directly?


              Typically, a EJB method execution, whether it's a SFSB or SLSB, is a result of a UI use case execution (e.g. enter fields in a form, click submit, etc.)