HTML is just text, so you can use the classes in the java.io package. The approach would be slightly different depending on whether the HTML page is a local file, or accessed over the net through HTTP.
I want to develop a standalone java application.so to enter any input into application I should use Applet or Swing/
I do not want to use Applet or Swing but I want to use HTML in the place of Applet or Swing.So I enter all input in HTML text boxes and if I click on submit button then all data should be sent to java class
Joined: Mar 22, 2005
That's what servlets are for. Of course, they need a servlet container running somewhere, so they're not exactly standalone. It is possible (and not hard) to embed a servlet container like Tomcat in a desktop Java application, though.
Furthermore, the same application could embed a browsing component like Lobo (on SourceForge) for the frontend; that way you can keep client and server within the same application.
If I do not want to use Servlet then is there any alternative??
In the end, I think you are going to find that you are going to have to spend time learning something in order to create your UI. Rather than spending that time learning things that in the end are jumping through hoops to create a very convoluted UI with very confusing, hard to understand and maintain code, you would be better off learning the API that is meant to be used for writing UI's... that being Swing. Just my recommendation.
subject: I want to design a java class (standalone) which will read Data from HTML page.Is it possible??