Problem in downloading js files specified in our webpages

V

Venkatesh

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
 
A

Andrew Thompson

...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.
 
V

Venkatesh

Using which browser?

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

Automated testing is done using Canoo webtest
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?
 
S

Sem

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

Automated testing is done using Canoo webtest





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?






- 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
 
A

Andrew Thompson

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top