Problem in downloading js files specified in our webpages

Discussion in 'Java' started by Venkatesh, Mar 1, 2007.

  1. Venkatesh

    Venkatesh Guest

    Hi All,

    We have a retail site hosted on one of our servers. The context path
    of site is /retail, and the main servlet for us is dispatch.do. So
    basically our site URL is of the form http://www.host.com/retail/dispatch.do.
    This will take the visitor to main page of the site. One can also jump
    to an arbitrary page in our site by supplying additional query
    parameters in the URL directly. Some thing like
    http://www.host.com/retail/dispatch.do?currentState=Options&st=....
    where st is a symbolic state token that we'll be processing
    internally. Thus, the resulting page rendered after processing request
    parameters need not be the main page of the site. This is working
    perfect in our testing environment, but on production site we are
    facing one weired issue:

    Our html pages have reference to javascript files in the form of
    <script language="JavaScript" src="js/vehicleimage.js"></script>. and
    strangely for some visitors (~5%), these javascript files are getting
    downloaded using a GET request of the form shown below:

    GET /retail/dispatch.do?
    &foldedTablesList=&st=1%7C4B7E4F04905B0110DF8C500FE0190000%7C1172018077588%7C18%7CChevrolet
    %2499502%7Cfalse%24false%7Cfalse%7Cfalse%7Ctrue%7C2007uva_in
    %7Cexi4.07%7C%7Ek8/js/vehicleimage.js

    The above GET request is present in our apache logs. As a result of
    above, our servlet is getting executed while downloading javascript
    file.

    More stranger is the fact that the above URL is malformed and request
    parameters present in above URL are incomplete, and hence our servlet
    is throwing exceptions during it's execution.

    Does anybody have an idea as to why this is happening?

    Also, when we put references to javascript files in the form <script
    language="JavaScript" src="js/vehicleimage.js"></script>, doesn't it
    get translated to http://www.host.com/retail/js/vehicleimage.js ???

    Thank you,
    Venkatesh
    Venkatesh, Mar 1, 2007
    #1
    1. Advertising

  2. On Mar 1, 9:29 pm, "Venkatesh" <> wrote:
    ...
    > ...Thus, the resulting page rendered after processing request
    > parameters need not be the main page of the site. This is working
    > perfect in our testing environment,


    Using which browser?

    >..but on production site we are
    > facing one weired issue:
    >
    > Our html pages have reference to javascript files in the form of
    > <script language="JavaScript" src="js/vehicleimage.js"></script>. and


    It might pay to validate your HTML.
    <http://validator.w3.org/>

    Andrew T.
    Andrew Thompson, Mar 1, 2007
    #2
    1. Advertising

  3. Venkatesh

    Venkatesh Guest

    >
    > > ...Thus, the resulting page rendered after processing request
    > > parameters need not be the main page of the site. This is working
    > > perfect in our testing environment,

    >
    > Using which browser?


    We do manual testing using IE 6, 7 and Firefox 2

    Automated testing is done using Canoo webtest

    >
    > >..but on production site we are
    > > facing one weired issue:

    >
    > > Our html pages have reference to javascript files in the form of
    > > <script language="JavaScript" src="js/vehicleimage.js"></script>. and

    >
    > It might pay to validate your HTML.
    > <http://validator.w3.org/>


    Did a quick validation of one of our pages by hitting through
    http://validator.w3.org .. I'm getting nearly 40 - 45 errors. The
    errors pointed out are as follows:

    1. no document type declaration; implying "<!DOCTYPE HTML SYSTEM>"
    2. <link rel="stylesheet" href="/data/brand/chevrolet/css/
    chevrolet.css"/> - document type does not allow element "LINK" here .
    - 3 errors

    3. <script language="JavaScript" src="js/jsobj.js"></script> -
    Required attribute - "type" is missing - for all declarations of
    javascript files

    4. <script language="JavaScript"> - Required attribute - "type" is
    missing.
    <img src="/data/brand/chevrolet/img/footer.gif" border=0> - Missing
    alt 23 errors

    These are the errors for one of our page. But is there any
    relationship b/w these errors and the problem we are facing?

    >
    > Andrew T.
    Venkatesh, Mar 1, 2007
    #3
  4. Venkatesh

    Sem Guest

    On Mar 1, 1:17 pm, "Venkatesh" <> wrote:
    > > > ...Thus, the resulting page rendered after processing request
    > > > parameters need not be the main page of the site. This is working
    > > > perfect in our testing environment,

    >
    > > Using which browser?

    >
    > We do manual testing using IE 6, 7 and Firefox 2
    >
    > Automated testing is done using Canoo webtest
    >
    >
    >
    > > >..but on production site we are
    > > > facing one weired issue:

    >
    > > > Our html pages have reference to javascript files in the form of
    > > > <script language="JavaScript" src="js/vehicleimage.js"></script>. and

    >
    > > It might pay to validate your HTML.
    > > <http://validator.w3.org/>

    >
    > Did a quick validation of one of our pages by hitting throughhttp://validator.w3.org.. I'm getting nearly 40 - 45 errors. The
    > errors pointed out are as follows:
    >
    > 1. no document type declaration; implying "<!DOCTYPE HTML SYSTEM>"
    > 2. <link rel="stylesheet" href="/data/brand/chevrolet/css/
    > chevrolet.css"/> - document type does not allow element "LINK" here .
    > - 3 errors
    >
    > 3. <script language="JavaScript" src="js/jsobj.js"></script> -
    > Required attribute - "type" is missing - for all declarations of
    > javascript files
    >
    > 4. <script language="JavaScript"> - Required attribute - "type" is
    > missing.
    > <img src="/data/brand/chevrolet/img/footer.gif" border=0> - Missing
    > alt 23 errors
    >
    > These are the errors for one of our page. But is there any
    > relationship b/w these errors and the problem we are facing?
    >
    >
    >
    >
    >
    > > Andrew T.- Hide quoted text -

    >
    > - Show quoted text -


    since you mentioned on
    form http://www.host.com/retail/dispatch.do.

    It means you use Struts then you have to check your struts-config.xml
    file and your
    Action class.

    Also see the form file that is used by the action class

    Unless I see the whole program, it is very hard to pinpoint the
    problem.

    -Sem
    Sem, Mar 1, 2007
    #4
  5. On Mar 2, 5:17 am, "Venkatesh" <> wrote:
    ...
    > These are the errors for one of our page. But is there any
    > relationship b/w these errors and the problem we are facing?


    Then best way to find out, is to remove
    them and try the page again.

    Andrew T.
    Andrew Thompson, Mar 1, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Deshaies
    Replies:
    8
    Views:
    488
    Roedy Green
    Apr 26, 2004
  2. Learner
    Replies:
    3
    Views:
    3,879
    venkatmath
    Jul 12, 2008
  3. ab
    Replies:
    2
    Views:
    285
    Roedy Green
    Jul 24, 2007
  4. TimB
    Replies:
    1
    Views:
    161
  5. PuZzLeD
    Replies:
    1
    Views:
    89
    Ben Morrow
    May 19, 2004
Loading...

Share This Page