public String getWicketAjaxBaseUrlEncodedInLastResponse() throws IOException,
ResourceStreamNotFoundException, ParseException
{
XmlPullParser parser = new XmlPullParser();
parser.parse(getLastResponseAsString());
XmlTag tag;
while ((tag = parser.nextTag()) != null)
{
if (tag.isOpen() && tag.getName().equals("script") &&
"wicket-ajax-base-url".equals(tag.getAttribute("id")))
{
parser.next();
return parser.getString().toString().split("\\\"")[1];
}
}