This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How read the first URL which is there in the browser

 
yashpal waghmare
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to read the URL like for eg,

I have entered URL like www.google.com and i want to store this URL as a string and I want to use this url in another java class as string in method like response.sendRedirect("that string").

How do i can do?


Thanks in advance.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rule one about Servlets: they only know about the data passed to them as part of a request. You can't read the current state of the browser from a servlet.

Assuming you are sending a request however. You can get a whole bunch of information about the request from the HttpRequest class. Have a read through the API.
[ December 23, 2008: Message edited by: Paul Sturrock ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic