Java tutorial6, netbeans7 sample program learning notes

Source: Internet
Author: User

-----------------------------
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.