7 Replies Latest reply on Feb 26, 2008 1:09 AM by Todd Gould

    Redirected to non-existent debug.css

    Todd Gould Newbie

      Hello,


      Sorry for the beginner question, but I have been unable to find this documented in my searches to date...


      My environment is:


      JBoss AS 4.2.2.GA,
      Seam 2.0.1.GA,
      RichFaces 3.1.4.GA,
      MyFaces Tomahawk 1.1.6 and Sandbox 1.1.7


      My application uses JAAS Form based authentication (we must leverage the existing authentication infrastructure used by other apps in the complete system).  This authentication appears to be working just fine.


      However, upon successfull login, the user appears to be redirected/forwarded to a non-existsent (404 Error) debug.css url of the form of

      <context-root>/debug.css?conversationId=....

      rather than being forwarded to the application welcome-file.


      This debug.css is not part of our application and is not referenced directly from anywhere in our pages.  I'm not sure what is causing the problem?  Interestingly, a manual edit of the URL following this error to either the

      <context-root>

      or the welcome-file
      <context-root>/ index.xhtml

      produces the desired results without the 404 error.


      Based on the behavior, I suspect this may have something to do with the JAAS based form authentication (which is working just fine both for this and other apps), but I'm really not sure.  It's definately not seen in any of the other JAAS form based apps.  What is causing the redirect to debug.css?  What do I need to do or include to satisfy this dependency?


      Thanks in advance for your help.

        • 1. Re: Redirected to non-existent debug.css
          Kariem Hussein Newbie

          This is just a wild guess, but is it possible that you have configured the servlet mapping for faces in your web.xml to *.css?


          If an error occurs, and seam is in debug mode (<core:init debug="true" …), you are usually redirected to the debug page, which is by default debug.seam. With the url pattern *.css this would be debug.css.


          Other than that I would not know why this happened.

          • 2. Re: Redirected to non-existent debug.css
            Todd Gould Newbie

            I have found some further information on this mystery.


            My web.xml contains the following to enable the tomcat StreamingAddResource capabilities:


            <context-parm>
            
                <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
            
                <param-value>org.apache.myfaces.component.html.util.StreamingAddResource</param-value>
            
            </context-param>



            The documentation associated with this mentions to use the

            <t:document> tag in place of <html>

            and
            <t:documentHead> in place of <head>

            and
            <t:documentBody> in place of <body>

            in order to enable its functionality.


            The first two suggested replacements seem to be the source of the trouble.  Simply reverting to the use of a normal

            <html> and <head>

            tags seems to have removed the mysterious redirect to a non-existent URL.  Furthermore, the underlying problem appears to stem from the fact that the Tomahawk Extensions filter is producing this bad URL based upon an underlying NPE.  This bug is documented under TOMAHAWK-699 at http://issues.apache.org/jira/browse/TOMAHAWK-699 which specifically refers to the documentHead tag being the source of the NPE.


            I guess I'm a bit concerned that this has not been found by anyone else as I am under the impression that my technology stack is in very common use.  Has noone else seen this problem?  Is there a better fix than what I have found?  Could there be anything else wrong that would be making my application somehow unique enough to trigger this problem when everyone else does not appear to?


            Thanks for your thoughts and ideas.


            • 3. Re: Redirected to non-existent debug.css
              Todd Gould Newbie

              Thanks for the reply Kariem.


              It runs out that it was not a servlet mapping problem (see my earlier self-reply from today).


              I did, however, learn something about seam debug behavior via

              (<core:init debug="true" ...

                With the debug value set to true, the underlying exception was completely masked from the console output as well as my web.xml defined
              <error-page>

              .  Once I set this value to false, the
              <error-page>

              and console both showed me the underlying error and I was able to proceed from there.  Is this a know 'feature' of the seam debug behavior?  In this case (perhaps a truely exceptional one), it appears to have masked the problem, for whatit's worth.

              • 4. Re: Redirected to non-existent debug.css
                Pete Muir Master

                When using seam debug mode, it's expecting you to use the Seam debug page, not the servlet error page.

                • 5. Re: Redirected to non-existent debug.css
                  Todd Gould Newbie

                  Pete,


                  Outside of the

                  <core:init debug=true>

                  in components.xml and the
                  facelets.DEVELOPMENT = true

                  in the web.xml, is there anything else that I need to to to enable/configure the seam debug page?


                  I had both of the above set up to enable debug in my original configuration.  Do, if not, then it still appears that the underlying exception was being masked by the debug settings in this corner case?


                  The

                  <error-page>

                  is just there as a complete fallback as well as for some other non-seam pages that will ultimately end up in this app.


                  Thanks,


                  Todd

                  • 6. Re: Redirected to non-existent debug.css
                    Pete Muir Master

                    You need include jboss-seam-debug.jar in WEB-INF/lib.

                    • 7. Re: Redirected to non-existent debug.css
                      Todd Gould Newbie

                      Pete,


                      I have had WEB-INF/lib/jboss-seam-debug.jar in the app all along, so this does not appear to be the source of the trouble.


                      Thanks,


                      Todd