4 Replies Latest reply on Nov 10, 2010 3:33 PM by 800330

    simple website interaction

      I want to make a simple website-interaction program. The program will run on my computer. It needs to connect to a webpage, get some numbers from specific places on that page, do some calculations with those numbers and then click some javascript buttons based on those calculations.

      My question is what is the way to do this? Do I need a specific programming language (do I need to write this in javascript or html? It seems not to me, but I don't know), is there some tutorial about website-interaction? This seems like a common problem, which suggests there is a (relativly) easy way to do this, but I can't find it (mainly because I don't know where to look).
        • 1. Re: simple website interaction
          Websites are built to be used by humans, not by programs. So no, this is not a common problem and it is certainly far from easy.
          • 2. Re: simple website interaction
            In the "good old days" this used to be called "screen scraping." You can certainly down load a Web page with Java and (assuming you know how it's structured), parse values from it. I'm unclear what you mean by "click a Javascript button." Do you mean you need to post the calculation result somewhere?
            • 3. Re: simple website interaction
              If you want to develop web pages with Java, here are the rough steps.
              It will take you quite some time:

              * read a book on Java (Head First in Java is recommended).
              * run a a number of the book's examples on the DOS command line
              to get familiar with that before moving onto an IDE.
              * Download and install the Eclipse IDE (its free).
              * Practice writing small java projects in the IDE.
              * read a book on JSP and Servlets (a JSP book typically covers both)
              * Install apachie Tomcat (its free)
              * configure Eclipse to work with Tomcat
              * create a hello world JSP page in Eclipse and get it to display
              * create a hello world servlet in Eclipse and get it to display
              * Have the JSP page submit user input to the servlet.
              Then, have the servlet process the input and put its results in request scope.
              Then, have the servlet dispatch to the JSP page.
              Then, have the JSP display the data.
              * Read a book or on-line tutorial on JSTL
              * Read a book on XHTML
              * Read a book on Javascript
              * Read a book on JDBC
              * Install a free database such as Oracle Lite (there are others)
              and learn how to create a database table via its browser utility tool.
              * Get your JSP page to submit data to the database via the servlet.
              * Read up on MVC separation of concerns for creating a web application.
              * learn how to create a war file to run your applicaiton in Tomcat independent of Eclipse.
              • 4. Re: simple website interaction
                Perhaps looking into [url http://seleniumhq.org/about/how.html]Selenium is worth your while...