Eric, I have the same problem. However, using the RegexpHTMLParser doesn't solve my
problem. My Javascript has a sample code of the following:
newCalDoc.write("<link rel=stylesheet type='text/css' href='" +
PCGetDefaultCSSStylesheet() + "'>\n");
And when running the test, it is trying to retrieve
GET http://localhost/arsys/apps/shared/javascript/" + PCGetDefaultCSSStylesheet() + "
Using JTidyHTMLParser only follows css embedded links in html but doesn't even
recognize embedding javascript files. It basically ignores and does not retrieve the
Javascript files, which isn't what I want. I want it to retrieve Javascript files but
not parse them.
Would it be possible to add other HTML parser jar files? Can we simply drop it in the
lib directory and reference it in jmeter.properties?
thanks,
mabel
"Mcintyre, Eric" <[EMAIL PROTECTED]> wrote:
The RegexpHTMLParser seems to do the trick. Thanks!
-----Original Message-----
From: BAZLEY, Sebastian [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 27, 2004 8:24 AM
To: 'JMeter Users List'
Subject: RE: Embedded JavaScript files are being parsed as HTML
First try using a different Parser - see htmlParser.className in
jmeter.properties - as one of the others may be better at handling the
context in which
is recognised.
The regex parser is fast, but does not take much notice of context.
The classnames are shown in the property file, if you want to look at the
code
S.
-----Original Message-----
From: Mcintyre, Eric [mailto:[EMAIL PROTECTED]
Sent: 27 May 2004 15:16
To: JMeter User Mailing List (E-mail)
Subject: Embedded JavaScript files are being parsed as HTML
Hello,
I am running an HTTP test script, where I have the HTTP Samplers loading
embedded resources. On some pages, one of the linked JavaScript files has a
function to output an HTML page. It appears that JMeter is parsing this code
as if it is HTML and following the embedded "links". The offending
JavaScript looks like this:
function writePleaseWaitMessage(doc, nextUrl)
{
doc.open();
doc.writeln("");
doc.writeln("");
doc.writeln("");
doc.writeln("
href=\"/styles/RedFlagStyles.css\">");
doc.writeln("
href=\"/styles/tenetstyles.css\">");
doc.writeln("");
doc.writeln("onLoad=\"javascript:window.location='", nextUrl, "'\">");
// ... and so on
}
The rather strange result in JMeter (Results Tree) is:
+- Root
|- /jsp/logon.jsp
|- (other links from /jsp/logon.jsp)
+- http://localhost/javascript/redflag.js
(200)
| |- http://localhost/javascript/redflag.js
(200)
| +- http://localhost/javascript/\->http://localhost/javascript/\/
(404)
| |- http://localhost/javascript/\
(302)
| |- http://localhost/javascript/\/
(404)
|- (more links from /jsp/logon.jsp)
When I remove the lines in the JS function that output
tags,
everything works as expected. Apparently the HTML parsing code sees "href=\"
and tries to follow it. The correct behavior, though, would be for the
parser to ignore it, since the resource has a MIME type of
application/x-javascript. Is this a known issue, or should I create a
Bugzilla report? Also, if someone can point me to a likely place in the
code, I'll investigate it and try to fix it.
Thanks,
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
___________________________________________________________________________
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail in
error, please notify the sender immediately and destroy it. As its integrity
cannot be secured on the Internet, the Atos Origin group liability cannot be
triggered for the message content. Although the sender endeavours to maintain
a computer virus-free network, the sender does not warrant that this
transmission is virus-free and will not be liable for any damages resulting
from any virus transmitted.
___________________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger