tailieunhanh - Java Server Pages: A Code-Intensive Premium Reference- P16

Java Server Pages: A Code-Intensive Premium Reference- P16:Before you begin reading Pure JSP Java Server Pages, you might want to take a look at its basic structure. This should help you outline your reading plan if you choose not to read the text from cover to cover. This introduction gives you an overview of what each chapter covers. | td align center String new String ID td tr tr td align left DESCRIPTION td td align center String new String DESCRIPTION td tr tr td aljgn left PRICE td td align center String new String PRICE td tr tr td aljgn left QUANTITY td td align center String new String QUANTITY td tr table body html As you can see there is really very little difference in the application code and the JSP code. The only noticeable differences are the way we load the XMLResource and the way we output the results. To see this JSP run you will need to copy the SAXHandler class file to the SERVER_ROOT purejsp WEB-INF classes directory and the and the to the SERVER_ROOT purejsp directory. Then load the following URL into your browser http yourserver 8080 purejsp You should see a page similar to Figure . fii fdi Jcch d - - j .1 J J J J J tf Itl h tt Jrrt pt- 3 . XML 3 Im. n DESCMPTiCW PRICE 33445 AmAd Pcwsci T t Jnlrrr .h -Tkil Mm -i Myrtrry Figure Output from . Summary In this chapter we covered the basics of XML. We covered how to use Sun s SAX parser. We also look at an example of how you would incorporate XML and JSPs. - 151 - In Chapter 16 JSP Communication with Servlets you learn how you can use JSPs and servlets using the Model-View-Controller design pattern. Chapter 16 JSP Communication with Servlets Overview In this chapter we are going to discuss how you can incorporate servlets and JSPs using the Model-ViewController design pattern MVC . The MVC originated from Smalltalk and was used to design user interfaces wherein the application was made up of three classes a Model a View and a Controller. Each of these classes is defined in Table . Table The Classes of the MVC Class Definition Model The Model represents the data or application object. It is what is being manipulated and presented to the user. View The View is .

TỪ KHÓA LIÊN QUAN