Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to retrieve the data entered in the HTML form from my Java application?

 
Punit Jain
Ranch Hand
Posts: 1012
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello, i m loading a html page in JEditorPane.
the html page has a report (like table), i need to print that on paper.
i want to know can I retrieve the data (i mean field values)entered in the HTML form from my Java application. If so how..?
i mean this is my html page:
 
Rob Spoor
Sheriff
Pie
Posts: 20605
60
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where do you get this HTML page from? JEditorPane allows you to set an HTML page from a String, by using setText and setContentType("text/html"). This allows you to create the HTML page any way you like, with any values you like, and then show it in the JEditorPane.
 
Punit Jain
Ranch Hand
Posts: 1012
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is a static html page, i created this in my project, but the values i want is dynamic from my application.
suppose client wants to print report of (say, user abc), all the details of (user abc) should filled in that html form values from database.

This allows you to create the HTML page any way you like, with any values you like, and then show it in the JEditorPane.

but how i will get values from my application/database..?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic