4 Replies Latest reply on Dec 16, 2010 3:14 PM by augustsimonelli

    jsessionid getting inserted into url for css (weird)

    augustsimonelli

      Hi all,

       

      Just wondering id anyone has seen this kind of thing and could maybe give me some pointers of where to start looking.

       

      We have mod_cluster 1.0.4 -> jboss eap working fine. In the virtual there is:

       

      ProxyPass /context balancer://jbossbalancer/context stickysession=JSESSIONID|jsessionid nocanon

       

      The app deployed there (not written by me but i can talk to the devs) is deployed fine under /context. I hit the apache via the virtual (say, myhost.com/context/admin) and the app shows up BUT, on FIRST hit, the style sheets don't work. In apache i see:

       

      10.68.62.11 - - [16/Dec/2010:12:13:45 +1100] "GET /context/admin/ HTTP/1.1" 200 14399
      10.68.62.11 - - [16/Dec/2010:12:13:46 +1100] "GET /context/resources;jsessionid=6573B5204F674F287EDD98E9FEAB3B57.jbosshost:8009:jboss.web/js/jquery-1.4.4.min.js HTTP/1.1" 302 -
      10.68.62.11 - - [16/Dec/2010:12:13:46 +1100] "GET /context/resources;jsessionid=6573B5204F674F287EDD98E9FEAB3B57.jbosshost:8009:jboss.web/js/thickbox.js HTTP/1.1" 302 -
      10.68.62.11 - - [16/Dec/2010:12:13:46 +1100] "GET /context/resources;jsessionid=6573B5204F674F287EDD98E9FEAB3B57.jbosshost:8009:jboss.web/css/thickbox.css HTTP/1.1" 302 -
      10.68.62.11 - - [16/Dec/2010:12:13:46 +1100] "GET /context/resources;jsessionid=6573B5204F674F287EDD98E9FEAB3B57.jbosshost:8009:jboss.web/css/admin.css HTTP/1.1" 302 -
      10.68.62.11 - - [16/Dec/2010:12:13:46 +1100] "GET /context/resources/;jsessionid=6573B5204F674F287EDD98E9FEAB3B57.jbosshost:8009:jboss.web/js/jquery-1.4.4.min.js HTTP/1.1" 404 944
      10.68.62.11 - - [16/Dec/2010:12:13:46 +1100] "GET /context/resources/;jsessionid=6573B5204F674F287EDD98E9FEAB3B57.jbosshost:8009:jboss.web/js/thickbox.js HTTP/1.1" 404 944
      10.68.62.11 - - [16/Dec/2010:12:13:46 +1100] "GET /context/resources/;jsessionid=6573B5204F674F287EDD98E9FEAB3B57.jbosshost:8009:jboss.web/css/thickbox.css HTTP/1.1" 404 944
      10.68.62.11 - - [16/Dec/2010:12:13:46 +1100] "GET /context/resources/;jsessionid=6573B5204F674F287EDD98E9FEAB3B57.jbosshost:8009:jboss.web/css/admin.css HTTP/1.1" 404 944
      10.68.62.11 - - [16/Dec/2010:12:13:46 +1100] "GET /context/resources;jsessionid=6573B5204F674F287EDD98E9FEAB3B57.jbosshost:8009:jboss.web/js/thickbox.js HTTP/1.1" 302 -
      10.68.62.11 - - [16/Dec/2010:12:13:46 +1100] "GET /context/resources;jsessionid=6573B5204F674F287EDD98E9FEAB3B57.jbosshost:8009:jboss.web/css/admin.css HTTP/1.1" 302 -
      10.68.62.11 - - [16/Dec/2010:12:13:46 +1100] "GET /context/resources;jsessionid=6573B5204F674F287EDD98E9FEAB3B57.jbosshost:8009:jboss.web/css/thickbox.css HTTP/1.1" 302 -
      10.68.62.11 - - [16/Dec/2010:12:13:46 +1100] "GET /context/resources/;jsessionid=6573B5204F674F287EDD98E9FEAB3B57.jbosshost:8009:jboss.web/css/thickbox.css HTTP/1.1" 404 944

       

      Then on refresh it works ...

       

      Any thoughts? The page building the urls, when i do a view source in the browser, appears to be dynamic cause it has the css source as  /context/resources/;jsessionid=6573B5204F674F287EDD98E9FEAB3B57.jbosshost:8009:jboss.web/css/thickbox.css in the html. It's javascript i think. On refresh it has the right path.

       

      I know .. probably not  a mod_cluster thing but this seems the best group to ask.

       

      Thanks in advance,

       

      August

        • 1. Re: jsessionid getting inserted into url for css (weird)
          jfclere

          Could you try to connect directly to the jboss and see if you get the same?

          • 2. Re: jsessionid getting inserted into url for css (weird)
            pferraro

            I don't think your issue has anything to do with mod_cluster.  Rather the problem seems to be a bug in your jsp logic that generates the css urls.  If I were to take a blind stab, I would say that the logic is performing a response.encodeURL(...) on a portion of the css path.  Since the css files are not likely user specfic, there's no need to encode them at all.  If they are user specific, make sure to perform encodeURL(...) on the entire path, not just part of it.

            • 3. Re: jsessionid getting inserted into url for css (weird)
              augustsimonelli

              Jean-Frederic,

               

              Yeah i'm embarrassed to say i forgot to even check that Argh. Hitting the JBoss directly has the same result!

               

              Good lesson for me to work through all the pieces. Thanks for the quick help!

               

              August

              • 4. Re: jsessionid getting inserted into url for css (weird)
                augustsimonelli

                Paul,

                 

                Oooh, you've given some something to start googling and grepping about (i'm a sysadmin with "no clue" about java - but interested). As this doesn't relate to mod_cluster i won't expect this thread to continue, but of interest i see this in the code:

                 

                admin.jsp containing <link rel="stylesheet" type="text/css" href="${resourceUrl}/css/thickbox.css">

                 

                and resourceUrl being set with:

                 

                <spring:url var="resourceUrl" value="/resources" />

                 

                Thanks all for the help on this! I was pretty sure it wasnt' mod_cluster but as i'm pushing its use hard where i work i'm trying to eliminate it from any and all issues (so far so good!).

                 

                August