158
td
font color="lightgreen" Product Reference /font
td
font color="lightgreen" Product Name /font
td
font color="lightgreen" Product Price /font
/tr
!-- Each iteration of the loop display a line of the table --
%
Cart cart = (Cart) session.getAttribute("cart");
Vector products = cart.getProducts();
Enumeration enum = products.elements();
// loop through the enumeration
while (enum.hasMoreElements()) {
Product prod = (Product) enum.nextElement();
%
tr
td
%=prod.getReference()%
td
%=prod.getName()%
td
%=prod.getPrice()%
/tr
%
} // end loop
%
/table
/body
/html
It is a good idea to hide all the mechanisms for accessing EJBs from JSP pages by using a proxy
Java bean, referenced in the JSP page by the
in
the
alarm
example
where the
files communicate with the EJB via a proxy Java bean ViewProxy.java
.jsp
http://www.objectweb.org/jonas/current/examples/alarm/beans/org/objectweb/alarm/beans/
ViewProxy.java.
16.3. The Servlets
Servlets are modules of Java code that run in an application server for answering client requests.
Servlets are not tied to a specific client-server protocol. However, they are most commonly used with
HTTP, and the word "servlet" is often used as referring to an "HTTP servlet."
Servlets make use of the Java standard extension classes in the packages
servlet framework) and
answer HTTP requests).
Typical uses for HTTP servlets include:
processing and/or storing data submitted by an HTML form,
•
providing dynamic content generated by processing a database query,
•
managing information of the HTTP request.
•
For more details refer to the Java Servlet Technology pages (http://java.sun.com/products/servlet/).
/td
http://www.objectweb.org/jonas/current/examples/alarm/web/secured,
javax.servlet.http
Chapter 16. Developing Web Components
/td
/td
special tag. This technique is shown
usebean
(extensions of the servlet framework for servlets that
/td
/td
/td
(the basic
javax.servlet
Need help?
Do you have a question about the APPLICATION SERVER - JONAS and is the answer not in the manual?
Questions and answers