Chapter 9 Using JSTL. Sometimes you need more than EL or standard actions What if you want to loop through the data in an array, and display one item.

Slides:



Advertisements
Similar presentations
J2EE training: 1 Course Material Usage Rules PowerPoint slides for use only in full-semester, for-credit courses at degree-granting.
Advertisements

JSP1 Java Server Pages (JSP) Introducing JavaServer Pages TM (JSP TM ) JSP scripting elements.
JavaServerPages Some examples. About JSP Java server pages are a combination of html (or xml), java code appearing within tagged regions, and structures.
JSP: JavaServer Pages Juan Cruz Kevin Hessels Ian Moon.
Object-Oriented Enterprise Application Development Tomcat 3.2 Configuration Last Updated: 03/30/2001.
WEB1P servintro1 Introduction to servlets and JSP Dr Jim Briggs.
Configuring web servers and web applications 1. 2 Server configuration vs. application configuration A web server may run several web application Server.
DT211/3 Internet Application Development
CS320 Web and Internet Programming JSP Scripting Elements and Page Directives Chengyu Sun California State University, Los Angeles.
DT228/3 Web Development JSP: Directives and Scripting elements.
DT228/3 Web Development Databases. Database Almost all web application on the net access a database e.g. shopping sites, message boards, search engines.
Java Server Pages Russell Beale. What are Java Server Pages? Separates content from presentation Good to use when lots of HTML to be presented to user,
DT211/3 Internet Application Development Databases.
Q: According to Intel, the Pentium conforms to the IEEE standards 754 and 854 for floating point arithmetic. If you fly in aircraft designed using a Pentium,
Three types of scripting elements: 1.Expressions 2.Scriptlets 3.Declarations Scripting elements.
JavaServer Pages TM Introduce by
Loops - Monday, Week 4  What are loops?  While loops  Classic loop example - the for loop  Parts of a loop  Examples.
Julien Thibault / Phil Brewster / Kristina Doing-Harris
CS 160: Software Engineering August 27 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
Introduction to Java web programming Dr Jim Briggs JWP intro1.
Eclipse is an open source IDE (Integrated Development Environment) for developing applications in Java, C/C++, HTML, Cobol, Perl, etc. The official Eclipse.
Overview of JSP Technology. The need of JSP With servlets, it is easy to – Read form data – Read HTTP request headers – Set HTTP status codes and response.
JSP Standard Tag Library
Homework for October 2011 Nikolay Kostov Telerik Corporation
Apache + Tomcat. Apache + Tomcat Download mod_webapp.so:
SHOPPING CARTS CHAPTER 19. E-COMMERCE Typically, an e-commerce site will have public pages and admin pages.
 Embeds Java code  In HTML tags  When used well  Simple way to generate dynamic web-pages  When misused (complex embedded Java)  Terribly messy.
