Lecture 3A Flashcards
JSP XML syntax possible in JSP 2.x Benefits?
Conforms with XHTML, XML validation against schema, can use XML tools. However, verbose.
What are JSP directives?
They don’t produce output into current output stream. use them to add imports, include or taglib.
What are JSP actions?
Tell web container what to do as opposed to directives which give new information. Fuzzy difference. Use directive only if included file changes rarely, use action which guarantees latest content.
How to forward JSP?
Use forward action-
What are JSP implicit objects?
Available without declaring - provided by EE web container. ie request, response, session, out
JSTL?
JSP Standard Tag Library.
What does JPA stand for?
Java Persistence API. Application Programming Interface. Used for storing and retrieving objects to/from relational database. It provides ORM - maps Java classes to database tables. Javax.persistence
What is a Java process?
A Java program which is currently running.
JPA is a specification. Hibernate is an implementation of that specification.
Hibernate made by RedHat.
JDBC?
Java Database Connectivity. Non enterprise standard java framework. Allows SQL queries into Java code.
JPA entity classes vs entities?
Entity class annotated with @Entity. An entity is an instance of such a class. As an entity a Java object can be stored as a database.
What is a POJO?
Plain Old Java Object. Items stored in db rows using JPA are POJO’s (minus methods).
Entity classes need what to work?
@entity, import javax.persistence.Entity, a public or protected no argument constructor, no Finals, must be serializable sometimes, persistence instance variables (non static fields) must be private, protected or package private.
List some common JPA annotations
@Id @Table @Column
What is the JPA entity manager?
Responsible for storing retrieving Java objects in database. @PersistenceUnit(unitName=”customerPersistenceUnit”) private EntityManagerDactory entityManagerFactory;
EntityManager entityManager = entityManagerFactory.createEntityManager();