Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can we get requesting page in jsf  RSS feed

 
Mahendra Pratap
Ranch Hand
Posts: 42
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • 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..
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • 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
 
Akash Singla
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the referer key in requestHeaderMap contains the requesting page name

Try this.

 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • 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 Java Spring
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!