// first servlets
// need to be pulic in the class
// default is get


import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;



public class SorryServlet extends HttpServlet 
	{
	 public void doPost(HttpServletRequest req, HttpServletResponse res )  
		{
	 try
		 {







			// set up a response

			res.setContentType("text/html");

			// get a handle to the output stream via the response

			PrintWriter out = new PrintWriter (res.getOutputStream(), true);

			// format the html output

			 






			out.println("<html> <head> <title>Sorry Page</title>");

			out.println("<link rel='stylesheet' type='text/css' href='../book.css' />");

			 
			out.println("</head>");

			out.println("<body align='center'>");



 
			out.println("<h1>");


			//out.println("<image src='../images/logo.gif'>");


			out.println("<image src='../images/BookNookStack.gif' width='213' height='96' border=0 align='left'>");
			out.println("Sorry</h1><br />");
			out.println("<h4>Your Order did not go through ... </h4>");
			out.println("<image src='../images/BookNookStar.gif' width='85' height='34' border=0 alt='' >");
			out.println("<p>");
			out.println("You are placing an order or orders over $500 today and we <br />");
			out.println("\"PREFER\" you place order through our cusotmer service< br />");
			out.println("Please call our 800 number to continue your order <br />");
			out.println("Thank you for your pastronage<br />");
			out.println("Hope to hear from you SOON...");
			out.println("</p>");

 				 
			out.println("<input type='button' name='backbutton' value='Back' onclick='history.back();' />");
			  

			out.println("</body></html>");

		 }

		
		catch (IOException e)
		 {
			 System.out.println("A IO Exception" +  e.getMessage());
			 e.printStackTrace();
		 }
		catch (Exception e)
		 {
			 System.out.println("An Exception" +  e.getMessage());
			 e.printStackTrace();
		 }


	  
		
	 
		} // end doPost

	 public void doGet(HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException
		{
			doPost(req, res);

		} // end doGet
	}
 
