• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

event to call HTML file

 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello
I am working on Swing . I wanted to call an html file that contains a form to be filled.
This form has already been made.
When I click a button I should be able to call an html file .I have defined an actionperformed() and i want to place the code in that method.
plz help
jack
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you have so far?
Where is the problem?

Shall we do the work for you?
 
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jignesh, in your other posting I asked you to more fully describe what "calling an HTML file" means, and yet you've posted the same question again with no more detail.

Are you looking to open a browser showing the form from some webserver? When the form is submitted, should the entered information go to this webserver somewhere? Or are you hoping to display this form in a Swing window and have your code receive the values the user enters?

If you won't describe what you want, then even if someone wanted to do it for you they couldn't. Posting the same question again and again makes it hard for us to want to help you, though.

Help us help you.
 
Jignesh Gohel
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Mr David
Thank you for your reply.

While I click a button called :: Register :: on my Swing application I should be able to call an html form that contains all the registration fields. This form I have placed in Apache webserver which when filled will pass the information to JSP.
So when I click the button via my actionperformed() method in Swing the browser should open up along with html form.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Then in your actionPerformed() method, use Runtime.exec() to launch the user's browser with the form's URL.
 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Jignesh,

You may look also at JDIC to launch user's browser wathever the platform is.

Hope that helps,
 
Jignesh Gohel
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello all
thanks for the reply

I am able to call explorer using the JButton but if i put the URL of the from in the method Runtime.exec() the form does not open up. Please send the code as to how I should call the form if it is being made at D:
ie "D:\Chat Project\Login.html" what should i specify.

Plz help
Jack
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the code you have that doesn't work? I'll say it again: the more information you provide, the more likely you are to get help.

I've already sent this as a reply to your private message (and again, that's going to decrease your chances to get help since no one else reads my email), but here it is again. Serving up a form using a disk file like you're donig is bypassing your web server. No servlet is going to receive the form field data when you "submit" it.

However, say you really want that form to be served up from disk just for kicks. I'm guessing that the space in the name is causing a problem, but without seeing your code, it's a wild guess. Try quoting the file name.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic