6- JSP pages. Juan M. Gimeno, Josep M. Ribó. January, 2008
|
|
- Rodney Mitchell
- 5 years ago
- Views:
Transcription
1 6- JSP pages Juan M. Gimeno, Josep M. Ribó January, 2008
2 Contents Introduction to web applications with Java technology 1. Introduction. 2. HTTP protocol 3. Servlets 4. Servlet container: Tomcat 5. Web application deployment 6. JSP 1
3 6- JSP. Contents From servlets to JSP pages Components of a JSP page Directives Expressions Scriptlets Declarations Implicit objects Examples 2
4 2. Web applications. 2.6 JSP pages 2.6 JSP pages. Difficulties with servlets A servlet manages the creation of a web page through its output stream in a way which is non-intuitive and difficult to generate and to maintain: Both the static and the dynamic elements of the web page are managed by the same code Static elements: Those elements that do not change in the resulting page through different requests (e.g., page headers and footers, table structure...) Dynamic elements: Those elements that depends on the parameters of the request and may change in different requests (e.g., table contents) Page contents are generated by means of calls to usual output methods (e.g., println...), which are combined with other programming instructions. The structure of the resulting page is obscure. Each servlet is a complete class with several methods and a complex lifecycle. 3
5 2. Web applications. 2.6 JSP pages JSP pages. A solution Idea: Do not program servlets directly, but a JSP web page What is a JSP web page It is a usual web page written in html that incorporates some dynamic elements (e.g., java expressions, java code, tag actions and java beans). A JSP page is translated automatically into a servlet. When the JSP page is requested, the servlet associated to it is executed. The result of the execution of that servlet is an html page that contains: The static (html) code of the JSP page The result of the execution of the java expressions and code of its dynamic part JSP pages are executed within a JSP container. TOMCAT is a servlet and JSP container 4
6 2. Web applications. 2.6 JSP pages JSP pages. How do they work hello.jsp NO is there a servlet for hello.jsp? YES Translate into a servlet hello.jsp >hello_jsp.java NO is the servlet more recent than hello.jsp? Compile hello_jsp.java > hello_jsp.class YES Create an object obj of the class hello_jsp.class NO is there already an object obj of hello_jsp.class? send the request to obj YES 5
7 2. Web applications. 2.6 JSP pages The first JSP page page import="java.io.*,java.text.*,java.util.*"%> <HTML> <head> <title> First JSP page </title> </head> <body> <h3> First JSP page </h3> <p>hola... <p>1+2= <% int p; p=1+2; %> <%=p%> </body> </html> 6
8 Introduction to web applications with Java. 2.6 JSP pages. Components of a JSP page Components of a JSP page A JSP page is an html page which incorporates some dynamic items which are executed at run time by the server. A JSP page is translated automatically into a specific servlet. As a result of the execution of this servlet, the client receives a new page which consists of The html elements of the original JSP page returned verbatim and The result of the execution of the dynamic ones by the servlet. We call resulting page to the page resulting from the execution of the servlet associated to the JSP page. 7
9 Introduction to web applications with Java. 2.6 JSP pages. Components of a JSP page Components of a JSP page (2) The dynamic items in a JSP page: Directives Expressions Scriptlets Declarations Tag actions Java beans 8
10 Introduction to web applications with Java. 2.6 JSP pages. Directives Directives Definition Directive elements specify attributes of the page itself (i.e., information associated to the page). The type of the content that will be generated by the JSP page The page that will be shown if some error occurs during the execution of the JSP page The library that defines certain actions used in the page The name of a file that contains a page header and which should be included as a header of the resulting page... 9
11 Introduction to web applications with Java. 2.6 JSP pages. Directives Directives (2) Syntax directive-name [attrib1="val1" attrib2="val2"...]%> Types JSP defines three standard directives: page include taglib 10
12 Introduction to web applications with Java. 2.6 JSP pages. Directives Page directive page [attribute1="value1" attribute2="value2"...%> The page directive specifies some attributes that apply to the page as a whole Examples: info: It gives some textual information on the purpose of the page. <%@ page info="page to upload files into a server" %> contenttype: The type of content that will be generated by the JSP page. <%@ page contenttype="text/html" %> 11
13 Introduction to web applications with Java. 2.6 JSP pages. Directives errorpage: The page that will be displayed if an exception occurs during the execution of a JSP page. <%@ page errorpage="errorhandler.jsp" %> iserrorpage: True if this is the error page activated as a result of an error caused by another page. For instance, the page errorhandler.jsp would contain the following directive: <%@ page iserrorpage="true" %> import: It imports java packages which are used by the java code contained in the page (scriptlets or expressions). <%@ page import="java.text.*" %> session: It informs whether the page needs an http session or not. <%@ page session="true" %> 12
14 Introduction to web applications with Java. 2.6 JSP pages. Directives Include directive It merges the contents of another file with the JSP page. This merging takes place before the translation of the JSP page into a servlet. It may be used to include common header pages or procedures. <%@ include file="commonheader.html" %> It is different from the standard tag action <jsp:include> 13
15 Introduction to web applications with Java. 2.6 JSP pages. Directives Taglib directive It declares a tag action library so that it can be used in the JSP page. <%@ taglib uri="taglibraryuri" prefix="tagprefix"%> (See Introduction to tag libraries) 14
16 Introduction to web applications with Java. 2.6 JSP pages. Expressions Expressions Expressions containing java variables may be accessed in a JSP page in the following way: <%= java-expression %> Examples: <%= %> Current time is <%= new java.util.date() %> 15
17 Introduction to web applications with Java. 2.6 JSP pages. Scriptlets Scriptlets A scriptlet is a sequence of one or various java sentences which are included in the JSP page. These sentences provide the dynamic behaviour of the page. They are executed each time that the page is requested. The JSP container includes the contents of the scriptlet verbatim into the method jspservice() of the servlet into which the JSP page has been translated. <% sentence1; sentence2;... %> 16
18 Introduction to web applications with Java. 2.6 JSP pages. Example 1 Example: Pesetas to euros conversion Example location: introapweb/examples/ex6.1 <%@ page import="java.text.*" %> <html> <table border=1 cellpadding=3> <tr> <th>pesetas</th> <th>euros</th> </tr> <% String es=""; double e; int p; NumberFormat fmt= new DecimalFormat("###.00"); for (p=100; p<=1000; p+=50){ e=(double)p/ ; es=fmt.format(e); %> <tr> <td align="right"><%= p %></td> <td align="right"><%= es %></td> </tr> <% } %> </table> </html> 17
19 Introduction to web applications with Java. 2.6 JSP pages. Declarations Declarations Declarations are similar to scriptlets: They are sequences of one or various java sentences which are included in the JSP page. The difference with scriptlets is the following: The JSP container includes the contents of the declaration verbatim out of the method jspservice() of the servlet into which the JSP page has been translated. <%! sentence1; sentence2;... %> Declarations are used to declare classes, methods or variables 18
20 Introduction to web applications with Java. 2.6 JSP pages. Implicit objects Implicit objects There are several implicit objects that can be used in scriptlets and expressions (however, not in declarations). These implicit objects are created implicitly when the JSP page is translated into a servlet. 19
21 Introduction to web applications with Java. 2.6 JSP pages. Implicit objects Implicit objects (2) Variable name Value request The instance of the class HttpServletRequest which is being served response The instance of the class HttpServletResponse which will receive html code that has been generated by the servlet pagecontext The instance of the class PageContext which provides access to the page attributes, request, response, exception (if any) and t all namespaces session The instance of the class HttpSession that is being used by the JSP page (if any) application The instance of the class ServletContext that encapsulates the web application to which this JSP belongs to out The output stream that is being used in order to generate the resulting html exception The exception that is responsible for the raising of an error JSP page (only for pages with the directive iserrorpage= true ) 20
22 Introduction to web applications with Java. 2.6 JSP pages. Example 2 Example 2: Form reader (exemple2) Example location: introapweb/examples/ex6.2 This example does the following: 1. Shows an html form 2. Submits it to the server (i.e., sends a request to the server with the attributes provided in the form) 3. Sends back to the client all the information contained in the original request in the format that it has been obtained by the server Different methods (GET/POST) and parameter codification (query string/multipart) are used to submit the form leading to different request formats. However, the use of the object request of the class HttpServletRequest makes it possible to abstract these different formats. 21
23 Introduction to web applications with Java. 2.6 JSP pages. Example 2 Example 2: Form reader. Code <%@ page import="java.io.* " %> <%@ page import="java.net.* " %> <%@ page import="java.util.* " %> <html> <body bgcolor="white"> <h1> Contents of an http request </h1> <pre> <% String controlline=new String(""); Enumeration enum; String st=new String(""); try { %> <b>1. Request line </b> <br><br> Method:<%=request.getMethod()%> <br> Request URL:<%=request.getRequestURL()%> <br> Query string:<%= request.getquerystring()%><br>; <b>2. Request header</b> <br><br> <% enum=request.getheadernames(); while(enum.hasmoreelements()) { st=(string) enum.nextelement(); %> <%=st+" : "+request.getheader(st)%> <% } %> 22
24 Introduction to web applications with Java. 2.6 JSP pages. Example 2 <b>3. Request body:</b> <br><br> <% java.io.bufferedreader br=request.getreader(); String temp=br.readline(); while (temp!=null) { out.println(temp); temp=br.readline(); } br.close(); out.println("end HTTP REQUEST"); } catch (Exception io_e) {out.println("exception:"+io_e); io_e.printstacktrace(); } %> </pre> </body> </html> 23
25 Introduction to web applications with Java. 2.6 JSP pages. Example 3 Example 3: Form reader: parameters retrieval (exemple3) Example location: introapweb/examples/ex6.3 In example 2, we showed the http request in the way that it had arrived to the server. Example 3 shows how to obtain the parameters that constitute the request In particular, the methods getparameternames() and getparametervalues(...) on the implicit object request are used 24
26 Introduction to web applications with Java. 2.6 JSP pages. Example 3 Example 3: Form reader: parameters retrieval (exemple3). Code <%@ page import="java.io.* " %> <%@ page import="java.util.* " %> <html> <table border="1" cellpadding="3" cellspacing="1" width="600"> <tr> <td colspan="2" align="center" class="header"> Valors dels parametres del formulari: </td> </tr> (cont...) 25
27 Introduction to web applications with Java. 2.6 JSP pages. Example 3 (cont...) <tr><th> Nom </th><th> Valor</th></tr> <% int fileraact=0; Enumeration nompars= request.getparameternames(); while(nompars.hasmoreelements()){ String nom= (String) nompars.nextelement(); String[] valors=request.getparametervalues(nom); for (int i=0; i<valors.length; i++) { String valor=valors[i]; %> <tr valign= "top"> <td align="right" ><B><%= nom%></b></td> <td align="left" ><%= valor%></td> </tr> <% } } java.io.bufferedreader br=request.getreader(); String st=br.readline(); %> <tr valign= "top"> <td align="right"><b>dades</b></td> <td align="left"><%= st %></td> </tr> </table> </html> 26
28 Introduction to web applications with Java. 2.6 JSP pages. Example 4 Example 4: Character file reader Example location: introapweb/examples/ex6.4 This example reads a char file from a form sent by the client and shows its contents back to the client Notice: To send a file, the request method POST and codification multipart/formdata should be used Currently the class HttpServletRequest does not offer any automatic way to get the file contents. Therefore, the request body must be parsed manually We use the method getreader() (class ServletRequest) which gets the request body as a char stream In those cases in which the request parameters are sent in the request body (POST method), reading the body directly via getinputstream() or getreader() can interfere with request.getparameter(). For this reason, in this case all request parameters are read directly from the body instead of using the getparameter() method Control line gives us the end flag 27
29 Introduction to web applications with Java. 2.6 JSP pages. Example 4 Example 4: Character file reader (exemple4). Code <%@ page import="java.io.* " %> <%@ page import="java.net.* " %> <%@ page import="java.util.* " %> <html> <h1> Upload of a character file </h1> <pre> <% String controlline=new String(""); try { out.println("input start:"); java.io.bufferedreader br=request.getreader(); String filename=""; StringBuffer filebody=new StringBuffer(1000); String temp=br.readline(); while (! temp.startswith(" ") ) { temp=br.readline(); } controlline=new String(temp); //Per definicio de readline(), temp no conte <cr>, <lf> (cont...) 28
30 Introduction to web applications with Java. 2.6 JSP pages. Example 4 (cont...) temp=br.readline(); while (temp!=null) { //1. File name reading... if (temp.startswith ("Content-Disposition: form-data;"+ " name=\"file_name\"")) { while (!(temp.equals("")) ) temp=br.readline(); temp=br.readline(); filename=temp; } (cont...) 29
31 Introduction to web applications with Java. 2.6 JSP pages. Example 4 (cont...) //2. File body reading... if (temp.startswith ("Content-Disposition: form-data;"+ "name=\"file_body\";")) { while (!(temp.equals("")) ) temp=br.readline(); temp=br.readline(); while (temp.indexof(controlline)==-1 ) { filebody.append(temp); filebody.append("\n"); temp=br.readline(); } } temp=br.readline(); } br.close(); out.println("end of reading..."); out.println("<br>file "+filename+ " uploaded:<br>"+filebody); } catch (Exception io_e) {out.println("exception:"+io_e); io_e.printstacktrace(); } %> </pre> </body></html> 30
32 Introduction to web applications with Java. 2.6 JSP pages. Example 5 Example 5: Character file upload Example location: introapweb/examples/ex6.5 This example uploads a file of characters into the server and writes it as a new server file Notice: Everything is as in the previous case In addition, we use an object of the class BufferedWriter to contain the file that will be written into the server 31
33 Introduction to web applications with Java. 2.6 JSP pages. Example 6 Example 6: Binary file upload Example location: introapweb/examples/ex6.6 This example uploads a binary file into the server and writes it as a new server file Notice: We use the method getinputstream() (instead of getreader()) which gets the request body as a binary stream In addition, we use an object of the class BufferedOutputStream to contain the file that will be written into the server In those cases in which the request parameters are sent in the request body (POST method), reading the body directly via getinputstream() or getreader() can interfere with request.getparameter(). For this reason, in this case, all request parameters are read directly from the body instead of using the getparameter() method 32
34 Introduction to web applications with Java. 2.6 JSP pages. Example 7 Example 7: Server file manager Example location: introapweb/examples/ex6.7 This example deploys a web application that converts the server into a file manager The web application has the following features: Binary files/folders may be uploaded in (and deleted from) a specific server folder The server root folder is configured in the properties file properties/wapp.properties The client may navigate through server folders The web application welcome file is index.jsp Therefore, the application can be accessed as or simply, as 33
35 Introduction to web applications with Java. 2.6 JSP pages. Example 7 Properties file The contents of wapp.properties is: root.directory = /home/josepma/test/ If the server root directory should be another one, the contents of the properties file should be updated accordingly wapp.properties will be deployed at ex6.7/web-inf/classes/properties/wapp.properties The WEB-INF/classes directory is a part of the web application classpath Therefore: Classes (java beans, servlets...) and properties files located there will be available to the web application servlets/jsp pages 34
36 Introduction to web applications with Java. 2.6 JSP pages. Example 7 A convenient way to access the properties of a properties file from a JSP page/servlet/class is using a ResourceBundle: ResourceBundle prop = ResourceBundle.getBundle("properties/wapp"); String rootdir = prop.getstring("root.directory"); (Recall that the properties file must be located within the web application classpath) There exist other ways to deal with a properties file: Using ServletContext.getResourceAsStream(...) Using a classloader and Class.getResourceAsStream(...) 35
37 Introduction to web applications with Java. 2.6 JSP pages. Example 7 Application welcome file The Welcome file is the application main entry page Its default value is defined at CATALINA HOME/conf/web.xml: <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list> This means that if we provide the application with a file called index.html/htm/jsp, that file will be displayed when the application is accessed as: The welcome file can be overwritten at the application web.xml file Caution concerning the example 6.7!!!!: Just a beta-version. Some errors are not controlled 36
38 Introduction to web applications with Java. 2.6 JSP pages. Example 7 References JSP specification: jsr245/index.html JSP API 37
Unit 5 JSP (Java Server Pages)
Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic, platform-independent method for building Web-based applications. It focuses more on presentation logic
More informationIntroduction to Web applications with Java Technology 3- Servlets
Introduction to Web applications with Java Technology 3- Servlets Juan M. Gimeno, Josep M. Ribó January, 2008 Contents Introduction to web applications with Java technology 1. Introduction. 2. HTTP protocol
More informationJavaServer Pages. What is JavaServer Pages?
JavaServer Pages SWE 642, Fall 2008 Nick Duan What is JavaServer Pages? JSP is a server-side scripting language in Java for constructing dynamic web pages based on Java Servlet, specifically it contains
More informationCOMP9321 Web Application Engineering
COMP9321 Web Application Engineering Java Server Pages (JSP) Dr. Basem Suleiman Service Oriented Computing Group, CSE, UNSW Australia Semester 1, 2016, Week 3 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2442
More informationExperiment No: Group B_2
Experiment No: Group B_2 R (2) N (5) Oral (3) Total (10) Dated Sign Problem Definition: A Web application for Concurrent implementation of ODD-EVEN SORT is to be designed using Real time Object Oriented
More informationCOMP9321 Web Application Engineering
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2411 1 Review:
More informationIntroduction to Java Server Pages. Enabling Technologies - Plug-ins Scripted Pages
Introduction to Java Server Pages Jeff Offutt & Ye Wu http://www.ise.gmu.edu/~offutt/ SWE 432 Design and Implementation of Software for the Web From servlets lecture. Enabling Technologies - Plug-ins Scripted
More informationCOMP9321 Web Application Engineering
COMP9321 Web Application Engineering Semester 2, 2017 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2465 1 Review:
More informationJava Server Page (JSP)
Java Server Page (JSP) CS 4640 Programming Languages for Web Applications [Based in part on SWE432 and SWE632 materials by Jeff Offutt] [Robert W. Sebesta, Programming the World Wide Web] 1 Web Applications
More informationUnit 4 Java Server Pages
Q1. List and Explain various stages of JSP life cycle. Briefly give the function of each phase. Ans. 1. A JSP life cycle can be defined as the entire process from its creation till the destruction. 2.
More informationJava Server Pages. Copyright , Xiaoping Jia. 7-01/54
Java Server Pages What is Java Server Pages (JSP)? HTML or XML pages with embedded Java code to generate dynamic contents. a text-based document that describes how to process a request and to generate
More informationIntroduction to JSP and Servlets Training 5-days
QWERTYUIOP{ Introduction to JSP and Servlets Training 5-days Introduction to JSP and Servlets training course develops skills in JavaServer Pages, or JSP, which is the standard means of authoring dynamic
More informationa. Jdbc:ids://localhost:12/conn?dsn=dbsysdsn 21. What is the Type IV Driver URL? a. 22.
Answers 1. What is the super interface to all the JDBC Drivers, specify their fully qualified name? a. Java.sql.Driver i. JDBC-ODBC Driver ii. Java-Native API Driver iii. All Java Net Driver iv. Java Native
More informationJava E-Commerce Martin Cooke,
Java E-Commerce Martin Cooke, 2002 1 Java technologies for presentation: JSP Today s lecture in the presentation tier Java Server Pages Tomcat examples Presentation How the web tier interacts with the
More information1. Introduction. 2. Life Cycle Why JSP is preferred over Servlets? 2.1. Translation. Java Server Pages (JSP) THETOPPERSWAY.
1. Introduction Java Server Pages (JSP) THETOPPERSWAY.COM Java Server Pages (JSP) is used for creating dynamic web pages. Java code can be inserted in HTML pages by using JSP tags. The tags are used for
More informationWriting Servlets and JSPs p. 1 Writing a Servlet p. 1 Writing a JSP p. 7 Compiling a Servlet p. 10 Packaging Servlets and JSPs p.
Preface p. xiii Writing Servlets and JSPs p. 1 Writing a Servlet p. 1 Writing a JSP p. 7 Compiling a Servlet p. 10 Packaging Servlets and JSPs p. 11 Creating the Deployment Descriptor p. 14 Deploying Servlets
More informationJava Server Pages JSP
Java Server Pages JSP Agenda Introduction JSP Architecture Scripting Elements Directives Implicit Objects 2 A way to create dynamic web pages Introduction Separates the graphical design from the dynamic
More informationMore JSP. Advanced Topics in Java. Khalid Azim Mughal Version date: ATIJ More JSP 1/42
More JSP Advanced Topics in Java Khalid Azim Mughal khalid@ii.uib.no http://www.ii.uib.no/~khalid/atij/ Version date: 2006-09-04 ATIJ More JSP 1/42 Overview Including Resources in JSP Pages using the jsp:include
More informationAdvantage of JSP over Servlet
JSP technology is used to create web application just like Servlet technology. It can be thought of as an extension to servlet because it provides more functionality than servlet such as expression language,
More informationJSP. Basic Elements. For a Tutorial, see:
JSP Basic Elements For a Tutorial, see: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/jspintro.html Simple.jsp JSP Lifecycle Server Web
More informationPSD1B Advance Java Programming Unit : I-V. PSD1B- Advance Java Programming
PSD1B Advance Java Programming Unit : I-V PSD1B- Advance Java Programming 1 UNIT I - SYLLABUS Servlets Client Vs Server Types of Servlets Life Cycle of Servlets Architecture Session Tracking Cookies JDBC
More informationServlet and JSP Review
2006 Marty Hall Servlet and JSP Review A Recap of the Basics 2 JSP, Servlet, Struts, JSF, AJAX, & Java 5 Training: http://courses.coreservlets.com J2EE Books from Sun Press: http://www.coreservlets.com
More informationFirst Simple Interactive JSP example
Let s look at our first simple interactive JSP example named hellojsp.jsp. In his Hello User example, the HTML page takes a user name from a HTML form and sends a request to a JSP page, and JSP page generates
More informationJavaServer Pages (JSP)
JavaServer Pages (JSP) The Context The Presentation Layer of a Web App the graphical (web) user interface frequent design changes usually, dynamically generated HTML pages Should we use servlets? No difficult
More informationFast Track to Java EE 5 with Servlets, JSP & JDBC
Duration: 5 days Description Java Enterprise Edition (Java EE 5) is a powerful platform for building web applications. The Java EE platform offers all the advantages of developing in Java plus a comprehensive
More informationUNIT -5. Java Server Page
UNIT -5 Java Server Page INDEX Introduction Life cycle of JSP Relation of applet and servlet with JSP JSP Scripting Elements Difference between JSP and Servlet Simple JSP program List of Questions Few
More informationApplication Development in JAVA. Data Types, Variable, Comments & Operators. Part I: Core Java (J2SE) Getting Started
Application Development in JAVA Duration Lecture: Specialization x Hours Core Java (J2SE) & Advance Java (J2EE) Detailed Module Part I: Core Java (J2SE) Getting Started What is Java all about? Features
More informationServlets and JSP (Java Server Pages)
Servlets and JSP (Java Server Pages) XML HTTP CGI Web usability Last Week Nan Niu (nn@cs.toronto.edu) CSC309 -- Fall 2008 2 Servlets Generic Java2EE API for invoking and connecting to mini-servers (lightweight,
More informationJava Programming Course Overview. Duration: 35 hours. Price: $900
978.256.9077 admissions@brightstarinstitute.com Java Programming Duration: 35 hours Price: $900 Prerequisites: Basic programming skills in a structured language. Knowledge and experience with Object- Oriented
More informationJSP - SYNTAX. Any text, HTML tags, or JSP elements you write must be outside the scriptlet. Following is the simple and first example for JSP:
http://www.tutorialspoint.com/jsp/jsp_syntax.htm JSP - SYNTAX Copyright tutorialspoint.com This tutorial will give basic idea on simple syntax ie. elements involved with JSP development: The Scriptlet:
More information01KPS BF Progettazione di applicazioni web
01KPS BF Progettazione di applicazioni web Introduction to Java Server Pages Fulvio Corno, Alessio Bosca Dipartimento di Automatica e Informatica Politecnico di Torino PAW - JSP intro 1 Introduction to
More informationIn servlet, form parsing is handled automatically. You call request.getparameter to get the value of a form parameter.
In servlet, form parsing is handled automatically. You call request.getparameter to get the value of a form parameter. You can also call request.getparametervalues if the parameter appears more than once,
More informationSYLLABUS JAVA COURSE DETAILS. DURATION: 60 Hours. With Live Hands-on Sessions J P I N F O T E C H
JAVA COURSE DETAILS DURATION: 60 Hours With Live Hands-on Sessions J P I N F O T E C H P U D U C H E R R Y O F F I C E : # 4 5, K a m a r a j S a l a i, T h a t t a n c h a v a d y, P u d u c h e r r y
More informationJava Enterprise Edition. Java EE Oct Dec 2016 EFREI/M1 Jacques André Augustin Page 1
Java Enterprise Edition Java EE Oct Dec 2016 EFREI/M1 Jacques André Augustin Page 1 Java Beans Java EE Oct Dec 2016 EFREI/M1 Jacques André Augustin Page 2 Java Bean POJO class : private Attributes public
More informationTrabalhando com JavaServer Pages (JSP)
Trabalhando com JavaServer Pages (JSP) Sumário 7.2.1 Introdução 7.2.2 JavaServer Pages Overview 7.2.3 First JavaServer Page Example 7.2. Implicit Objects 7.2.5 Scripting 7.2.5.1 Scripting Components 7.2.5.2
More informationPeers Techno log ies Pv t. L td. Core Java & Core Java &Adv Adv Java Java
Page 1 Peers Techno log ies Pv t. L td. Course Brochure Core Java & Core Java &Adv Adv Java Java Overview Core Java training course is intended for students without an extensive programming background.
More informationServlet Fudamentals. Celsina Bignoli
Servlet Fudamentals Celsina Bignoli bignolic@smccd.net What can you build with Servlets? Search Engines E-Commerce Applications Shopping Carts Product Catalogs Intranet Applications Groupware Applications:
More informationservlets and Java JSP murach s (Chapter 4) TRAINING & REFERENCE Mike Murach & Associates Andrea Steelman Joel Murach
Chapter 4 How to develop JavaServer Pages 97 TRAINING & REFERENCE murach s Java servlets and (Chapter 4) JSP Andrea Steelman Joel Murach Mike Murach & Associates 2560 West Shaw Lane, Suite 101 Fresno,
More informationJava Servlets. Preparing your System
Java Servlets Preparing to develop servlets Writing and running an Hello World servlet Servlet Life Cycle Methods The Servlet API Loading and Testing Servlets Preparing your System Locate the file jakarta-tomcat-3.3a.zip
More informationThis course is intended for Java programmers who wish to write programs using many of the advanced Java features.
COURSE DESCRIPTION: Advanced Java is a comprehensive study of many advanced Java topics. These include assertions, collection classes, searching and sorting, regular expressions, logging, bit manipulation,
More informationAbout the Authors. Who Should Read This Book. How This Book Is Organized
Acknowledgments p. XXIII About the Authors p. xxiv Introduction p. XXV Who Should Read This Book p. xxvii Volume 2 p. xxvii Distinctive Features p. xxviii How This Book Is Organized p. xxx Conventions
More informationBasic Principles of JSPs
5 IN THIS CHAPTER What Is a JSP? Deploying a JSP in Tomcat Elements of a JSP Page Chapter 4, Basic Principles of Servlets, introduced you to simple Web applications using servlets. Although very useful
More informationContents at a Glance
Contents at a Glance 1 Java EE and Cloud Computing... 1 2 The Oracle Java Cloud.... 25 3 Build and Deploy with NetBeans.... 49 4 Servlets, Filters, and Listeners... 65 5 JavaServer Pages, JSTL, and Expression
More informationTrabalhando com JavaServer Pages (JSP)
Trabalhando com JavaServer Pages (JSP) Sumário 7.2.1 Introdução 7.2.2 JavaServer Pages Overview 7.2.3 First JavaServer Page Example 7.2.4 Implicit Objects 7.2.5 Scripting 7.2.5.1 Scripting Components 7.2.5.2
More informationCh04 JavaServer Pages (JSP)
Ch04 JavaServer Pages (JSP) Introduce concepts of JSP Web components Compare JSP with Servlets Discuss JSP syntax, EL (expression language) Discuss the integrations with JSP Discuss the Standard Tag Library,
More informationContents. 1. JSF overview. 2. JSF example
Introduction to JSF Contents 1. JSF overview 2. JSF example 2 1. JSF Overview What is JavaServer Faces technology? Architecture of a JSF application Benefits of JSF technology JSF versions and tools Additional
More informationServer-side Web Programming
Server-side Web Programming Lecture 20: The JSP Expression Language (EL) Advantages of EL EL has more elegant and compact syntax than standard JSP tags EL lets you access nested properties EL let you access
More informationAdvance Java. Configuring and Getting Servlet Init Parameters per servlet
Advance Java Understanding Servlets What are Servlet Components? Web Application Architecture Two tier, three tier and N-tier Arch. Client and Server side Components and their relation Introduction to
More informationEnterprise Java Unit 1- Chapter 4 Prof. Sujata Rizal Servlet API and Lifecycle
Introduction Now that the concept of servlet is in place, let s move one step further and understand the basic classes and interfaces that java provides to deal with servlets. Java provides a servlet Application
More informationServlet And JSP. Mr. Nilesh Vishwasrao Patil, Government Polytechnic, Ahmednagar. Mr. Nilesh Vishwasrao Patil
Servlet And JSP, Government Polytechnic, Ahmednagar Servlet : Introduction Specific Objectives: To write web based applications using servlets, JSP and Java Beans. To write servlet for cookies and session
More informationModule 5 Developing with JavaServer Pages Technology
Module 5 Developing with JavaServer Pages Technology Objectives Evaluate the role of JSP technology as a presentation Mechanism Author JSP pages Process data received from servlets in a JSP page Describe
More informationOne application has servlet context(s).
FINALTERM EXAMINATION Spring 2010 CS506- Web Design and Development DSN stands for. Domain System Name Data Source Name Database System Name Database Simple Name One application has servlet context(s).
More informationJAVA 2 ENTERPRISE EDITION (J2EE)
COURSE TITLE DETAILED SYLLABUS SR.NO JAVA 2 ENTERPRISE EDITION (J2EE) ADVANCE JAVA NAME OF CHAPTERS & DETAILS HOURS ALLOTTED SECTION (A) BASIC OF J2EE 1 FILE HANDLING Stream Reading and Creating file FileOutputStream,
More informationTable of Contents. Introduction... xxi
Introduction... xxi Chapter 1: Getting Started with Web Applications in Java... 1 Introduction to Web Applications... 2 Benefits of Web Applications... 5 Technologies used in Web Applications... 5 Describing
More informationCSc31800: Internet Programming, CS-CCNY, Spring 2004 Jinzhong Niu May 9, JSPs 1
CSc31800: Internet Programming, CS-CCNY, Spring 2004 Jinzhong Niu May 9, 2004 JSPs 1 As we know, servlets, replacing the traditional CGI technology, can do computation and generate dynamic contents during
More informationPES INSTITUTE OF TECHNOLOGY, SOUTH CAMPUS DEPARTMENT OF MCA INTERNAL TEST (SCHEME AND SOLUTION) II
PES INSTITUTE OF TECHNOLOGY, SOUTH CAMPUS DEPARTMENT OF MCA INTERNAL TEST (SCHEME AND SOLUTION) II Subject Name: Advanced JAVA programming Subject Code: 13MCA42 Time: 11:30-01:00PM Max.Marks: 50M ----------------------------------------------------------------------------------------------------------------
More informationA Gentle Introduction to Java Server Pages
A Gentle Introduction to Java Server Pages John Selmys Seneca College July 2010 What is JSP? Tool for developing dynamic web pages developed by SUN (now Oracle) High-level abstraction of Java Servlets
More informationJAVA. Duration: 2 Months
JAVA Introduction to JAVA History of Java Working of Java Features of Java Download and install JDK JDK tools- javac, java, appletviewer Set path and how to run Java Program in Command Prompt JVM Byte
More informationSun Sun Certified Web Component Developer for J2EE 5 Version 4.0
Sun Sun Certified Web Component Developer for J2EE 5 Version 4.0 QUESTION NO: 1 To take advantage of the capabilities of modern browsers that use web standards, such as XHTML and CSS, your web application
More informationSession 9. Deployment Descriptor Http. Reading and Reference. en.wikipedia.org/wiki/http. en.wikipedia.org/wiki/list_of_http_headers
Session 9 Deployment Descriptor Http 1 Reading Reading and Reference en.wikipedia.org/wiki/http Reference http headers en.wikipedia.org/wiki/list_of_http_headers http status codes en.wikipedia.org/wiki/http_status_codes
More informationJava Server Pages, JSP
Java Server Pages, JSP Java server pages is a technology for developing web pages that include dynamic content. A JSP page can change its content based on variable items, identity of the user, the browsers
More informationSession 8. Reading and Reference. en.wikipedia.org/wiki/list_of_http_headers. en.wikipedia.org/wiki/http_status_codes
Session 8 Deployment Descriptor 1 Reading Reading and Reference en.wikipedia.org/wiki/http Reference http headers en.wikipedia.org/wiki/list_of_http_headers http status codes en.wikipedia.org/wiki/_status_codes
More informationdirective attribute1= value1 attribute2= value2... attributen= valuen %>
JSP Standard Syntax Besides HTML tag elements, JSP provides four basic categories of constructors (markup tags): directives, scripting elements, standard actions, and comments. You can author a JSP page
More informationUnit 4. CRM - Web Marketing 4-1
Unit 4. CRM - Web Marketing What This Unit Is About Identify/utilize the components of the framework to build and run Web Marketing solutions What You Should Be Able to Do After completing this unit, you
More informationPage 1
Java 1. Core java a. Core Java Programming Introduction of Java Introduction to Java; features of Java Comparison with C and C++ Download and install JDK/JRE (Environment variables set up) The JDK Directory
More informationJSP MOCK TEST JSP MOCK TEST III
http://www.tutorialspoint.com JSP MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to JSP Framework. You can download these sample mock tests at your local
More informationCOMP201 Java Programming
COMP201 Java Programming Part III: Advanced Features Topic 16: JavaServer Pages (JSP) Servlets and JavaServer Pages (JSP) 1.0: A Tutorial http://www.apl.jhu.edu/~hall/java/servlet-tutorial/servlet-tutorial-intro.html
More informationSNS COLLEGE OF ENGINEERING, Coimbatore
SNS COLLEGE OF ENGINEERING, Coimbatore 641 107 Accredited by NAAC UGC with A Grade Approved by AICTE and Affiliated to Anna University, Chennai IT6503 WEB PROGRAMMING UNIT 04 APPLETS Java applets- Life
More informationMAX 2006 Beyond Boundaries
Overview MAX 2006 Beyond Boundaries Jason Delmore Developing ColdFusion-Java Hybrid Applications October 24 th 2006 ColdFusion is a productivity layer built on the strong foundation of J2EE. ColdFusion
More informationFast Track to Java EE
Java Enterprise Edition is a powerful platform for building web applications. This platform offers all the advantages of developing in Java plus a comprehensive suite of server-side technologies. This
More informationTables *Note: Nothing in Volcano!*
Tables *Note: Nothing in Volcano!* 016 1 Learning Objectives After this lesson you will be able to Design a web page table with rows and columns of text in a grid display Write the HTML for integrated
More informationCE212 Web Application Programming Part 3
CE212 Web Application Programming Part 3 30/01/2018 CE212 Part 4 1 Servlets 1 A servlet is a Java program running in a server engine containing methods that respond to requests from browsers by generating
More informationJ2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format.
J2EE Development Detail: Audience www.peaksolutions.com/ittraining Java developers, web page designers and other professionals that will be designing, developing and implementing web applications using
More informationBuilding Web Applications in WebLogic
Patrick c01.tex V3-09/18/2009 12:15pm Page 1 Building Web Applications in WebLogic Web applications are an important part of the Java Enterprise Edition (Java EE) platform because the Web components are
More informationJSP (Java Server Page)
JSP (Java Server Page) http://www.jsptut.com/ http://www.jpgtutorials.com/introduction-to-javaserver-pages-jsp Lab JSP JSP simply puts Java inside HTML pages. Hello!
More informationVolume 1: Core Technologies Marty Hall Larry Brown. Controlling the Structure of Generated Servlets: The JSP page Directive
Core Servlets and JavaServer Pages / 2e Volume 1: Core Technologies Marty Hall Larry Brown Controlling the Structure of Generated Servlets: The JSP page Directive 1 Agenda Understanding the purpose of
More informationDatabase Applications Recitation 6. Project 3: CMUQFlix CMUQ s Movies Recommendation System
15-415 Database Applications Recitation 6 Project 3: CMUQFlix CMUQ s Movies Recommendation System 1 Project Objective 1. Set up a front-end website with PostgreSQL as the back-end 2. Allow users to login,
More informationOracle 10g: Build J2EE Applications
Oracle University Contact Us: (09) 5494 1551 Oracle 10g: Build J2EE Applications Duration: 5 Days What you will learn Leading companies are tackling the complexity of their application and IT environments
More informationJava J Course Outline
JAVA EE - J2SE - CORE JAVA After all having a lot number of programming languages. Why JAVA; yet another language!!! AND NOW WHY ONLY JAVA??? CHAPTER 1: INTRODUCTION What is Java? History Versioning The
More informationWeb applications and JSP. Carl Nettelblad
Web applications and JSP Carl Nettelblad 2015-04-02 Outline Review and assignment Jara Server Pages Web application structure Review We send repeated requests using HTTP Each request asks for a specific
More informationJavaServer Pages. Juan Cruz Kevin Hessels Ian Moon
Page 1 of 14 JavaServer Pages Table of Contents 1. Introduction What is JSP? Alternative Solutions Why Use JSP? 2. JSP Process Request Compilation Example 3. Object Instantiation and Scope Scope Synchronization
More informationADVANCED JAVA COURSE CURRICULUM
ADVANCED JAVA COURSE CURRICULUM Index of Advanced Java Course Content : 1. Basics of Servlet 2. ServletRequest 3. Servlet Collaboration 4. ServletConfig 5. ServletContext 6. Attribute 7. Session Tracking
More informationAdvanced Java Programming
Advanced Java Programming Length: 4 days Description: This course presents several advanced topics of the Java programming language, including Servlets, Object Serialization and Enterprise JavaBeans. In
More informationJava Server Pages. JSP Part II
Java Server Pages JSP Part II Agenda Actions Beans JSP & JDBC MVC 2 Components Scripting Elements Directives Implicit Objects Actions 3 Actions Actions are XML-syntax tags used to control the servlet engine
More informationJSP CSCI 201 Principles of Software Development
JSP CSCI 201 Principles of Software Development Jeffrey Miller, Ph.D. jeffrey.miller@usc.edu Outline JSP Program USC CSCI 201L JSP 3-Tier Architecture Client Server Web/Application Server Database USC
More informationEnterprise Computing with Java MCA-305 UNIT II. Learning Objectives. JSP Basics. 9/17/2013MCA-305, Enterprise Computing in Java
Enterprise Computing with Java MCA-305 UNIT II Bharati Vidyapeeth s Institute of Computer Applications and Management, New Delhi-63, by Ms. Ritika Wason UII. # Learning Objectives JSP Basics and Architecture:
More informationModule 3 Web Component
Module 3 Component Model Objectives Describe the role of web components in a Java EE application Define the HTTP request-response model Compare Java servlets and JSP components Describe the basic session
More informationType of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes
Java CORE JAVA Core Java Programing (Course Duration: 40 Hours) Introduction to Java What is Java? Why should we use Java? Java Platform Architecture Java Virtual Machine Java Runtime Environment A Simple
More informationChapter 4 Notes. Creating Tables in a Website
Chapter 4 Notes Creating Tables in a Website Project for Chapter 4 Statewide Realty Web Site Chapter Objectives Define table elements Describe the steps used to plan, design, and code a table Create a
More informationChapter 10 Servlets and Java Server Pages
Chapter 10 Servlets and Java Server Pages 10.1 Overview of Servlets A servlet is a Java class designed to be run in the context of a special servlet container An instance of the servlet class is instantiated
More informationThe JSP page Directive: Structuring Generated Servlets
The JSP page Directive: Structuring Generated Servlets Core Servlets & JSP book: More Servlets & JSP book: www.moreservlets.com Servlet and JSP Training Courses: courses.coreservlets.com 1 Slides Marty
More informationJSP source code runs on the web server via JSP Servlet Engine. JSP files are HTML files with special Tags
JSP : Java Server Pages It is a server side scripting language. JSP are normal HTML with Java code pieces embedded in them. A JSP compiler is used to generate a Servlet from the JSP page. JavaServer Pages
More informationSERVLETS INTERVIEW QUESTIONS
SERVLETS INTERVIEW QUESTIONS http://www.tutorialspoint.com/servlets/servlets_interview_questions.htm Copyright tutorialspoint.com Dear readers, these Servlets Interview Questions have been designed especially
More informationA- Core Java Audience Prerequisites Approach Objectives 1. Introduction
OGIES 6/7 A- Core Java The Core Java segment deals with the basics of Java. It is designed keeping in mind the basics of Java Programming Language that will help new students to understand the Java language,
More informationHttpServlet ( Class ) -- we will extend this class to handle GET / PUT HTTP requests
What is the servlet? Servlet is a script, which resides and executes on server side, to create dynamic HTML. In servlet programming we will use java language. A servlet can handle multiple requests concurrently.
More informationJAVA SERVLET. Server-side Programming INTRODUCTION
JAVA SERVLET Server-side Programming INTRODUCTION 1 AGENDA Introduction Java Servlet Web/Application Server Servlet Life Cycle Web Application Life Cycle Servlet API Writing Servlet Program Summary 2 INTRODUCTION
More informationJSF. What is JSF (Java Server Faces)?
JSF What is JSF (Java Server Faces)? It is application framework for creating Web-based user interfaces. It provides lifecycle management through a controller servlet and provides a rich component model
More informationJava.. servlets and. murach's TRAINING & REFERENCE 2ND EDITION. Joel Murach Andrea Steelman. IlB MIKE MURACH & ASSOCIATES, INC.
TRAINING & REFERENCE murach's Java.. servlets and 2ND EDITION Joel Murach Andrea Steelman IlB MIKE MURACH & ASSOCIATES, INC. P 1-800-221-5528 (559) 440-9071 Fax: (559) 440-0963 murachbooks@murach.com www.murach.com
More informationModule 4: SERVLET and JSP
1.What Is a Servlet? Module 4: SERVLET and JSP A servlet is a small Java program that runs within a Web server. Servlets receive and respond to requests from Web clients, usually across HTTP, the Hyper
More informationCOURSE DETAILS: CORE AND ADVANCE JAVA Core Java
COURSE DETAILS: CORE AND ADVANCE JAVA Core Java 1. Object Oriented Concept Object Oriented Programming & its Concepts Classes and Objects Aggregation and Composition Static and Dynamic Binding Abstract
More information