• Post Reply Bookmark Topic Watch Topic
  • New Topic

render html form in swing & send forms's input values as params via HTTP POST client

 
Yahya Elyasse
Ranch Hand
Posts: 510
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I'm using appache commons http client to send HTTP post queries to a given url and receive HTTP response then process it.
one of the requirements of my Application is the following: one of these HTTP Post requests is supposed to return an HTML form with different html types (text filed, text area etc..) that i will need to display in my swing application. one important requirement is that i can't know in advance what the html form field types will be.. it depends on a given parameters that my application send as part of HTTP Post method (using apache http client).
I Longly searched for a simple solution to this problem . There are many solutions but each one has it's limitations :
1-i can render the html form inside a JEditorPane .but how can I collect the user entered data inside JEditorPane ? i'm not sure this swing component offers the capability to detect its html contents and more it will be difficult to know what are the values entered by user inside html form rendered by JEditorPane.
2-are there any Java Embedded browsers that offer some API to enable me detect the html form fields ,capture the data entered by user inside the html form ?
3-the solution i currently opted for is : parse html & convert html form to swing dialog. currently this solution i use works well but the cost of implementing it is high : it involves difficult parsing logic. this makes me worried .I'm not sure if i'm now using the right & easiest solution.

I need some advice on What is the simplest and clean solution to render a html form & yet be able to collect user entered inputs & send the user input values as params via java HTTP POST request ?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what JEditorPane can or can not do (it's easy to use, so you could just give it a try), but for a more full-featured and up-to-date Swing web component, check out Lobo (on SourceForge).
 
Yahya Elyasse
Ranch Hand
Posts: 510
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:I'm not sure what JEditorPane can or can not do (it's easy to use, so you could just give it a try), but for a more full-featured and up-to-date Swing web component, check out Lobo (on SourceForge).


thanks for prompt response,
My problem is not only rendering the html form. the issue is that i need a way to collect data entered by user inside the html form. then i'll need to process these values and format them as a list of Parameter(name,value) .then send them -together with extra parameter(name,value) not in html form- via a HTTP POST method.
from your experience, is Lobo capable to do this work above without much coding from my side ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!