Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java access parameter pass by URL

 
Hoe Chin
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a faces page. let said now the link http://localhost:8080/Page.faces?ID=asdasd1237123

When user click on this link i need to get the id value to do some checking how can i get the id value?

if i use this String url=request.getRequestURL().toString(); the url return me http://localhost:8080/Page.faces only
 
Himanshu Kansal
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try request.getParameter(String)

request.getQueryString will give you the part after "?"
 
Hoe Chin
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for replied i got it works
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic