• 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

call html with values

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends,

I can call a HTML file from java.I want to pass some values from java class file to that html file.Anybody help me how to pass parameters?

Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler http://localhost:8080/jcoDemo/dp.html");

is one i am using for calling html file

thanks
 
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by priya pratheepp:

Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler http://localhost:8080/jcoDemo/dp.html");



Are you using servlets?

In general, if you want to call a url with parameter of "foo" and the value "baz" then you use something like:


[ June 04, 2008: Message edited by: Pat Farrell ]
 
priya pratheepp
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no servlets..only java...
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The easiest way probably would be to use the Apache HttpClient library.
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you pass the parameters as part of the URL, i.e. "http://localhost:8080/jcoDemo/dp.html?param1=val1¶m2=val2"?
 
Sheriff
Posts: 22683
128
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But that won't make any sense if it is a static HTML page, and not one generated through PHP, ASP, JSP, Servlets or any other means for dynamically generating pages.
 
mooooooo ..... tiny ad ....
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic