Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting input from URL Bar in Browser (reading url from bar)  RSS feed

 
David Cafu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello there,

I just wanted to know if there is any way that I can get/read input from browser url bar, for instance,

I input "www.coderanch.com" to url bar, I want my java app to grab/read the input.

Unfortunately, I cant provide any source code at the moment because I have not written anything yet, I just want some suggestions/ideas on how I can solve my issue. thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66208
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not actually the right way to think about it. You don't have any direct access to the browser to "read" what's in the address bar.

But you can obtain the URL that caused the servlet to be executed. Inspect the javadoc for HttpServletRequest to see what methods are available to you.

What do you need this information for? The way you've asked is raising a few red flags.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!