In my project work I was supposed to automatically login and create a ticket to a support system. here are the steps I planned to follow
1. Get HTML content of login page by using Get method with HttpsURLConnection.
2. Parse HTML content using jSoup library and extract form input elements.
3. Get the names of the attributes of the form and prepare a parameter list with custom data (like user name, Password) and remaining application generated parameters.
4. Now Send a post request to Login page url with the parameter list ( which also will have other paremeters which are not supposed to be changed).
5. After post request successful I receive the HTML content of page which occurs after login via BufferedReader with InputStream Object of HttpsURLConnection.
6. Now I will send a "GET" request to the page which has a Ticket opening form and receive HTML content of the page.
7. Parse HTML content using jSoup library and extract form input elements.
8. Get the names of the attributes and preapare a parameter list (which will have the details of ticket which needs to be updated and submitted to webservice to complete ticket creation) this should be a multipart form data ( I set headers accordingly).
9. Then post it to the ticket creation web service.
10. Process will complete If a ticket gets created.
I am able to successfully login to the website, get the parameters and set all the attributes and formdata. but I'm stuck with few errors. Currently I'm getting InvalidStateException : Already Connected error.
I am running the code on IntelliJ IDEA 14 Community Edition. Can anyone please help me with this error. and also it would be great if you can correct me if I'm going in wrong direction to get what I'm trying to do here.
Lines - 448 through 453 of the file.
Here is the code.
please how can I develope a web base chat application am a student of computer science that's my project topic design an implementation of webbase chat application pls I need a guide to achieve these....thank you