in a html file (test.html) there a a form
for firstname ,lastname and image upload
it is possible to convert test.html to an image
to see it in img tag as source <img src="test.html">
who to do that
Here's one suggestion. Swing has a component that displays html files (I think its the JEditorPane). Open the html file into that component, then create an image object, get the graphics object from that image object, and call the JEditorPane paint method using the graphics object from the image. Now the html file has been painted into the image object. Write that image out to file, and you're done.
Adam gave you the solution. I think what may have confused you is that the JEditorPane code executes on the server, not the client.
One question you haven't answered is this:
Why do you want to do this? What is your goal? I ask because there may be
simpler and smarter ways to achieve your goal, but so far you haven't described
your problem at all.