Re: Access HTML form in Java
I do dislike these comparisons to .NET.
.NET is wired into the OS and all other Microsoft software, so it's not surprising it has something that can access a web browser (ie IE).
Expecting the same thing from Java out of the box is like expecting to be able to do this with C++ out of the box.
Anyway, are you asking for a Java-based web browser or what?
Re: Access HTML form in Java
Hej!
Yeah, I know that .Net is a lot closer to Windows that Java. But to be honest, I don't care about that, I just want a good working, easy to handle, fast codable solution.
I just hoped that Java could offer something similar, so that I wouln't have to use my crappy Windows-PC at work ;).
However, you're right, I'm looking for a Java-based browser module by which I could load html forms and read their values.
I found JavaFX suit those requirements, but the few example codes I found all needed lots of Javascript in their html, which means to much work for my project (compared to the alternative in .Net).
It's just annoying that I have to code on Windows for it...
So if anyone knows some examples without (or little) Javascript, please post!
Re: Access HTML form in Java
I'm still not sure what you are trying to get.
Assuming it is just the <form> then an html parser of some sort would make sense.
You mention JavaFX, but that's a GUI engine, so are you looking at displaying this?
For example:
Code:
<html>
<body>
<form id="someForm">
<p> This is a form</p>
<input type="text" name="someField"/>
</form>
</body>
</html>
What would you be looking to do witht he above html page?