• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help with jsoup  RSS feed

 
Alena Net
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone!
My name is Alena, and i'm trying to write my first program on java.

What i want from program:
On my job we work in Service Desk program. I need parse comment from this site/program. So i need:
Login on site with login/password
Search on this site by number
Check the new comments
If it is new comment - show this comments.

My first question:

I start with jsoup library. And i can't find how to use login/password for authorization.
I write URL:
Document doc = Jsoup.connect("URL").get();

But how put login/password in there?
 
Paul Clapham
Sheriff
Posts: 22841
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Alena, welcome to the Ranch!

Am I correct that your first step is to sign on the application by putting your user ID and password into text boxes in a form, and then once you're signed on you send another request to get information? Then, as far as I can see Jsoup doesn't help you with the authentication part. It seems to assume that you have unrestricted access to the URL you want to parse.

But I found this tutorial which looks like it does something a lot like what you are asking: How to automate login a website – Java example. It's a lot more complicated than the code you posted but it definitely looks to me like it's something you could use.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!