• 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

Opening a Web browser window using "cmd /C start" probem with "&" symbol

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have my program call "cmd /C start" followed by the web site address to open my browser (in this case, Internet Explorer). Problem is, that is the URL contains an and symbol(&), the URL is cutoff at the point. For example, lets say my url is http://www.web.com?name=bob&age=28. The text "&age=28" is omitted from the URL sent to the browser. Is there something I should replace the & symbol with when sending the address to the browser? Anything I can do to correct this?
 
Ranch Hand
Posts: 657
Spring VI Editor Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might want to have a look at the following for browser control from Java:
JDesktop Integration Components
Control browsers from your Java application

And importantly:
Navigate yourself around pitfalls related to the Runtime.exec() method
 
Rancher
Posts: 5008
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps you need to encode the URL. There is a class and method to do that.
Scan thru the doc.
 
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
for Ampersand ("&"), the encoding is %26. Can you try that?
reply
    Bookmark Topic Watch Topic
  • New Topic