Details
Description
I liked the in container testing provided by Cactus with auto deployment, but
I would also like to use HTTPUnit with it and provide a generic way of going
into the deployed application.
The hardest part to doing this I think is getting the URL to connect to. I
suggest adding something like this method or a variable like contextRoot to
the class.
protected String requestUrl(String relativeUrl)
{ StringBuffer url = request.getRequestURL(); url.delete(url.lastIndexOf("/"), url.length()); url.append(relativeUrl); return url.toString(); }