hello guys:I run the following files that belong to the lab 4008:
productos.jsp:
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
  <head>
    <title>JSP 2.0 Examples - Display Products Tag File</title>
  </head>
  <body>
    <h1>JSP 2.0 Examples - Display Products Tag File</h1>
    <hr>
    <p>This JSP page invokes a tag file that displays a listing of
    products.  The custom tag accepts two fragments that enable
    customization of appearance.  One for when the product is on sale
    and one for normal price.</p>
    <p>The tag is invoked twice, using different styles</p>
    <hr>
    <h2>Products</h2>
    <tags:displayProducts>
      <jsp:attribute name="normalPrice">
    Item: ${name}<br/>
    Price: ${price}
      </jsp:attribute>
      <jsp:attribute name="onSale">
    Item: ${name}<br/>
    <font color="red"><strike>Was: ${origPrice}</strike></font><br/>
    <b>Now: ${salePrice}</b>
      </jsp:attribute>
    <jsp:attribute name="anotherJSPFragment">
         This is the item: <font color="red"> ${name} </font><br/>
         <font color="blue"><strike>Was: ${origPrice}</strike></font><br/>
                <b>The price now is: ${salePrice}</b>
    </jsp:attribute>

    </tags:displayProducts>
    <hr>
    <h2>Products (Same tag, alternate style)</h2>
    <tags:displayProducts>
      <jsp:attribute name="normalPrice">
    <b>${name}</b> @ ${price} ea.
      </jsp:attribute>
      <jsp:attribute name="onSale">
    <b>${name}</b> @ ${salePrice} ea. (was: ${origPrice})
      </jsp:attribute>
    </tags:displayProducts>
  <hr>
        <h2>Products (Same tag, the 3rd style)</h2>
        <tags:displayProducts>
            <jsp:attribute name="normalPrice">
                My own display format: ${name}  ${price} per item
            </jsp:attribute>
            <jsp:attribute name="onSale">
                My own display format ${name}  ${salePrice} per item
(Yesterday it was: ${origPrice})
            </jsp:attribute>
        </tags:displayProducts>

  </body>
</html>


I added the following two sentences to the displayproducts.tag:

<%@ attribute name="another JSPFragment" fragment="true" %>
*<jsp:invoke fragment="anotherJSPFragment"/>*i obtained this wrong after
run:
Estado de HTTP 500 -
------------------------------

*type* Informe de excepción

*Mensaje*

*Descripción*El servidor encontró un error interno () que impide satisfacer
la solicitud.

*Excepción*

org.apache.jasper.JasperException: /jsp2/tagfiles/products.jsp(42,48)
PWC6228: Expression language no se permite en el cuerpo de texto de
una plantilla.

*nota* *Las causas de los seguimientos de pila completos de la excepción y
su root se encuentran disponibles en los Sun GlassFish Enterprise Server
v2.1 registros.*
------------------------------
Sun GlassFish Enterprise Server v2.1
*it will be someone could help me?*
thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to