JSP Most of the web developers deploying web applications using servlets mixes the presentation logic and business logic. Separation of business logic.
DSpace UI Alexey Maslov. DSpace in general A digital library tool useful for storage, maintenance, and retrieval of digital documents Two types of interaction:
CSCI 6962: Server-side Design and Programming Java Server Faces Components and Tags.
JSTL JSP Standard Tag Library 12-Oct-15. W HAT IS JSTL? JSTL (JSP Standard Tag Libraries) is a collection of JSP custom tags developed by Java Community.
Stanisław Osiński, 2002JSP – A technology for serving dynamic web content Java Server Pages™ A technology for serving dynamic web content Stanisław Osiński,
Chapter 10 Overview of JSP Technology. Understanding the need for JSP JSP technology enables to mix regular, static HTML with dynamically generated content.
JAVA SERVER PAGES CREATING DYNAMIC WEB PAGES USING JAVA James Faeldon CS 119 Enterprise Systems Programming.
JSTL Lec Umair©2006, All rights reserved JSTL (ni) Acronym of  JavaServer Pages Standard Tag Library JSTL (like JSP) is a specification, not an.
How to Create a Document in Google Drive By Tressa Beckler.
Chapter 7 Using Custom Tag Libraries and the JSP Standard Tag Library.
Chapter 7 Being a JSP. JSP introduction JSP is a solution for two issues  Servlet is difficult for HTML designers since they may not know Java  Formatting.
C HAPTER 11 D EPLOYING YOUR WEB APP. WAR FILE A WAR file is simply a snapshot of your web app structure, in a nice portable, compressed form (it is really.
Chapter 5 Generating Dynamic Content. Creating a JSP Page A Sample JSP Page: easy.jsp JSP is Easy JSP is as easy as =
FT228/3 Web Development Error processing. Introduction READ Chapter 9 of Java Server Pages from O’reilly 2 nd Edition Need to be able to 1) Diagnose and.
Chapter 11 Invoking Java Code with JSP Scripting Elements.
1 Web Programming with Servlets & JSP ASSIGNMENT GUIDELINE.
CS562 Advanced Java and Internet Application Introduction to the Computer Warehouse Web Application. Java Server Pages (JSP) Technology. By Team Alpha.
Basic JSP Celsina Bignoli Problems with Servlets Servlets contain –request processing, –business logic –response generation all lumped.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 1COMP9321, 15s2, Week.
10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t.
Core basic Java web server technologies. Tools Eclipse IDE for Java EE Developers (Netbeans also works) nloads/packages/eclipse-
Chapter 3 JSP Overview. The Problem with Servlets processing the request and generating the response are both handled by a single servlet class Java programming.
STRUCTURE OF JSP PRESENTED BY: SIDDHARTHA SINGH ( ) SOMYA SHRIVASTAV ( ) SONAM JINDAL ( )
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
JSP Standard Tag Library (JSTL) Internet Computing KUT Youn-Hee Han.
Chapter 6 Chapter 6 Server Side Programming (JSP) Part 1 1 (IS 203) WebProgramming (IS 203) Web Programming.
JAVA SERVER PAGES -by Rubeena Memon Deepti Jain Jaya Thakar Jisha Vettuventra.
 Java Server Pages (JSP) By Offir Golan. What is JSP?  A technology that allows for the creation of dynamically generated web pages based on HTML, XML,
JSP JavaServer Pages. What is JSP? Java based technology that simplifies the development of dynamic web sites JSP pages are HTML pages with embedded code.
DT228/3 Web Development JSP: Actions elements and JSTL.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
CS320 Web and Internet Programming Web Application and MVC Chengyu Sun California State University, Los Angeles.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
PHP and SQL Server: Connection IST 210: Organization of Data IST2101.
Struts 2 Development. Topics  Roles in Struts Development  Control Flow  Actions  Struts 2 Views and Target  Struts 2 Custom Tags  Validation 
1 Workshop - ODFDOM Lars Behrmann Frank Meies Svante Schubert Sun Microsystems, Hamburg 1.
Web browser Web server HTML request Scripted pagedatabase The following components will be used: Apache Jakarta Tomcat servlet engine Derby JavaServer.
JSP: Actions elements and JSTL
JSP (Java Server Page) JSP is server side technology which is used to create dynamic web pages just like Servlet technology. This is mainly used for implementing.
4166 Review.
Chengyu Sun California State University, Los Angeles

Unit 10 The Web Book Test.
Presentation transcript:

Chapter 9 Using JSTL

Sometimes you need more than EL or standard actions What if you want to loop through the data in an array, and display one item per row in an HTML table? – You could write scriptlet. – But you are trying to get away from scripting – EL and standard actions may not be enough for this situation The solution is custom tags – They are as easy to use in a JSP as standard actions – They are bundled in JSP Standard Tag Library (JSTL)

JSTL JSTL is not part of the JSP specification – Having access to the Servlet and JSP APIs doesn’t mean you have access to JSTL Before you can use JSTL, you need to put two files, “jstl.jar” and “standard.jar” into the WEB-INF/lib directory of your web app – That means each web app needs a copy In our installation of Tomcat 7, you can get these files from the following directory of the example JSP/Servlet application: webapps/jsp-examples/WEB-INF/lib/jstl.jar webapps/jsp-examples/WEB-INF/lib/standard.jar

Looping without scripting Imaging you want something that loops over a collection (say, an array of catalog items), pulls out one element at a time, and print that element in a dynamically-generated table row – The tag is the answer