Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing parameters on url  RSS feed

 
Vic Newman
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am passing paramters on my url as follows. http://ippc1/address/main.faces?id=999

My main.faces page has no backing bean. It is only a page with menu links. Is there a way to create a session bean on a page like this, a page with no bindings? I would like to create a session bean that would hold the id passed on the url. I need to retain the id=999 for use throughout the application. Does anyone know how I can accomplish this?

Thanks,
Vic
 
Tim Holloway
Bartender
Posts: 18713
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, SOMETHING has to implement logic to take the parameter from the URL and put it in a session object, then add the session object to the session. So you choice is what.

If you don't want JSF to create and catalog the session object you essentially either have to code your own servlet or do it all in JSP code fragments (I forget the correct name for that - it's a bad thing to do anyway).

It's a lot simpler to set up a session-scope backing bean and let JSF do the work for you.
 
Vic Newman
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your input Tim.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!