I'am trying to fill a form which is on a jsp page. Yet it doesn't work.
Yet, i have an error : java.net.UnknownHostException: jss at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
IS it possible to fill a form on a jsp page with junit? If the answer is yes , why is my code wrong.
but , if i use a URL that does not end with .jsp . For instance, .com , it works ? What i dont know is if it is possible to read a jsp page with the methode WebRequest req1 = new GetMethodWebRequest( URL to a jsp page);
Joined: Mar 15, 2004
The URL you give will just be sent out with a HTTP GET command - like in a browser. That is, you can obtain with HTTPUnit any page you can with your browser.
There's no reason why you couldn't get a page with a '.jsp' extension - give it a go! Of course, you'll get the JSPoutput, not the text of the JSP itself. But this is probably what you want anyway.
As an aside, it sounds like you would benefit from doing some background reading on HTTPUnit.