• 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

Can we get requesting page in jsf

 
Ranch Hand
Posts: 42
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Guys,

Greetings of day from Mahendra,

Actually i want to get the name of page which makes the request, i can do this by setting but i just want to know can i get the name of the request making page through FacesContext.

any kind of suggestions are welcome..
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So, like if the page is named 'clientForm.jsp' that has submit a request, you want that String, 'clientForm.jsp' to be extracted on the server? Is that what you're saying?

Yeah, putting an attribute in the request scope would be a more scalable and sensible solution. I'm wondering if that info is buried in a header?

-Cameron McKenzie
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the referer key in requestHeaderMap contains the requesting page name

Try this.

 
Cameron Wallace McKenzie
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Akash Singla wrote:



Thanks for digging that up!

I'm wondering if that gives the actual page name? Plus, are all browsers dependable when serving that back to the server? What if a client goes through a reverse proxy or an anonymizer? Or what if a page is actually created through includes. Just seems like there's alot of landmines depending upon the name of a calling page.

-Cameron McKenzie
 
Mahendra Pratap
Ranch Hand
Posts: 42
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys Thanks for the response!

actually i resolved my problem by

it gives the name of the requesting page!!

Actually i was trying to implement back button on my pages if anyone have views to share then all are welcome !!

Thanks,
Mahendra
 
Please do not shoot the fish in this barrel. But you can shoot at this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic