3 Replies Latest reply on Feb 4, 2007 7:15 PM by fernando_jmt

    Browsing application context path always redirect "home.seam

    fernando_jmt

      Hi everybody.

      I have a very strange behaviour that I don't know if it is a bug or I'm misunderstanding something.

      The scenario is:

      1.- In the web.xml I've configured this:


      ...
      <context-param>
       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
       <param-value>.xhtml</param-value>
       </context-param>
      ....
      <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.jsf</url-pattern>
      </servlet-mapping>
      ....
       <welcome-file-list>
       <welcome-file>index.html</welcome-file>
       </welcome-file-list>
      
      


      2.- My index.html file contents:
      <html>
      <head>
       <meta http-equiv="Refresh" content="0; URL=login.jsf">
      </head>
      </html>
      


      3.- Because I'm using facelets I have the login.xhtml with the respective login form.


      Well, after I deploy the application (context path is "app") I tried this in the browser:
      http://localhost:8080/app/
      When I did this I get an HTTP 404 error saying me that the app/home.seam is not available.

      But, what I suppose I should get is the login.jsf page instead the above error.
      Then when I type this in the browser:
      http://localhost:8080/app/index.html all works fine, the login.jsf is loaded successful.

      -Someone knows why the home.seam is always called in this scenario ?
      - is it hard coded?
      - is there any way in order to configure it?



      Any help will be appreciated.


      Thanks in advance.









        • 1. Re: Browsing application context path always redirect

          things you can try:

          (1) search your entire project for the key words "home.jsf" or "home.xhtml"

          (2) try removing or commenting <welcome-file-list>

          • 2. Re: Browsing application context path always redirect

            Try inspecting the actual HTTP request. What is coming back? Is the HTML coming back as you expect? If it isn't, check that your updated application is deployed correctly. (you might even clean out the tomcat cache in server/default/work)

            • 3. Re: Browsing application context path always redirect
              fernando_jmt

              After I tried all things you comment here, I was geeting the same error.

              But, 4 hours later I tried to enter the same URL using Internet Explorer. And it works like a charm.
              Then I understood that the problem was the FireFox cache. Because the first time I deployed the application index.html redirects to home.seam, and I accessed with FireFox, I think FF caches it, then when I change the index.html in order to redirect to login.jsf even cleaning tomcat directories FF was always returning the first cached index.html (even refreshing the browser F5).

              So, I clean the FF cache and it is working well.

              Thanks for the help.


              Best regards.