• 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

How to get url

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i am trying to deploy a web application on another Website's iframe , when i travese from one page to another page , the url changes. There are some parameters added in the url which i want to acces but i am not able to .

i have used request.getParameter(), request.getQueryString() but these both methods return me null values

when i do request.getRequestUrl() it gives me my local web address not the address which is actually coming in the web browser. i.e.

if my actual url is http://localhost:8080/maapp/ and the hosting url is http://xyz.com/maapp/#name="rohit"&age="34"

on running request.getRequestUrl() i get http://localhost:8080/maapp/ hence i am not able to access these name and age params.

Help me with these please.
 
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Those are not URL parameters. The URL parameter part starts with a "?", but since this URL has no question mark, there are no parameters.
 
avneesh atri
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Moores wrote:Those are not URL parameters. The URL parameter part starts with a "?", but since this URL has no question mark, there are no parameters.




the problem still remains ,how can i access these values from a servlet
 
Ranch Hand
Posts: 40
IBM DB2 Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First find out why "?" is not coming in your URL if you are sending parameters.
 
Tim Moores
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IIRC, then the browser is not obliged to send anything following the hash character ("#") to the server; that's purely a client-side thing. So if you can't fix the URLs to include proper parameters, you may be out of luck.
 
reply
    Bookmark Topic Watch Topic
  • New Topic