Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Some questions about JSF  RSS feed

 
Sanz Vai
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. In Struts there are several extension points that will help you to create your own frameowork based on Struts eg. ABCActionServlet extends ActionServlet and then your application uses ABCActionServlet. Same way ActionForm and Action can be extended to provide your own 'base' forms and action. All common methods can be abstracted in your own base Controller, Form or Action. Can this be done in JSF - since FacesServlet is Final?

2. In Webframeorks like Struts or JSF some of the components are stored in HttpSession. How does this work in Clustered environment?
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sanz Vai:
1. In Struts there are several extension points that will help you to create your own frameowork based on Struts eg. ABCActionServlet extends ActionServlet and then your application uses ABCActionServlet. Same way ActionForm and Action can be extended to provide your own 'base' forms and action. All common methods can be abstracted in your own base Controller, Form or Action. Can this be done in JSF - since FacesServlet is Final?

I believe you can't (without modifying the source code). All request should pass through FacesServlet. Why do you need to extend it?
 
Sanz Vai
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would you implement the concept of FrontController? This is the place I would initialize my application level properties, request filtering, and something else that is special to my app only. By extending ActionServlet, I can override the init() method and intialize all that my app needs here. How would you do this with JSF?
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sanz Vai:
How would you implement the concept of FrontController? This is the place I would initialize my application level properties, request filtering, and something else that is special to my app only. By extending ActionServlet, I can override the init() method and intialize all that my app needs here. How would you do this with JSF?


1. You can use another servlet to initialize your app specific data. You don't necessarily need to extend FacesServlet for this. Faces Servlet can still cater to all of your Http request.

2. Filters can be set prior to FacesServlet.
[ April 13, 2005: Message edited by: Varun Khanna ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!