orderconfirmation.jsp

来自「java web services how to program」· JSP 代码 · 共 84 行

JSP
84
字号
<?xml version ="1.0 "?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN "
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1.1-strict.dtd "> 
<!-- OrderConfirmation.jsp -->

<%-- JSP page settings --%>
<%@ page language = "java" session = "true" %>

<html xmlns = "http://www.w3.org/1999/xhtml">

   <head>
      <title>PriceFinder - Order Confirmation</title>
   </head>

   <body>

      <%
         // get price quote contents
         String price = ( String )session.getAttribute( "price" );
         String isbn = ( String )session.getAttribute( "isbn" );
         String storeID = 
            ( String )session.getAttribute( "storeID" );

         // get book details contents
         String title = ( String )session.getAttribute( "title" );
         String description = 
            ( String )session.getAttribute( "description" );

         String authors = 
            ( String )session.getAttribute( "authors" );

         String coverImage = 
            ( String )session.getAttribute( "coverImageURL" );

         // get Customer contents
         String firstName = 
            ( String )session.getAttribute( "firstName" );
         String lastName = 
            ( String )session.getAttribute( "lastName" );

         String email = ( String )session.getAttribute( "email" );
         String streetAddress = 
            ( String )session.getAttribute( "streetAddress" );

         String city = ( String )session.getAttribute( "city" );
         String state = ( String )session.getAttribute( "state" );
         String zipCode = ( String )session.getAttribute( "zip" );
         String country = 
            ( String )session.getAttribute( "country" );

         String creditCardNumber = 
            ( String )session.getAttribute( "creditCard" );
      %>

      <h1>PriceFinder OrderConfirmation</h1>

      <h2>You have requested the following book:</h2>
      <br><img src=<%= coverImage %>>
      <br>Title: <%= title %>  
      <br>ISBN: <%= isbn %> 
      <br>Authors: <%= authors %> 
      <br>Description: <%= description %> 
      <br>Price: $<%= price %> 
      <br>StoreID: <%= storeID %> 
      
      <h2>Customer information is:</h2>
      <br>First Name: <%= firstName %>
      <br>Last Name: <%= lastName %>
      <br>Email: <%= email %>
      <br>Street Address: <%= streetAddress %>
      <br>City: <%= city %>
      <br>State: <%= state %>
      <br>Zip: <%= zipCode %>
      <br>Country: <%= country %>
      <br>Credit Card Number: <%= creditCardNumber %>

      <p></p>
      <h2>
          An email confirmation of your order has been sent 
          to address <%= email %>.
      </h2>
   </body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?