From: Sue Yi <su...@gm...> - 2005-08-11 13:44:39
|
Hello, I am using HtmlUnit to test an application which contains redirects. In the application there is a redirect to "'/a/b/..\BIN\c.ASP" (URI changed for privacy) -- I get a IllegalArgumentException "escaped absolute path not valid". Is this because all URI's needed to be absolute, or is it because there are both "\" and "/" in the URI? Can anyone suggest how I could solve this problem? Thank you, Sue java.lang.IllegalArgumentException: Invalid uri '/a/b/..\BIN\c.ASP': escaped absolute path not valid =09at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.ja= va:219) =09at org.apache.commons.httpclient.methods.GetMethod.<init>(GetMethod.java= :88) =09at com.gargoylesoftware.htmlunit.HttpWebConnection.makeHttpMethod(HttpWe= bConnection.java:199) =09at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebCo= nnection.java:134) =09at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.jav= a:1588) =09at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.jav= a:1562) =09at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:359) =09at com.gargoylesoftware.htmlunit.html.BaseFrame.loadInnerPageIfPossible(= BaseFrame.java:212) =09at com.gargoylesoftware.htmlunit.html.BaseFrame.loadInnerPage(BaseFrame.= java:198) =09at com.gargoylesoftware.htmlunit.html.HtmlPage.notifyNodeAdded(HtmlPage.= java:1396) =09at com.gargoylesoftware.htmlunit.html.DomNode.appendChild(DomNode.java:4= 63) =09at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.star= tElement(HTMLParser.java:368) =09at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour= ce) =09at org.cyberneko.html.filters.DefaultFilter.startElement(DefaultFilter.j= ava:179) =09at org.cyberneko.html.filters.NamespaceBinder.startElement(NamespaceBind= er.java:280) =09at org.cyberneko.html.HTMLTagBalancer.callStartElement(HTMLTagBalancer.j= ava:1009) =09at org.cyberneko.html.HTMLTagBalancer.startElement(HTMLTagBalancer.java:= 639) =09at org.cyberneko.html.HTMLScanner$ContentScanner.scanStartElement(HTMLSc= anner.java:2343) =09at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:1= 820) =09at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:789) =09at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:478= ) =09at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:431= ) =09at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) =09at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.pars= e(HTMLParser.java:330) =09at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:2= 45) =09at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(Defau= ltPageCreator.java:115) =09at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPa= geCreator.java:84) =09at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient= .java:709) =09at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:376) =09at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:415) =09at HTMLUnitRun.test(HTMLUnitRun.java:40) =09at Main.main(Main.java:13) |