-2
Well, I am not long in Java WEB and I have some doubts in Javaserv Faces, and I would like to understand, to be able to manipulate well, etc. So if anyone can ask my questions, I would be grateful.
NOTE: I am using JSF with MVC standard
1) There are 2 types of sessions, the session that the DAO uses to access the database and the browser, the Browser Session stores all classes that are in the system?
Example: Imagine that I created a System that has 2 classes, being Client and Account... there have the Getters and Setters and also created the Controller Client and Controller account, since the View communicates with the Controller, and the Controller with the Model (Back-end). Ai, I joined the site and will automatically have these 2 objects as a Session variable? However, null? Then when I log in for example, the Session Client will receive the information from my account that I logged directly from the controller?
2) Page protection, I know a little bit about PHP, I understood and managed to manipulate well, and there is the header (Location index.html) command; which redirects to another page, and is quite used with the isset(var) command, for example, the guy is not logged in, so can not access such page, so if you try to access this protected page you will be redirected to index.html... Since JSF does not work with JAVA code in source code like PHP, it must have some command to manipulate in TEMPLATE, ai wondered if anyone knows this command.