-----------------------------
Java tutorial 6
Install tutorial addon on the glassfish update center and download about 20 M)
-----------------------------
Examples of the most basic jsf functions of samples/web/hello
Hello1 basic jsf sample # {hello. name} is a highlight
Hello2 basic servlet sample, @ WebServlet ("/greeting") is a highlight
Basic jsf example of guessNumber
AjaxguessNumber
<F: ajax...> it is the highlight to implement partial update page, not the whole refreshweb page, or the response.xhtml implementation.
For the <f: ajax> tag, expand one point:
The execute attribute specifies who sends data to the Server. Here is the input text
Render is used to specify the position of the final output. There are two writes.
The js function of msg clears the result information when errors1 exists. It is useless and is just a lame.
<F: ajax...> the JavaScript code is compiled into js. In fact, it is clearer to write ajax-style js directly, and the tag learning cost is higher.
Http://java.sys-con.com/node/1352885 for more references
-----------------------------
Some samples provided by netbeans7.0
-----------------------------
Petcatalog
This is basically the same as the wizard's Automatic Generation of ejb + jsf.
<Td> Webjpa
Contains two functions: create person and list person. The person is an entity that exists in derby db.
Call M (JPA) in servlet, servlet as C, jsp as V, clear structure, worthy of reference
Jsfjpa
Login example: PhaseListener redirection page
If the user key is found in the session map, it is authenticated.
Redirection to login if no information is found
This logic seems to have a vulnerability. Using phaselistener to implement login is not very practical.
ScrumToys
Comprehensive examples, including CRUD, i18n, EL, template, bean validation, etc.
This article is from the "meng_xx" blog