3 Replies Latest reply on Feb 23, 2007 11:29 AM by icpooreman

    beginner can't figure out how to change URL from home.seam

    icpooreman

      I'm looking at jboss seam and can't figure out something that is probably simple. I followed the steps to create a new project in eclipse we'll call helloworld for simplicity. So I open domain/helloworld/ in a web browser and I'm redirected to domain/helloworld/home.seam. My question is how do I change it from home.seam to a different URL.

      I see the redirect in
      view>>index.html it looks like
      <meta http-equiv="Refresh" content="0; URL=home.seam">
      but where does the request go from there? I can't seem to figure it out. I searched the project and there's no other mention of home.seam in any of the files, can you change the extension from .seam to .html and how would you do that?

        • 1. Re: beginner can't figure out how to change URL from home.se

          The default extension is set in web.xml. It's not a Seam thing, it's a JSF thing.

          • 2. Re: beginner can't figure out how to change URL from home.se
            fernando_jmt

            This is not a Seam stuff, but I'll give you some hints to figure out (maybe you should read more about JSF ).



            It depends what you have configured in your web.xml.

            By instance, if you are using facelets, you should have this:

             <context-param>
             <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
             <param-value>.xhtml</param-value>
             </context-param>
            


            Now, the Faces Servlet is configured to use *.seam whether you have this:

            <servlet-mapping>
             <servlet-name>Faces Servlet</servlet-name>
             <url-pattern>*.seam</url-pattern>
             </servlet-mapping>
            



            This means when you write a page like home.xhtml in your app. and in the browser you type: http://domain/helloworld/home.seam
            This will open the JSF managed view for home.xhtml.


            So, if you wanna change .seam to .html , you should change:

            <servlet-mapping>
             <servlet-name>Faces Servlet</servlet-name>
             <url-pattern>*.html</url-pattern>
             </servlet-mapping>
            


            Then all *.html extensions will call the respective .xhtml JSF managed view.

            HTH.

            • 3. Re: beginner can't figure out how to change URL from home.se
              icpooreman

              Thanks alot sorry about posting something off-topic I'm new to JSF as well.