1

I'm trying to submit a form through App Engine and Jaunt. I get this error:

java.lang.NullPointerException
    at com.jaunt.UserAgent.a(SourceFile:2337)
    at com.jaunt.UserAgent.send(SourceFile:887)
    at com.jaunt.component.Form.submit(SourceFile:1263)
    at ewohnat.server.parse.MyServlet.doJaunt(MyServlet.java:118)

when I try to run this code:

UserAgent userAgent = new UserAgent();
userAgent.visit("www.someurl.com");
Form form = userAgent.doc.forms[0];
form.setCheckBox("cb", true);
form.submit();

The exception is thrown on the last line. Any ideas?

Stephan
  • 41,764
  • 65
  • 238
  • 329
opowell
  • 568
  • 4
  • 20

1 Answers1

1
    form.submit();

Doesn't work properly. Use method with argument instead

    form.submit(String value);